pub struct PhraseSpec {
pub sample_rate: f64,
pub seed: u64,
pub notes: Vec<Note>,
}Expand description
The audition stimulus: notes, sample rate, and the RNG seed used for any stochastic module (noise, drift) so renders are bit-reproducible.
Fields§
§sample_rate: f64Sample rate in Hz.
seed: u64Seed installed into quiver’s thread-local RNG before rendering.
notes: Vec<Note>The phrase notes, played in order.
Implementations§
Source§impl PhraseSpec
impl PhraseSpec
Sourcepub fn total_samples(&self) -> usize
pub fn total_samples(&self) -> usize
Total rendered length in samples.
Sourcepub fn total_seconds(&self) -> f64
pub fn total_seconds(&self) -> f64
Total rendered length in seconds.
Sourcepub fn max_voices(&self) -> usize
pub fn max_voices(&self) -> usize
Largest number of voices gated on simultaneously anywhere in the phrase (1 for a purely monophonic spec). The vet gate’s peak ceiling scales with this: N legitimate voices can legitimately sum to N× one voice’s level, and that summing is signal, not runaway.
Trait Implementations§
Source§impl Clone for PhraseSpec
impl Clone for PhraseSpec
Source§fn clone(&self) -> PhraseSpec
fn clone(&self) -> PhraseSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhraseSpec
impl Debug for PhraseSpec
Source§impl Default for PhraseSpec
impl Default for PhraseSpec
Source§impl<'de> Deserialize<'de> for PhraseSpec
impl<'de> Deserialize<'de> for PhraseSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PhraseSpec
impl PartialEq for PhraseSpec
Source§fn eq(&self, other: &PhraseSpec) -> bool
fn eq(&self, other: &PhraseSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PhraseSpec
impl Serialize for PhraseSpec
impl StructuralPartialEq for PhraseSpec
Auto Trait Implementations§
impl Freeze for PhraseSpec
impl RefUnwindSafe for PhraseSpec
impl Send for PhraseSpec
impl Sync for PhraseSpec
impl Unpin for PhraseSpec
impl UnsafeUnpin for PhraseSpec
impl UnwindSafe for PhraseSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more