shithub: neindaw

ref: fd272a818645bf34eb7479ecb2467f81396506a0
dir: /README.md/

View raw version
# faust9p

Tools to compile [Faust](https://faust.grame.fr) DSP code to a 9p
server running on Plan 9.

![code](kick.png) → ![result](cfg.png)

## Installing

```
cd /tmp && \
hget https://github.com/ftrvxmtrx/microui/archive/master.tar.gz | tar xz && \
cd microui-master && mk install && cd .. && \
hget https://github.com/ftrvxmtrx/faust9p/archive/master.tar.gz | tar xz && \
cd faust9p-master && mk install && cd cfg && mk install
```

## Testing

So far only one instrument provided, which is a kick drum.

```
daw/kick_drum -m /n/kick
cd /n/kick
```

Allocate one instance.
```
cd `{cat clone}
cd K*
```

Check the A oscillator frequency, the order is `type value initial min max step`.
It's different for different UI elements.
```
cat A/Frequency/ctl
vslider	100	100	10	200	5
```

Raise frequency to 160Hz.
```
echo 160 > A/F*/ctl
```

Pipe sound to /dev/audio in background.
```
audio/pcmconv -i f32c1r44100 < ../data > /dev/audio &
```

Set B oscillator parameters and enable it.
```
echo 400 > B/Frequency/ctl
echo 0.001 > B/Attack/ctl
echo 1 > B/Enable/ctl
```

Do a kick.
```
echo 0 > Control/Gate/ctl
echo 1 > Control/Gate/ctl
```

Run `cfg` to configure the kick drum in a GUI.
```
daw/cfg /n/kick
```

## TODO

 * `<ui>/value` to watch the changes, add frame offset as well to know
   when it actually changed
 * optional frame offsets for all commands, perhaps that's easier than
   running and stopping the processing all the time
 * `reset` command for groups
 * add writable `metadata` for each instance
 * allow adding new key/values to `metadata`
 * add some way to read and write the whole configuration of an instance
   in an easy way, so instances can be cloned, or configs saved to disk
   as presets
 * make all of that compile and run on Linux as well?