Struct redact_composer_musical::TimeSignature
source · pub struct TimeSignature {
pub beats_per_bar: i32,
pub beat_length: i32,
}
Expand description
A musical time signature as a combination of beats per bar, and beat length.
Fields§
§beats_per_bar: i32
The number of beats per bar.
beat_length: i32
How many ticks a beat represents.
Implementations§
source§impl TimeSignature
impl TimeSignature
sourcepub fn half_beats(&self, n: i32) -> i32
pub fn half_beats(&self, n: i32) -> i32
The length of n
half-beats in ticks.
sourcepub fn half_triplet(&self) -> i32
pub fn half_triplet(&self) -> i32
Length of a half-triplet in ticks. (1/3 of a beat)
sourcepub fn half_triplets(&self, n: i32) -> i32
pub fn half_triplets(&self, n: i32) -> i32
The length of n
half-triplets in ticks.
sourcepub fn quarter_beat(&self) -> i32
pub fn quarter_beat(&self) -> i32
Length of a quarter-beat in ticks.
sourcepub fn quarter_beats(&self, n: i32) -> i32
pub fn quarter_beats(&self, n: i32) -> i32
The length of n
quarter-beats in ticks.
sourcepub fn eighth_beat(&self) -> i32
pub fn eighth_beat(&self) -> i32
Length of an eighth-beat in ticks.
sourcepub fn eighth_beats(&self, n: i32) -> i32
pub fn eighth_beats(&self, n: i32) -> i32
The length of n
eighth-beats in ticks.
Trait Implementations§
source§impl Clone for TimeSignature
impl Clone for TimeSignature
source§fn clone(&self) -> TimeSignature
fn clone(&self) -> TimeSignature
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TimeSignature
impl Debug for TimeSignature
impl Copy for TimeSignature
Auto Trait Implementations§
impl Freeze for TimeSignature
impl RefUnwindSafe for TimeSignature
impl Send for TimeSignature
impl Sync for TimeSignature
impl Unpin for TimeSignature
impl UnwindSafe for TimeSignature
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