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>
impl<K: Eq + Hash + Clone, D: Clone, F: Map<Input = D>> MelLoop<K, D, F>
Sourcepub fn new_note_reader(
times: Vec<Time>,
note_reader: NoteReader<K, D, F>,
) -> Self
pub fn new_note_reader( times: Vec<Time>, note_reader: NoteReader<K, D, F>, ) -> Self
Turns a NoteReader into a [MelodyLoop].
Sourcepub fn new_melody(melody: Melody<K, D>, func: F) -> Self
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.
Sourcepub const fn note_reader(&self) -> &NoteReader<K, D, F>
pub const fn note_reader(&self) -> &NoteReader<K, D, F>
Returns a reference to the underlying NoteReader.
Sourcepub fn note_reader_mut(&mut self) -> &mut NoteReader<K, D, F>
pub fn note_reader_mut(&mut self) -> &mut NoteReader<K, D, F>
Returns a mutable reference to the underlying NoteReader.