Struct jack::TransportBBT [−][src]
pub struct TransportBBT {
pub bar: usize,
pub beat: usize,
pub tick: usize,
pub sig_num: f32,
pub sig_denom: f32,
pub ticks_per_beat: f64,
pub bpm: f64,
pub bar_start_tick: f64,
}
Expand description
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
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);
Set the time signature.
Set ticks per beat.
Set bar start tick.
Validate contents.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more