shithub: neindaw

ref: 9b3691b57b3fc854f77cffb8b9000efc13ee2087
dir: /README.md/

View raw version
# neindaw

Some kind of DAW for 9front? An ongoing effort. Each instrument and filter is
a filesystem. On top of that idea a DAW is supposed to be built, the UI is
optional and based on the files exposed by each instrument or filter.

Besides the usual C interfaces, neindaw uses [Faust](https://faust.grame.fr)
to build instruments. Here, watch this:

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

Wow.

## Installing

Clone the repo, run `mk install`, check out `ls /bin/daw`.

## Testing

One can use [ORCΛ](https://git.sr.ht/~ft/orca) coupled with neindaw as a
live-coding environment under Plan 9. Here a basic example of using neindaw
manually is shown.

So far two instruments are provided, which is a kick drum synth and AY-3-8910.

```
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 clear > ../ctl
echo 1 > Control/Gate/ctl
```

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

```
daw/cfg /n/kick
```

## TODO and random notes

 * add input proccessing
 * buffer computated data if `data` is opened more than once so every reader
   gets the same data at its own pace?
 * use llvm-generated object or asm instead of C? that would be having to
   add Plan 9 target to llc I guess, or some kind of conversion tool for asm
 * renaming/removal of instance IDs and controls via Twstat and Tremove
 * `<fs>/watch` to watch the changes, add frame offset as well to know when
   it actually changed
 * optional frame offsets for all commands, running and stopping computations
   at specific offsets will make it possible to apply changes correctly
 * `reset` command for groups
 * writable `metadata`: 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 OpenBSD as well?
 * "sampler" that can be used to buffer generated audio in memory/files
   to be reused without running computations every single time
 * slicer
 * `<id>/from` and `<id>/to` to connect all the objects together, should
   be controllable through daw/cfg.
 * mixerfs with channels
 * full MIDI support
 * OSC support
 * changes of controls can be monitored through a 2D plot in GUI
 * every control can be used as an input of another control