pub struct VinylVfxProcessor { /* private fields */ }Expand description
Preallocated state for one graph instance.
Live players keep one instance beside the acoustic DSP. Offline buses use the same type, so a scene’s block order and state transitions are shared.
Clone is for the replay snapshot: a replay is a transaction on the live
deck, and the revolution memory and the halo it leaves behind belong to
the record that was playing, not to the take that was replayed.
Implementations§
Source§impl VinylVfxProcessor
impl VinylVfxProcessor
pub fn new() -> Self
pub fn set_scene(&mut self, scene: u32, amount: f64)
pub fn scene(&self) -> u32
pub fn amount(&self) -> f64
pub fn reset_transient_state(&mut self)
Sourcepub fn reset_wear(&mut self)
pub fn reset_wear(&mut self)
Clears the wear bins.
Wear deliberately survives a scene change — set_scene resets the
transient state and leaves this standing, because a worn record is
worn whichever scene is reading it. So this is the only way it goes
away, short of a new record on the platter.
Sourcepub fn reset_all(&mut self)
pub fn reset_all(&mut self)
Everything this processor has accumulated: the revolution memory, the wear, and the filters riding on both.
Sourcepub fn halo_wear_map(&self) -> Vec<f32>
pub fn halo_wear_map(&self) -> Vec<f32>
The halo, for a take’s world: WORN HALO’s bins, 0..=1 by phase within one revolution.
Sourcepub fn restore_halo_wear(&mut self, map: &[f32])
pub fn restore_halo_wear(&mut self, map: &[f32])
Restores a halo. Shorter maps leave the rest of the turn mint; longer ones are cut to the bins there are.
Sourcepub fn wear_level(&self) -> f64
pub fn wear_level(&self) -> f64
Mean wear around the revolution, 0..=1 — the number the meter fills to.
Sourcepub fn wear_peak(&self) -> f64
pub fn wear_peak(&self) -> f64
The worst-worn bin, 0..=1 — the meter’s tick. A record worn through in one bar reads far worse here than its mean admits.
Sourcepub fn polar_fill_ratio(&self) -> f64
pub fn polar_fill_ratio(&self) -> f64
How much of the revolution memory holds this record, 0..=1.
Sourcepub fn memory_bytes(&self) -> usize
pub fn memory_bytes(&self) -> usize
What this processor is holding, in bytes. Reported rather than assumed: the Vfx row shows the real cost of the memory a scene reads back from, and the buffers are the largest thing on a deck.
pub const fn wear_bin_count() -> usize
pub const fn polar_bin_count() -> usize
pub fn process_interleaved( &mut self, samples: &mut [f32], channel_count: usize, context: VinylVfxContext, )
pub fn process_planar( &mut self, left: &mut [f32], right: &mut [f32], context: VinylVfxContext, )
Trait Implementations§
Source§impl Clone for VinylVfxProcessor
impl Clone for VinylVfxProcessor
Source§fn clone(&self) -> VinylVfxProcessor
fn clone(&self) -> VinylVfxProcessor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VinylVfxProcessor
Two million bins are not a debug line. The scene, the amount and how
much of each buffer is holding something are.
impl Debug for VinylVfxProcessor
Two million bins are not a debug line. The scene, the amount and how much of each buffer is holding something are.