pub enum Music {
Note(Note),
Rest(Rest),
Par(Par),
Seq(Seq),
Chord(Chord),
Melody(Melody),
Progression(Progression),
Counterpoint(Counterpoint),
PianoRoll(PianoRoll),
Arranger(Arranger),
MidiTrack(MidiTrackObj),
MidiFile(MidiFileObj),
}Expand description
The unified musical value: any node that can appear in a Score body.
Variants§
Note(Note)
A single note.
Rest(Rest)
A rest.
Par(Par)
Parallel composition of children.
Seq(Seq)
Sequential composition of children.
Chord(Chord)
A chord.
Melody(Melody)
A monophonic melody line.
Progression(Progression)
A chord progression.
Counterpoint(Counterpoint)
Multiple voices in counterpoint.
PianoRoll(PianoRoll)
A piano-roll grid.
Arranger(Arranger)
An arranger timeline.
MidiTrack(MidiTrackObj)
A raw MIDI track.
MidiFile(MidiFileObj)
A complete MIDI file.
Trait Implementations§
Source§impl MusicObject for Music
impl MusicObject for Music
Source§impl Playable for Music
impl Playable for Music
Source§fn describe(&self) -> Result<PlayableDescriptor>
fn describe(&self) -> Result<PlayableDescriptor>
Returns the static descriptor for this playable.
Source§fn render_range(&self, cx: &PlayContext) -> Result<PlayStream>
fn render_range(&self, cx: &PlayContext) -> Result<PlayStream>
Renders the playable over the context’s time range into a stream.
Source§fn freeze(&self, cx: &PlayContext) -> Result<FrozenPlayable>
fn freeze(&self, cx: &PlayContext) -> Result<FrozenPlayable>
Renders and captures the playable into a
FrozenPlayable.Source§fn prepare(&mut self, _cx: &PlayContext) -> Result<()>
fn prepare(&mut self, _cx: &PlayContext) -> Result<()>
Prepares the playable for rendering under
cx; defaults to a no-op.Source§fn render_preview(&self, cx: &PlayContext) -> Result<PlayStream>
fn render_preview(&self, cx: &PlayContext) -> Result<PlayStream>
Renders a preview stream; defaults to
Playable::render_range.Source§fn as_shape(&self) -> PlayableShape
fn as_shape(&self) -> PlayableShape
Returns the object shape; defaults to
PlayableShape::music_object.Auto Trait Implementations§
impl !RefUnwindSafe for Music
impl !UnwindSafe for Music
impl Freeze for Music
impl Send for Music
impl Sync for Music
impl Unpin for Music
impl UnsafeUnpin for Music
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