MelLoop

Type Alias MelLoop 

Source
pub type MelLoop<K, D, F> = Loop<Polyphony<K, <F as Map>::Output>, NoteReader<K, D, F>>;
Expand description

A melody that loops.

Aliased Type§

pub struct MelLoop<K, D, F> { /* private fields */ }

Implementations§

Source§

impl<K: Eq + Hash + Clone, D: Clone, F: Map<Input = D>> MelLoop<K, D, F>
where F::Output: Frequency + Stop + Done,

Source

pub fn new_note_reader( times: Vec<Time>, note_reader: NoteReader<K, D, F>, ) -> Self

Turns a NoteReader into a [MelodyLoop].

Source

pub fn new_melody(melody: Melody<K, D>, func: F) -> Self

Initializes a new [MelodyLoop] from a Melody.

The passed function builds signals from the given note data.

Source

pub const fn note_reader(&self) -> &NoteReader<K, D, F>

Returns a reference to the underlying NoteReader.

Source

pub fn note_reader_mut(&mut self) -> &mut NoteReader<K, D, F>

Returns a mutable reference to the underlying NoteReader.