Skip to main content

NodeRenderer

Enum NodeRenderer 

Source
pub enum NodeRenderer {
Show 20 variants Const(f64), Time, Wrap(Wrap), Read { slot: Slot, map: Map, }, Formula { formula: Formula, width: usize, time: Box<NodeRenderer>, }, Noise(u64), Indexed { slot: Slot, index: Index, reach: Option<(i64, i64)>, }, Instant(Index), Add(Vec<NodeRenderer>), Mul(Vec<NodeRenderer>), Sub(Box<NodeRenderer>, Box<NodeRenderer>), Div(Box<NodeRenderer>, Box<NodeRenderer>), Pow(Box<NodeRenderer>, Box<NodeRenderer>), Map(Unary, Box<NodeRenderer>), Zip(Binary, Box<NodeRenderer>, Box<NodeRenderer>), Crop { x: Box<NodeRenderer>, window: (i64, i64), a: f64, b: f64, rise: f64, fall: f64, }, Join(Vec<NodeRenderer>), Channel { x: Box<NodeRenderer>, k: usize, }, Filter { site: SiteId, from: i64, x: Box<NodeRenderer>, cutoff: Box<NodeRenderer>, q: Box<NodeRenderer>, gain: Box<NodeRenderer>, }, Physics { site: SiteId, from: i64, args: Vec<NodeRenderer>, },
}
Expand description

Every closed form-typed subterm was collapsed to a buffer, inlined or held as a formula before this tree was built, so there is no oscillator, no series and no delta here.

Variants§

§

Const(f64)

§

Time

§

Wrap(Wrap)

§

Read

Fields

§slot: Slot
§map: Map
§

Formula

A closed form at the instant time names, width components wide.

Fields

§formula: Formula
§width: usize
§

Noise(u64)

§

Indexed

The stored sample at the integer index names, within reach of the sample being written where that is known.

Fields

§slot: Slot
§index: Index
§reach: Option<(i64, i64)>
§

Instant(Index)

The instant of the sample index names.

§

Add(Vec<NodeRenderer>)

§

Mul(Vec<NodeRenderer>)

§

Sub(Box<NodeRenderer>, Box<NodeRenderer>)

§

Div(Box<NodeRenderer>, Box<NodeRenderer>)

§

Pow(Box<NodeRenderer>, Box<NodeRenderer>)

§

Map(Unary, Box<NodeRenderer>)

§

Zip(Binary, Box<NodeRenderer>, Box<NodeRenderer>)

§

Crop

x over the samples window holds, the instants [a, b) it was written as, with a raised-cosine rise and fall inside it; zero at every sample outside.

Fields

§window: (i64, i64)
§rise: f64
§fall: f64
§

Join(Vec<NodeRenderer>)

§

Channel

§

Filter

Zero, stepping nothing, before from, where its state starts.

§

Physics

Fields

§site: SiteId
§from: i64

Implementations§

Source§

impl NodeRenderer

Source

pub fn spans( &self, layout: &Layout, (from, to): (i64, i64), live: &[Extent], ) -> Result<Vec<Span>, SampleError>

[from, to) cut where the dead reads or shut crops change, each span pruned; any cut of a run writes the same bits.

Source

pub fn stepwise(&self, beside: &dyn Fn(Slot) -> bool) -> NodeRenderer

Each index read no reach bounds held to the samples up to the one being written, all a machine stepping beside its source has, where beside names that source.

Source

pub fn ops(&self, layout: &Layout) -> Result<usize, SampleError>

One per op, and a formula’s own.

Source§

impl NodeRenderer

Source

pub fn stateless(&self) -> bool

Holds no call site and reads none of its own past, so skipping a sample of it changes no later one.

Trait Implementations§

Source§

impl Clone for NodeRenderer

Source§

fn clone(&self) -> Self

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 NodeRenderer

Source§

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

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

impl PartialEq for NodeRenderer

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NodeRenderer

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.