pub struct Track {
pub name: String,
pub channel: u8,
pub measures: Vec<Measure>,
pub tuning: Vec<u8>,
pub is_percussion: bool,
pub is_twelve_string: bool,
pub capo: u8,
pub color: Option<(u8, u8, u8)>,
}Expand description
Track
Fields§
§name: String§channel: u8§measures: Vec<Measure>§tuning: Vec<u8>§is_percussion: bool§is_twelve_string: bool§capo: u8§color: Option<(u8, u8, u8)>Implementations§
Source§impl Track
impl Track
Sourcepub fn new_guitar_track(name: String) -> Self
pub fn new_guitar_track(name: String) -> Self
Create a new track with standard guitar tuning
Sourcepub fn new_bass_track(name: String) -> Self
pub fn new_bass_track(name: String) -> Self
Create a new bass track with standard bass tuning
Sourcepub fn new_percussion_track(name: String) -> Self
pub fn new_percussion_track(name: String) -> Self
Create a new percussion track
Sourcepub fn add_measure(&mut self, measure: Measure)
pub fn add_measure(&mut self, measure: Measure)
Add a measure to the track
Sourcepub fn string_count(&self) -> usize
pub fn string_count(&self) -> usize
Get the number of strings for this track
Sourcepub fn effective_tuning(&self) -> Vec<u8> ⓘ
pub fn effective_tuning(&self) -> Vec<u8> ⓘ
Get the effective tuning (accounting for capo)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnwindSafe for Track
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