The current plan is to create enough infrastructure to run WASM code from Peter Salomonsens awesome AssemblyScript based synth.
- Playback using Dart on Linux via Libao (using Pulseaudio on Ubuntu)
- Playback sine wave test tone using AssemblyScript ported to Dart
- Call wasm (AS compiled to wasm from @petersalomonsen repo) from Dart using upcoming wasm package via FFI
- interface to all "low-level" synth1 classes (oscillators, envelope, etc)
- interface to fx classes
- interface to "instruments" defined based on lowlevel synth classes
run to get sawtooth tone at 440hz playing for 1 sec:
dart example/osc_example.dart
to play a sawtooth tone with a given midi note for 1 sec:
dart example/osc_example.dart 33
to play a sawtooth tone with a envelope applied for 3 sec:
dart example/env_example.dart
Note: the wasm oscillator classes currently expect a wasm file called osc.wasm
to be located in the same folder as the dart script being run, eg. osc_example.dart
.
The wasm file osc.wasm used by dart-synth comes from the AssemblyScript Audio project.
Currently only basic sine/sawooth tone playback on x86 Linux (under PulseAudio) works, see above Todo list for planned future features.