|
hydrogen 1.1.1
|
Object holding most of the information about the transport state of the AudioEngine, like if it is playing or stopped or its current transport position and speed. More...
#include <TransportInfo.h>
Public Types | |
| enum | { STOPPED , ROLLING , BAD } |
Public Member Functions | |
| TransportInfo () | |
| Constructor of TransportInfo. More... | |
| ~TransportInfo () | |
| Destructor of TransportInfo. More... | |
| void | printInfo () |
| Displays general information about the transport state in the INFOLOG. More... | |
Public Member Functions inherited from Object | |
| ~Object () | |
| destructor More... | |
| Object (const Object &obj) | |
| copy constructor More... | |
| Object (const char *class_name) | |
| constructor More... | |
| const char * | class_name () const |
| return the class name More... | |
| virtual QString | toQString (const QString &sPrefix, bool bShort=true) const |
| Formatted string version for debugging purposes. More... | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. More... | |
Data Fields | |
| unsigned | m_status |
| Current transport status of the audio engine. More... | |
| long long | m_nFrames |
| Current transport position in number of frames since the beginning of the song. More... | |
| float | m_fTickSize |
| Number of frames that make up one tick. More... | |
| float | m_fBPM |
| Current tempo in beats per minute. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static void | set_count (bool flag) |
| enable/disable class instances counting More... | |
| static bool | count_active () |
| return true if class instances counting is enabled More... | |
| static unsigned | objects_count () |
| return the number of objects More... | |
| static void | write_objects_map_to (std::ostream &out) |
| output the full objects map to a given ostream More... | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr More... | |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! More... | |
| static Logger * | logger () |
| return the logger instance More... | |
Static Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
Object holding most of the information about the transport state of the AudioEngine, like if it is playing or stopped or its current transport position and speed.
| anonymous enum |
| TransportInfo | ( | ) |
Constructor of TransportInfo.
| ~TransportInfo | ( | ) |
Destructor of TransportInfo.
| void printInfo | ( | ) |
Displays general information about the transport state in the INFOLOG.
Prints out m_status, m_nFrames, and m_fTickSize.
| float m_fBPM |
Current tempo in beats per minute.
| float m_fTickSize |
Number of frames that make up one tick.
A tick is the most fine-grained time scale handled by the AudioEngine. The notes won't be processed frame by frame but, instead, tick by tick. Therefore, m_fTickSize represents the minimum duration of a Note as well as the minimum distance between two of them.
It will only be used by the JackAudioDriver and is calculated by the sample rate * 60.0 / ( m_fBPM * Song::__resolution ). The factor 60.0 will be used to convert the sample rate, which is given in second, into minutes (as the m_fBPM).
| long long m_nFrames |
Current transport position in number of frames since the beginning of the song.
A frame is a single sample of an audio signal. Thus, with a sample rate of 48000Hz, 48000 frames will be recorded in one second and, with a buffer size = 1024, 1024 consecutive frames will be accumulated before they are handed over to the audio engine for processing. Internally, a frame will be represented by a float.
| unsigned m_status |
Current transport status of the audio engine.
It can have three (known) states: