pub struct Score {
pub metadata: ScoreMetadata,
pub tracks: Vec<Track>,
pub master_volume: u8,
pub tempo: u16,
pub format: FileFormat,
}Expand description
Main score structure
Fields§
§metadata: ScoreMetadata§tracks: Vec<Track>§master_volume: u8§tempo: u16§format: FileFormatImplementations§
Source§impl Score
Helper function to create a basic score for testing
impl Score
Helper function to create a basic score for testing
Sourcepub fn create_test_score() -> Self
pub fn create_test_score() -> Self
Create a simple test score
Source§impl Score
impl Score
Sourcepub fn get_track_mut(&mut self, index: usize) -> Option<&mut Track>
pub fn get_track_mut(&mut self, index: usize) -> Option<&mut Track>
Get mutable track by index
Sourcepub fn get_total_beats(&self) -> u32
pub fn get_total_beats(&self) -> u32
Get total duration in beats (based on longest track)
Sourcepub fn measure_count(&self) -> usize
pub fn measure_count(&self) -> usize
Get the number of measures (based on longest track)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Score
impl RefUnwindSafe for Score
impl Send for Score
impl Sync for Score
impl Unpin for Score
impl UnwindSafe for Score
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