Class: ParameterWriter

ParameterWriter(ringbuf)

Send parameter changes, lock free, no gc, between a UI thread (browser main thread or worker) and a real-time thread (in an AudioWorkletProcessor). Write and Reader cannot change role after setup, unless externally synchronized. GC _can_ happen during the initial construction of this object when hopefully no audio is being output. This depends on the implementation. Parameter changes are like in the VST framework: an index and a float value (no restriction on the value). This class supports up to 256 parameters, but this is easy to extend if needed. An element is an index, that is an unsigned byte, and a float32, which is 4 bytes.

Constructor

new ParameterWriter(ringbuf)

From a RingBuffer, build an object that can enqueue a parameter change in the queue.
Parameters:
Name Type Description
ringbuf RingBuffer A RingBuffer object of Uint8Array.
Source:

Classes

ParameterWriter