pub struct PlaybackOptions {
pub bpm_override: Option<u16>,
pub muted_parts: Vec<usize>,
pub loop_region: Option<(usize, usize)>,
pub fermata_multiplier: f64,
pub swing: Option<f64>,
pub swing_unit: Duration,
pub metronome: Option<MetronomeConfig>,
}Expand description
Options for to_playback_events.
Fields§
§bpm_override: Option<u16>Replaces the score’s tempo when Some; None uses score.settings.tempo_bpm.
muted_parts: Vec<usize>Part indices to silence. Events from these parts are omitted entirely.
loop_region: Option<(usize, usize)>Restrict playback to measures in the inclusive range [start, end].
Physical measure indices (0-based). None plays the full sequence.
Events within the region start at time_beats = 0.
fermata_multiplier: f64Duration multiplier for notes with Fermata articulation. Default 1.5.
swing: Option<f64>Swing ratio for pairs of plain notes of [swing_unit] duration. None = straight.
0.67 ≈ triplet swing (2:1). Valid range: (0.5, 1.0).
Applied only to notes matching swing_unit, no tuplet, no dot.
swing_unit: DurationNote duration that swing is applied to. Defaults to Duration::Eighth.
Set to Duration::Sixteenth for Latin/funk 16th-note swing.
metronome: Option<MetronomeConfig>When Some, injects metronome click events into the event list.
Clicks are tagged with PlaybackEvent.is_metronome = true.
Trait Implementations§
Source§impl Clone for PlaybackOptions
impl Clone for PlaybackOptions
Source§fn clone(&self) -> PlaybackOptions
fn clone(&self) -> PlaybackOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more