Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md to include plug submodule #210

Merged
merged 3 commits into from Oct 18, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 25 additions & 5 deletions README.md
Expand Up @@ -13,7 +13,7 @@

Gwion is a programming language, aimed at making music

**strongly** inspired by [chuck](http://chuck.stanford.edu/), but adding a bunch *high-level* features:
**strongly** inspired by [ChucK](http://chuck.stanford.edu/), but adding a bunch *high-level* features:
templating, first-class functions and more.

It aims to be simple, small,
Expand All @@ -26,11 +26,11 @@ You might just want the minimum to start with, try
``` sh
git clone https://github.com/fennecdjay/Gwion
cd Gwion
git submodule update --init util ast plug
git submodule update --init --recursive
forrcaho marked this conversation as resolved.
Show resolved Hide resolved
make
```

### Configuring (optionnal)
### Configuring (optional)
You can get a list of config files to tweak with
``` sh
find . -name "config.mk"
Expand All @@ -40,12 +40,12 @@ Please rebuild to take your change into account.
```
make -C util clean
make -C ast clean
make -C plug clean
make clean
make
```

> Besides develloper options, you migth want to check *USE_DOUBLE*, in util/config.mk, which set the floating point size (float or double).
> Besides developer options, you migth want to check *USE_DOUBLE*, in util/config.mk, which set the floating point size (float or double).
> Note that the option you choose must match how you built your soundpipe library (more on soundpipe later).

## Executing your first code (hello_world.gw):

Expand Down Expand Up @@ -79,6 +79,26 @@ Save and exit the file(:wq in vim). Use the following command to run your first
```
Congratulations!! You ran your first gwion program.

## Making Sound
Gwion relies on plugins for most of its language features, including all those that make sound. Plugins are located in the subdirectories of
`plug`. To get some sounds going under linux using jack sound server, you can build the plugins `Jack`, `Soundpipe`, and `Modules`.

Starting from the Gwion base directory, to build `Jack`:
```
cd plug/Jack
make
```
This will give you a shared object file, `Jack.so`. The default place Gwion will look for plugins is in a subdir of your home directory
named `.gwplug`. So create that directory and move `Jack.so` there:
```
mkdir ~/.gwplug
mv Jack.so ~/.gwplug
```
Repeat for the other plugins mentioned. The `Soundpipe` plugin requires the soundpipe library, which we hope to have build seamlessly for you when you build the `Soundpipe` module, but we're not quite there yet. Please ask for help if this isn't working.

When all those plugin `.so` files are in your `~/.gwplug` directory, you should be able to run a Gwion program that makes sound! In `plug/Modules` there's a `test.gw` program which plays a sine wave for 5 seconds. If the `gwion` you built is still in the base dir of your cloned repo, from the
`plug/Modules` subdirectory you should be able to run `../../gwion -d jack test.gw` and hear some sound!

forrcaho marked this conversation as resolved.
Show resolved Hide resolved
## Installation

It's a good idea to install Gwion now that you have tried it out. Use the following command to install it
Expand Down