Just Intonation
Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
|
Create a data log of keypress and tuning events. More...
#include <logfile.h>
Public Slots | |
void | activateLogFile (bool on) |
Switch logging on and off. More... | |
void | receiveMidiEvent (QMidiMessage event) |
Public slot: Receive MIDI event. More... | |
void | receiveTuningCorrections (const QMap< int, double > &corrections) |
Public slot: Receive tuning corrections. More... | |
Signals | |
void | signalNewLogMessage (QVariant str) |
Public Member Functions | |
LogFile () | |
Constructor of the LogFile, resets member variables. More... | |
void | setVerbosity (int verbosity) |
Set the verbosity level of the class-specific messages. More... | |
int | getVerbosity () |
Get the actual verbosity level. More... | |
Private Member Functions | |
QString | noteName (int key) |
Note Name of a key. More... | |
void | addLine (quint64 milliseconds, const QString &line) |
Add a line to the logfile output. More... | |
void | registerKeypress (int key, bool pressed) |
Public slot: Register pressed or released key. More... | |
void | flushKeypress () |
Terminate collection of multiple keypresses/releases and send them to the logfile. More... | |
Private Attributes | |
QElapsedTimer | mTimer |
bool | isActive |
QList< int > | mPressed |
QList< int > | mReleased |
qint64 | mTimeOfLastKeypress |
QString | mTuningMessage |
Create a data log of keypress and tuning events.
This class produces a log of selected keypress and tuning events.
LogFile::LogFile | ( | ) |
Constructor of the LogFile, resets member variables.
Definition at line 36 of file logfile.cpp.
|
slot |
Switch logging on and off.
on | : true = on, false = off |
Definition at line 57 of file logfile.cpp.
|
private |
Add a line to the logfile output.
milliseconds | : The actual time since startup in milliseconds |
line | : String containing the text to be sent to the logfile |
Definition at line 161 of file logfile.cpp.
|
private |
Terminate collection of multiple keypresses/releases and send them to the logfile.
Definition at line 209 of file logfile.cpp.
|
inherited |
|
private |
Note Name of a key.
key | : Number of the key (0..127) |
Definition at line 74 of file logfile.cpp.
|
slot |
Public slot: Receive MIDI event.
This is the first main input slot of the class. It receieves MIDI events indicating whether a key on the keyboard has been pressed or released.
event | : A Midi message containing data about keypresses |
Definition at line 92 of file logfile.cpp.
|
slot |
Public slot: Receive tuning corrections.
This slot receives the tuning corrections from the tuner and sends them to the log file output. Only the first and the last tuning correction after a keypress or release are sent to the output while all adiabatically equilibrating tuning corrections in between are suppressed in order to keep the output compact.
corrections | : Map containing <key,cent> microtuning pairs |
Definition at line 124 of file logfile.cpp.
|
private |
Public slot: Register pressed or released key.
This function registers newly pressed and released keys. If there have been suppressed tuning messages before the last one will be sent to the output as well. Multiple keypresses at the same time (in the resolution of milliseconds) will be collected in a single line. When the collection process is finished the function flushKeypress() is called.
key | : Number of the key |
pressed | : pressed = true, released = false |
Definition at line 186 of file logfile.cpp.
|
inherited |
|
signal |
Signal sending a new string to the Qml output text area