Struct Recipe
pub struct Recipe { /* private fields */ }Expand description
The render recipe. Recipe::current is the only constructor, so a
recipe always matches its version.
Implementations§
§impl Recipe
impl Recipe
pub fn current() -> Recipe
pub fn current() -> Recipe
Returns the recipe of RECIPE_VERSION.
- 44.1 kHz stereo, blocks of 512 samples, offline processing.
- Velocity 100. Bass plays MIDI 36, a lead or pluck MIDI 60 and a pad the triad 60, 64 and 67. Notes are MIDI numbers, because octave names differ per synth.
- The notes start at 0 s and are held 3 s. The clip is at least 4 s
and grows until the tail is over (see
TailWatch): the output stays below -96 dBFS for 1 s after the last note-off, or 30 s pass. - The pre-roll after the state load, thrown away: 0.5 s of silence, a warm-up step of 1 s with MIDI 60 at velocity 100 held for its first 0.5 s, and 0.5 s of silence again.
- Vital renders at 2x oversampling, its default, whatever the preset stores.
pub fn sample_rate(&self) -> SampleRate
pub fn sample_rate(&self) -> SampleRate
Returns the sample rate.
pub fn block_size(&self) -> u32
pub fn block_size(&self) -> u32
Returns the block size in samples.
pub fn process_mode(&self) -> ProcessMode
pub fn process_mode(&self) -> ProcessMode
Returns the process mode.
pub fn notes(&self, material: Material) -> Vec<RenderNote>
pub fn notes(&self, material: Material) -> Vec<RenderNote>
Returns the notes for material, each held from 0 s to the hold time.
pub fn vital_oversampling(&self) -> Oversampling
pub fn vital_oversampling(&self) -> Oversampling
Returns the oversampling of a Vital render.
pub fn tail_floor_gain(&self) -> f64
pub fn tail_floor_gain(&self) -> f64
The tail floor as a gain: a sample below it in every channel is quiet.
pub fn tail_cap(&self) -> Seconds
pub fn tail_cap(&self) -> Seconds
Returns how long after the last note-off a tail may sound before the clip is cut.
pub fn tail_watch(&self, notes: &[RenderNote]) -> TailWatch
pub fn tail_watch(&self, notes: &[RenderNote]) -> TailWatch
Starts a watch for the end of a clip that plays notes. The last
note-off is the latest note-off frame of super::note_events, so a
note shorter than a frame ends where its event does.
Trait Implementations§
§impl Serialize for Recipe
impl Serialize for Recipe
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Recipe
Auto Trait Implementations§
impl Freeze for Recipe
impl RefUnwindSafe for Recipe
impl Send for Recipe
impl Sync for Recipe
impl Unpin for Recipe
impl UnsafeUnpin for Recipe
impl UnwindSafe for Recipe
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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