#include "transport.hh"
Public Member Functions | |
void | advance (uint nsamples) |
AudioTransport (SpeakerArrangement speakerarrangement, uint samplerate) | |
bool | running () const |
void | running (bool r) |
int64 | sample_from_tick (int64 tick) const |
int64 | sample_to_tick (int64 sample) const |
void | set_beat (TickSignature::Beat b) |
void | set_tick (int64 newtick) |
void | tempo (const TickSignature &ticksignature) |
void | tempo (double newbpm, uint8 newnumerator, uint8 newdenominator) |
void | update_current () |
Public Attributes | |
int32 | current_bar |
int64 | current_bar_tick |
int8 | current_beat |
float | current_bpm |
int64 | current_frame |
int32 | current_minutes |
double | current_seconds |
double | current_semiquaver |
int64 | current_tick |
const double | inyquist |
const double | isamplerate |
int64 | next_bar_tick |
const uint | nyquist |
const uint | samplerate |
const SpeakerArrangement | speaker_arrangement |
TickSignature | tick_sig |
Static Public Attributes | |
static constexpr int64 | ppqn |
Transport information for AudioSignal processing.
|
explicit |
bool running | ( | ) | const |
void running | ( | bool | r | ) |
void tempo | ( | const TickSignature & | ticksignature | ) |
void set_tick | ( | int64 | newtick | ) |
void set_beat | ( | TickSignature::Beat | b | ) |
void advance | ( | uint | nsamples | ) |
void update_current | ( | ) |
|
staticconstexpr |
const uint samplerate |
Sample rate (mixing frequency) in Hz used for rendering.
const uint nyquist |
Half the `samplerate`.
const double isamplerate |
Precalculated `1.0 / samplerate`.
const double inyquist |
Precalculated `1.0 / nyquist`.
const SpeakerArrangement speaker_arrangement |
Audio output configuration.
TickSignature tick_sig |
int64 current_frame |
Number of sample frames processed since playback start.
int64 current_tick |
int32 current_bar |
Bar of *current_tick* position.
int8 current_beat |
Beat within bar of *current_tick* position.
double current_semiquaver |
The sixteenth with fraction within beat.
float current_bpm |
Running tempo in beats per minute.
int32 current_minutes |
Minute of *current_tick* position.
double current_seconds |
Seconds of *current_tick* position.
int64 current_bar_tick |
int64 next_bar_tick |