| 1 |
faust2ck - A FAUST wrapper-generator for ChucK Ugens. |
| 2 |
======== |
| 3 |
|
| 4 |
FAUST is a functional language for defining DSP structures that can be |
| 5 |
used for real-time audio computing. It can generate block diagrams |
| 6 |
and also C++ code which will execute the given routine. |
| 7 |
|
| 8 |
This is an ideal way to create unit generators (UGens) for ChucK. The |
| 9 |
ChucK data structures can be a bit weird and the learning curve for |
| 10 |
hacking on ChucK can be a little steep. Using FAUST, you can |
| 11 |
concentrate on the DSP algorithm, and allow faust2ck to take care of |
| 12 |
creating ChucK-compatible C++ code so that you can instantiate your |
| 13 |
new DSP object in a ChucK program. |
| 14 |
|
| 15 |
Please see the FAUST websites for more details, online tutorials, and |
| 16 |
even an online compiler that you can try: |
| 17 |
|
| 18 |
http://faust.grame.fr/ |
| 19 |
https://fausteditor.grame.fr/ |
| 20 |
https://faustide.grame.fr/ |
| 21 |
|
| 22 |
This document describes how to use faust2ck. |
| 23 |
|
| 24 |
This code is directly based off of Scott Sinclair's original faust2ck, |
| 25 |
without which this latest iteration would not exist. |
| 26 |
|
| 27 |
Build/Install |
| 28 |
============= |
| 29 |
|
| 30 |
To build faust2ck, first download the source: |
| 31 |
|
| 32 |
$ git clone https://github.com/spencersalazar/faust2ck.git |
| 33 |
|
| 34 |
Then compile: |
| 35 |
|
| 36 |
$ cd faust2ck/src |
| 37 |
$ make |
| 38 |
|
| 39 |
Then install! |
| 40 |
|
| 41 |
$ sudo make install |
| 42 |
|
| 43 |
Usage |
| 44 |
===== |
| 45 |
|
| 46 |
Running faust2ck with no parameters will give you a usage string: |
| 47 |
|
| 48 |
$ faust2ck |
| 49 |
Usage: faust2ck <filename.dsp> |
| 50 |
|
| 51 |
You can see that it requires a single input, the name of a FAUST .dsp file. |
| 52 |
How you come up with this .dsp file is beyond the scope of this document, |
| 53 |
but check out here: http://faust.grame.fr/examples.html for some |
| 54 |
cool examples. |
| 55 |
|
| 56 |
When you execute faust2ck with a suitable .dsp file: |
| 57 |
|
| 58 |
$ faust2ck filename.dsp |
| 59 |
|
| 60 |
it will generate a ChuGin called "filename.chug". You can load this into ChucK |
| 61 |
with the -g option: |
| 62 |
|
| 63 |
$ chuck -gfilename |
| 64 |
|
| 65 |
but chuck will exit immediately because you haven't provided it with a script |
| 66 |
to run. If you want to load your new ChuGin without the annoying -g option, |
| 67 |
simply copy it to your ChuGin directory (typically /usr/local/lib/chuck). |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|