Struct jack::TransportBBT [−][src]
Transport Bar Beat Tick data.
Fields
bar: usize
Time signature bar, 1 or more.
beat: usize
Time signature beat, 1 <= beat <= sig_num.
tick: usize
sig_num: f32
Time Signature “numerator”. Jack calls this beats_per_bar
.
sig_denom: f32
Time Signature “denominator”. Jack calls this beat_type
.
ticks_per_beat: f64
Number of ticks within a beat.
Remarks
- Usually a moderately large integer with many denominators, such as 1920.0
bpm: f64
BPM, quantized to block size. This means when the tempo is not constant within this block, the BPM value should adapted to compensate for this. This is different from most fields in this struct, which specify the value at the beginning of the block rather than an average.
bar_start_tick: f64
Number of ticks that have elapsed between frame 0 and the first beat of the current measure.
Implementations
impl TransportBBT
[src]
pub fn with_bbt<'a>(
&'a mut self,
bar: usize,
beat: usize,
tick: usize
) -> &'a mut Self
[src]
&'a mut self,
bar: usize,
beat: usize,
tick: usize
) -> &'a mut Self
Set bar, beat, tick
Example
use jack::TransportBBT; let bbt = TransportBBT::default().with_bbt(4, 2, 14).validated(); assert!(bbt.is_ok()); let bbt = bbt.unwrap(); assert_eq!(bbt.bar, 4); assert_eq!(bbt.beat, 2); assert_eq!(bbt.tick, 14);
pub fn with_bpm<'a>(&'a mut self, bpm: f64) -> &'a mut Self
[src]
Set Beats Per Minute.
pub fn with_timesig<'a>(&'a mut self, num: f32, denom: f32) -> &'a mut Self
[src]
Set the time signature.
pub fn with_ticks_per_beat<'a>(
&'a mut self,
ticks_per_beat: f64
) -> &'a mut Self
[src]
&'a mut self,
ticks_per_beat: f64
) -> &'a mut Self
Set ticks per beat.
pub fn with_bar_start_tick<'a>(&'a mut self, tick: f64) -> &'a mut Self
[src]
Set bar start tick.
pub fn validated<'a>(&'a self) -> Result<Self, TransportBBTValidationError>
[src]
Validate contents.
pub fn valid(&self) -> bool
[src]
Trait Implementations
impl Clone for TransportBBT
[src]
fn clone(&self) -> TransportBBT
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TransportBBT
[src]
impl Debug for TransportBBT
[src]
impl Default for TransportBBT
[src]
impl PartialEq<TransportBBT> for TransportBBT
[src]
fn eq(&self, other: &TransportBBT) -> bool
[src]
fn ne(&self, other: &TransportBBT) -> bool
[src]
impl StructuralPartialEq for TransportBBT
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransportBBT
impl Send for TransportBBT
impl Sync for TransportBBT
impl Unpin for TransportBBT
impl UnwindSafe for TransportBBT
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,