Skip to main content

VinylVfxProcessor

Struct VinylVfxProcessor 

Source
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

Source

pub fn new() -> Self

Source

pub fn set_scene(&mut self, scene: u32, amount: f64)

Source

pub fn scene(&self) -> u32

Source

pub fn amount(&self) -> f64

Source

pub fn reset_transient_state(&mut self)

Source

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.

Source

pub fn reset_all(&mut self)

Everything this processor has accumulated: the revolution memory, the wear, and the filters riding on both.

Source

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.

Source

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.

Source

pub fn wear_level(&self) -> f64

Mean wear around the revolution, 0..=1 — the number the meter fills to.

Source

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.

Source

pub fn polar_fill_ratio(&self) -> f64

How much of the revolution memory holds this record, 0..=1.

Source

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.

Source

pub const fn wear_bin_count() -> usize

Source

pub const fn polar_bin_count() -> usize

Source

pub fn process_interleaved( &mut self, samples: &mut [f32], channel_count: usize, context: VinylVfxContext, )

Source

pub fn process_planar( &mut self, left: &mut [f32], right: &mut [f32], context: VinylVfxContext, )

Trait Implementations§

Source§

impl Clone for VinylVfxProcessor

Source§

fn clone(&self) -> VinylVfxProcessor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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.

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VinylVfxProcessor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more