shithub: neindaw


clone: git:// gits://
push: hjgit://
patches to: sigrid on 9gridchan, or

Last commit

8747033f – Sigrid – 2021-01-13T13:11:17-05:00
fix a warning on 386


# 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 is based on the files exposed by each
instrument or filter.

Besides the usual C interfaces, neindaw uses
[Faust]( to build instruments.  Here, watch

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


## Installing

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

## Testing

`contrib` directory contains a script `o` that provides an easy way to run neindaw with ORCΛ.

More details about [ORCΛ]( coupled with neindaw as
a live-coding environment under Plan 9:

Here a basic example of using neindaw manually is shown.

So far three instruments are available: a simplified kick drum,
AY-3-8910 and a piano.

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