drumstick
1.1.0
|
Queue tempo container. More...
#include <alsaqueue.h>
Public Member Functions | |
QueueTempo () | |
Default constructor. | |
QueueTempo (const QueueTempo &other) | |
Copy constructor. More... | |
QueueTempo (snd_seq_queue_tempo_t *other) | |
Constructor. More... | |
virtual | ~QueueTempo () |
Destructor. | |
QueueTempo * | clone () |
Copy the current object returning the copied object. More... | |
QueueTempo & | operator= (const QueueTempo &other) |
Assignment operator. More... | |
int | getInfoSize () const |
Gets the size of the ALSA queue tempo object. More... | |
int | getId () |
Gets the queue's numeric identifier. More... | |
int | getPPQ () |
Gets the PPQ (parts per quarter note) resolution of the queue. More... | |
unsigned int | getSkewValue () |
Gets the tempo skew numerator. More... | |
unsigned int | getSkewBase () |
Gets the tempo skew base. More... | |
unsigned int | getTempo () |
Gets the queue's tempo in microseconds per beat. More... | |
void | setPPQ (int value) |
Sets the queue resolution in parts per quarter note. More... | |
void | setSkewValue (unsigned int value) |
Sets the tempo skew numerator. More... | |
void | setTempo (unsigned int value) |
Sets the queue tempo in microseconds per beat. More... | |
float | getNominalBPM () |
Gets the queue's nominal BPM tempo (in beats per minute) More... | |
float | getRealBPM () |
Gets the queue's real BPM tempo in beats per minute. More... | |
void | setTempoFactor (float value) |
Sets the queue's tempo skew factor. More... | |
void | setNominalBPM (float value) |
Sets the queue's nominal tempo in BPM (beats per minute). More... | |
Protected Member Functions | |
void | setSkewBase (unsigned int value) |
Sets the tempo skew base. More... | |
Queue tempo container.
This class is used to hold some tempo properties of an ALSA queue object. The queue's resolution defines the meaning of the musical time, in ticks. It is expressed in PPQ (parts per quarter), or ticks in a quarter note (crotchet). The nominal tempo is usually expressed in BPM (beats per minute), or Maelzel metronome units. It can be also given in microseconds per beat. The tempo skew factor is given as two integer numbers: skew value and skew base, being the factor the quotient of both quantities = value / base. Currently (ALSA <= 1.0.20) you can only use the base constant 0x10000 (decimal 65536).
Definition at line 117 of file alsaqueue.h.
QueueTempo | ( | const QueueTempo & | other | ) |
Copy constructor.
other | An existing QueueTempo object reference |
Definition at line 355 of file alsaqueue.cpp.
QueueTempo | ( | snd_seq_queue_tempo_t * | other | ) |
Constructor.
other | An ALSA queue tempo object pointer |
Definition at line 345 of file alsaqueue.cpp.
QueueTempo * clone | ( | ) |
Copy the current object returning the copied object.
Definition at line 373 of file alsaqueue.cpp.
int getId | ( | ) |
Gets the queue's numeric identifier.
Definition at line 393 of file alsaqueue.cpp.
int getInfoSize | ( | ) | const |
Gets the size of the ALSA queue tempo object.
Definition at line 525 of file alsaqueue.cpp.
float getNominalBPM | ( | ) |
Gets the queue's nominal BPM tempo (in beats per minute)
Definition at line 483 of file alsaqueue.cpp.
int getPPQ | ( | ) |
Gets the PPQ (parts per quarter note) resolution of the queue.
Definition at line 402 of file alsaqueue.cpp.
float getRealBPM | ( | ) |
Gets the queue's real BPM tempo in beats per minute.
The result is equal to the nominal BPM tempo multiplied by the skew factor.
Definition at line 496 of file alsaqueue.cpp.
References SKEW_BASE.
unsigned int getSkewBase | ( | ) |
Gets the tempo skew base.
The real skew factor is the quotient of the skew value divided by the skew base.
Definition at line 424 of file alsaqueue.cpp.
unsigned int getSkewValue | ( | ) |
Gets the tempo skew numerator.
The real skew factor is the quotient of this value divided by the skew base.
Definition at line 413 of file alsaqueue.cpp.
unsigned int getTempo | ( | ) |
Gets the queue's tempo in microseconds per beat.
Definition at line 433 of file alsaqueue.cpp.
QueueTempo & operator= | ( | const QueueTempo & | other | ) |
Assignment operator.
other | An existing QueueTempo object reference |
Definition at line 383 of file alsaqueue.cpp.
void setNominalBPM | ( | float | value | ) |
Sets the queue's nominal tempo in BPM (beats per minute).
value | The nominal tempo in BPM (beats per minute). |
Definition at line 516 of file alsaqueue.cpp.
void setPPQ | ( | int | value | ) |
Sets the queue resolution in parts per quarter note.
value | The queue resolution in PPQ. |
Definition at line 442 of file alsaqueue.cpp.
|
protected |
Sets the tempo skew base.
The real skew factor is the quotient of the skew value divided by the skew base.
value | The tempo skew base. |
Definition at line 465 of file alsaqueue.cpp.
void setSkewValue | ( | unsigned int | value | ) |
Sets the tempo skew numerator.
The real skew factor is the quotient of this value divided by the skew base.
value | The tempo skew numerator. |
Definition at line 453 of file alsaqueue.cpp.
void setTempo | ( | unsigned int | value | ) |
Sets the queue tempo in microseconds per beat.
value | The tempo in microseconds per beat |
Definition at line 474 of file alsaqueue.cpp.
void setTempoFactor | ( | float | value | ) |
Sets the queue's tempo skew factor.
value | The tempo skew factor. |
Definition at line 506 of file alsaqueue.cpp.
References SKEW_BASE.