genish.js is a library to help develop optimized audio callbacks employing per-sample processing techniques. This enables signal processing that is not possible using buffers, for example:
In our opinion per-sample processing is also easier to reason about than processing in blocks of hundreds of samples at a time. Process a sample in unit generator
then feed it into unit generator
B. And then feed the result back into unit generator
A to influence the next sample if you want.
Per-sample processing is currently possible in the browser using the ScriptProcessor node found in the Web Audio API. While the ScriptProcessor node currently imposes performance penalties, in the (hopefully near) future many of these penalties will be removed when the Audio Worklet is introduced.
genish.js is inspired by the gen~ extension for Max/MSP.