pub enum SignalSource {
Energy,
Beat,
Bass,
Highs,
Stem(StemKind),
Oscillator {
frequency: f32,
},
Constant(f32),
}Expand description
A runtime signal in 0..=1.
Variants§
Energy
The soundtrack’s loudness envelope
(SoundtrackDef::energy).
Beat
1 on each beat, decaying linearly to 0 at the next
(SoundtrackDef::beat_at).
Bass
Low band level. Live audio when playing; else the bass stem, else
energy.
Highs
High band level. Live audio when playing; else the other stem, else
energy.
Stem(StemKind)
A separated stem’s envelope; falls back to energy when the
soundtrack carries no stems.
Oscillator
A free-running sine, 0..=1, at frequency Hz. Needs no soundtrack.
Constant(f32)
A fixed value — for authoring and previews.
Implementations§
Source§impl SignalSource
impl SignalSource
Sourcepub fn needs_soundtrack(&self) -> bool
pub fn needs_soundtrack(&self) -> bool
Signals that exist without a soundtrack.
Sourcepub fn free_running_at(&self, t: f32) -> Option<f32>
pub fn free_running_at(&self, t: f32) -> Option<f32>
The value of a soundtrack-free signal at time t (seconds); None
for signals a soundtrack provides.
Trait Implementations§
Source§impl Clone for SignalSource
impl Clone for SignalSource
Source§impl Debug for SignalSource
impl Debug for SignalSource
Source§impl<'de> Deserialize<'de> for SignalSource
impl<'de> Deserialize<'de> for SignalSource
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 SignalSource
impl PartialEq for SignalSource
Source§impl Serialize for SignalSource
impl Serialize for SignalSource
impl StructuralPartialEq for SignalSource
Auto Trait Implementations§
impl Freeze for SignalSource
impl RefUnwindSafe for SignalSource
impl Send for SignalSource
impl Sync for SignalSource
impl Unpin for SignalSource
impl UnsafeUnpin for SignalSource
impl UnwindSafe for SignalSource
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