Class: ParameterReader

ParameterReader(ringbuf)

Receive 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 ParameterReader(ringbuf)

Parameters:
Name Type Description
ringbuf RingBuffer A RingBuffer setup to hold Uint8.
Source:

Classes

ParameterReader

Methods

dequeue_change(o)

Attempt to dequeue a single parameter change.
Parameters:
Name Type Description
o Object An object with two attributes: `index` and `value`.
Source:
Returns:
true if a parameter change has been dequeued, false otherwise.