pub struct PlaybackEvent {Show 21 fields
pub address: Option<String>,
pub source: Option<NoteAddr>,
pub source_voice_number: Option<u32>,
pub time_beats: f64,
pub time_secs: f64,
pub pitch_midi: u8,
pub pitch_midi_cents: i32,
pub pitch_bend_curve: Vec<GuitarBendPoint>,
pub post_note_pause_beats: f64,
pub articulations: Vec<Articulation>,
pub chord_symbol: Option<ChordSymbol>,
pub guitar_technique: Option<GuitarTechnique>,
pub velocity: u8,
pub duration_beats: f64,
pub duration_secs: f64,
pub pedal: bool,
pub part_index: usize,
pub channel: u8,
pub program: u8,
pub instrument_id: Option<String>,
pub is_metronome: bool,
}Expand description
A single sounding event suitable for audio playback engines (e.g. Web Audio, Tone.js).
Grace notes and rests are excluded. Chords are expanded to one event per pitch.
Fields§
§address: Option<String>Stable source note address (part:staff:measure:voice:note), or None for metronome events.
Chord pitches share the address of their source note.
source: Option<NoteAddr>Typed source address for notation hosts; None for metronome events.
source_voice_number: Option<u32>Original MusicXML voice number when the source used a non-default identifier.
source remains the stable four-slot canonical address used by editing APIs.
time_beats: f64Absolute beat position from the start of the score.
time_secs: f64Absolute time in seconds from the start of the score.
pitch_midi: u8MIDI pitch number (0–127).
pitch_midi_cents: i32Exact sounding pitch in hundredths of a MIDI semitone.
pitch_midi is retained as a compatibility convenience for integer-MIDI hosts;
microtonal-capable hosts should use this field.
pitch_bend_curve: Vec<GuitarBendPoint>Authored normalized pitch-bend curve for a bend-capable host. Each point is relative to
pitch_midi_cents and positioned within this event’s sounding duration. Empty means the
event has no authored continuous bend.
post_note_pause_beats: f64Authored pause requested after this note by a breath mark or caesura. The host decides how to realize the silence while preserving this deterministic beat-domain contract.
articulations: Vec<Articulation>Authored articulation and ornament marks for a provider to interpret. The core schedule deliberately does not invent auxiliary pitches for trill, mordent, or turn.
chord_symbol: Option<ChordSymbol>Authored chord symbol at this note position. It is a semantic cue for accompaniment or harmonic playback providers; acorde does not invent accompaniment notes.
guitar_technique: Option<GuitarTechnique>Authored guitar playing technique, when present. Providers may map this stable semantic value to keyswitches or synthesis behavior without score re-parsing.
velocity: u8MIDI velocity (1–127). Derived from Dynamic; defaults to 64.
Boosted by +20 for Accent / Marcato articulations (clamped to 127).
duration_beats: f64Sounding duration in beats. Halved for Staccato / Staccatissimo.
duration_secs: f64Sounding duration in seconds.
pedal: boolTrue when the note has pedal_start set (sustain pedal down).
part_index: usizeIndex of the part this event originates from (useful for per-channel MIDI routing).
channel: u8MIDI channel of the originating part (part.midi_channel). For Tone.js channel routing.
program: u8Effective General MIDI program after applying any measure-local instrument change.
instrument_id: Option<String>Stable effective instrument ID when the part or measure declares one.
is_metronome: booltrue for metronome click events injected via MetronomeConfig.