Skip to main content

TrackParams

Struct TrackParams 

Source
pub struct TrackParams {
Show 20 fields pub gain: Shared, pub cutoff: Shared, pub resonance: Shared, pub detune: Shared, pub sweep_k: Shared, pub sweep_center: Shared, pub reverb_mix: Shared, pub supermass: Shared, pub pulse_depth: Shared, pub mute: Shared, pub freq: Shared, pub life_mod: Shared, pub pattern_bits: Arc<AtomicU32>, pub pattern_hits: Shared, pub pattern_rotation: Shared, pub lfo_rate: Shared, pub lfo_depth: Shared, pub lfo_target: Shared, pub character: Shared, pub arp: Shared,
}

Fields§

§gain: Shared§cutoff: Shared§resonance: Shared§detune: Shared§sweep_k: Shared§sweep_center: Shared§reverb_mix: Shared§supermass: Shared§pulse_depth: Shared§mute: Shared§freq: Shared§life_mod: Shared§pattern_bits: Arc<AtomicU32>

16-step Euclidean rhythm pattern as a bitmask. Drum presets (currently only Heartbeat) read this every sample to decide whether to fire on the current step. Recomputed in the TUI loop from pattern_hits + pattern_rotation.

§pattern_hits: Shared

Hits per 16 steps, [0.0, 16.0]. Fed into euclidean_bits().

§pattern_rotation: Shared

Pattern rotation, [0.0, 15.0].

§lfo_rate: Shared

Per-track LFO rate in Hz (0.01..20).

§lfo_depth: Shared

LFO depth [0..1]. Depth 0 = LFO off regardless of target.

§lfo_target: Shared

LFO target index (quantised): 0 OFF · 1 CUT · 2 GAIN · 3 FREQ · 4 REV

§character: Shared

Per-preset “character” knob in [0.0, 1.0]. Each preset interprets this differently — Pad stretches partials, Bell shifts FM ratio, Heartbeat scales the pitch drop, etc. Default 0.5 reproduces the original hand-tuned formula; 0 and 1 are the two extremes.

§arp: Shared

Arpeggiator depth [0..1]. 0 → pitch stays on freq. Above 0, every 2 beats the pitch jumps to a pentatonic-scale note (glided via follow() so it sounds like portamento, not steps).

Implementations§

Source§

impl TrackParams

Source

pub fn default_for(freq: f32) -> Self

Source

pub fn dormant(freq: f32) -> Self

Source

pub fn snapshot(&self) -> TrackSnapshot

TUI-facing snapshot — narrowed to f32 where only display precision matters. Audio still runs on f64 internally.

Trait Implementations§

Source§

impl Clone for TrackParams

Source§

fn clone(&self) -> TrackParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. 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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,