Skip to main content

HoldEdge

Enum HoldEdge 

Source
pub enum HoldEdge {
    Beat,
    Bar,
    Period(f32),
}
Expand description

When a held binding takes a new value (ADR-0180 rule 2). Between edges the scene keeps reading the value taken at the last one.

The two named edges are counters the analysis frame already publishes, not conditions this type evaluates: beat is the frame’s own one-frame beat gate and bar is a change in its bar counter. A Period re-samples on the render clock instead, which is the only edge in the vocabulary that exists on a silent stream.

Variants§

§

Beat

Every frame the analysis frame’s beat gate fires.

§

Bar

Every change of the analysis frame’s bar counter. That counter is the confidence-gated downbeat estimate where the tracker has locked and its own tempo-driven count everywhere else, so this steps on something musical without promising it is the downbeat.

§

Period(f32)

Every n seconds of render time, n > 0. Re-sampling restarts the interval from the frame it happened on, so a long frame delays the next edge rather than banking a debt of them.

Implementations§

Source§

impl HoldEdge

Source

pub const NAMED: [HoldEdge; 2]

The two named edges, for the load error’s “expected one of” listing and for the reference, which renders this rather than restating it.

Source

pub fn from_name(name: &str) -> Option<Self>

Parse a named edge, or None if the word is not one. A period is not spelled here – it arrives as a number, or as a numeric string.

Source

pub fn as_str(self) -> &'static str

The canonical name of a named edge – from_name’s inverse. A period has no name and renders as its own number.

Trait Implementations§

Source§

impl Clone for HoldEdge

Source§

fn clone(&self) -> HoldEdge

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 HoldEdge

Source§

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

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

impl PartialEq for HoldEdge

Source§

fn eq(&self, other: &HoldEdge) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for HoldEdge

Source§

impl StructuralPartialEq for HoldEdge

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 = 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.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,