Any sound can be expressed as a function from time to [-1, 1].
Sinusoid is an expressive framework to write these functions.
index.ls: The entry point for the web app.worker.ls: The entry point for the worker, which executes user code in the background.src/engine.ls: Interfaces with Web Audio API and workersrc/signals.ls: Raw waveforms and basic operations such as adding, cropping, delayingsrc/instruments.ls: Some basic fully-synthesized instrumentssrc/util.ls: Mainly data structures for performancesrc/music.ls: Higher-level abstractions from music theorysrc/fft.js: Fast fourier transform, basically copied from Nayukisrc/dsp.ls: Convolution, digital filterssrc/gui_components/*: React components
Currying with --> in LiveScript is slow. Therefore, functions like gain_db must be called like gain_db(-10)(orig_signal). Better yet, use the pipe operator: orig_signal |> gain_db -10.