Struct Synced Delay
pub struct SyncedDelay { /* private fields */ }Expand description
Stereo delay with tempo sync, a tone control in the feedback path and ping-pong cross-feed.
Supports mono and stereo at sample rates up to 768 kHz, any block size and any number of
events. Parameter changes arrive as ParameterValue events with the IDs in
this module and are applied at their sample offset; unknown IDs are ignored.
A block with an invalid known value faults before any value is applied.
With sync on, the time follows the selected division at the host tempo read at the start of each block; the last known tempo is kept while the host gives none. Without any tempo since preparation, the millisecond time applies. Changes of time glide over 50 ms, other controls ramp over 5 ms.
Preparation allocates two delay lines of two seconds each; processing and reset allocate nothing. Nonfinite input samples become zero.
Implementations§
§impl SyncedDelay
impl SyncedDelay
pub fn target_time_ms(&self) -> f32
pub fn target_time_ms(&self) -> f32
The delay time currently targeted, in milliseconds: the synced time when sync is on and a tempo is known, otherwise the time control.
pub fn set(&mut self, id: ParameterId, value: f32) -> Result<(), InvalidControl>
pub fn set(&mut self, id: ParameterId, value: f32) -> Result<(), InvalidControl>
Set one control while inactive or between blocks; the change ramps from the next processed sample.
§Errors
Returns InvalidControl for an unknown ID or an invalid value, without
changing anything.