Class handling Midi input and output.
More...
#include <midi.h>
Class handling Midi input and output.
Definition at line 39 of file midi.h.
Constructor without functionality.
Definition at line 36 of file midi.cpp.
void Midi::acDeviceDeleted |
( |
const QMidiDeviceInfo |
info, |
|
|
QMidi::Mode |
mode |
|
) |
| |
|
privateslot |
Private slot: Automatically connected device deleted (disconnected)
- Parameters
-
info | : QMidiDeviceInfo containing information about the deleted device |
mode | : Input or output mode |
Definition at line 321 of file midi.cpp.
void Midi::acInputDeviceCreated |
( |
const QMidiDevice * |
dev | ) |
|
|
privateslot |
Private slot: Automatically connected input device created.
- Parameters
-
dev | : Pointer to the created device |
Definition at line 284 of file midi.cpp.
void Midi::acOutputDeviceCreated |
( |
const QMidiDevice * |
dev | ) |
|
|
privateslot |
Private slot: Automatically connected output device created.
- Parameters
-
dev | : Pointer to the created device |
Definition at line 302 of file midi.cpp.
void Midi::disconnectInput |
( |
| ) |
|
|
private |
Disconnect current input device.
Definition at line 362 of file midi.cpp.
void Midi::disconnectOutput |
( |
| ) |
|
|
private |
Disconnect current output device.
Definition at line 381 of file midi.cpp.
int Log::getVerbosity |
( |
| ) |
|
|
inherited |
Get the actual verbosity level.
- Returns
- : Verbosity level (1...4)
Definition at line 118 of file log.cpp.
bool Midi::init |
( |
QObject * |
qml | ) |
|
Initialize the Midi wrapper and connect it with Qml.
- Parameters
-
qml | : Pointer to qml root object |
- Returns
- true
Definition at line 76 of file midi.cpp.
void Midi::inputDeviceAttached |
( |
const QMidiDeviceInfo |
info | ) |
|
|
privateslot |
Private slot: Input device attached.
- Parameters
-
info | : QMidiDeviceInfo holding information about the new device |
Definition at line 152 of file midi.cpp.
void Midi::inputDeviceCreated |
( |
const QMidiInput * |
device | ) |
|
|
privateslot |
Private slot: Input device created (connected)
This slot is called when an input Midi device is connected.
- Parameters
-
device | : Pointer to the device |
Definition at line 217 of file midi.cpp.
void Midi::inputDeviceDeleted |
( |
QMidiDeviceInfo |
info | ) |
|
|
privateslot |
Private slot: Input device deleted (disconnected)
This slot is called when an input Midi device is connected.
- Parameters
-
Definition at line 253 of file midi.cpp.
void Midi::inputDeviceDetached |
( |
const QMidiDeviceInfo |
info | ) |
|
|
privateslot |
Private slot: Input device detached.
- Parameters
-
info | : QMidiDeviceInfo holding information about the removed device |
Definition at line 184 of file midi.cpp.
void Midi::onCurrentInputDeviceChanged |
( |
QVariant |
device | ) |
|
|
signal |
void Midi::onCurrentOutputDeviceChanged |
( |
QVariant |
device | ) |
|
|
signal |
void Midi::onInputDevicesChanged |
( |
QVariant |
devices | ) |
|
|
signal |
void Midi::onOutputDevicesChanged |
( |
QVariant |
devices | ) |
|
|
signal |
void Midi::onStatusChanged |
( |
| ) |
|
|
signal |
void Midi::outputDeviceAttached |
( |
const QMidiDeviceInfo |
info | ) |
|
|
privateslot |
Private slot: Output device attached.
- Parameters
-
info | : QMidiDeviceInfo holding information about the new device |
Definition at line 168 of file midi.cpp.
void Midi::outputDeviceCreated |
( |
const QMidiOutput * |
device | ) |
|
|
privateslot |
Private slot: Output device created (connected)
This slot is called when an output Midi device is connected.
- Parameters
-
device | : Pointer to the device |
Definition at line 235 of file midi.cpp.
void Midi::outputDeviceDeleted |
( |
QMidiDeviceInfo |
info | ) |
|
|
privateslot |
Private slot: Output device deleted (disconnected)
This slot is called when an output Midi device is connected.
- Parameters
-
Definition at line 269 of file midi.cpp.
void Midi::outputDeviceDetached |
( |
const QMidiDeviceInfo |
info | ) |
|
|
privateslot |
Private slot: Output device detached.
- Parameters
-
info | : QMidiDeviceInfo holding information about the removed device |
Definition at line 200 of file midi.cpp.
void Midi::receivedMidiMessage |
( |
const QMidiMessage & |
event | ) |
|
|
signal |
void Midi::receiveMessage |
( |
const QMidiMessage & |
m | ) |
|
|
privateslot |
Private slot: Receiving a Midi message from an external Midi device.
Forwards the message to the corresponding signal. If the verbosity is sufficiently high the message is sent in hexadecimal numbers to qDebug()
- Parameters
-
m | : QMidiMessage that was received. |
Definition at line 338 of file midi.cpp.
void Midi::selectInputDevice |
( |
QString |
deviceName | ) |
|
|
privateslot |
Select the input device from a given device name.
This function is needed for Qml. In contrast to ordinary widgets, where we can store the device info in the combo box as user data, the Qml combo boxes can only store a 'model' in form of a QStringList. This function selects the input device for a given deviceName.
- Parameters
-
deviceName | : String of the device name |
Definition at line 405 of file midi.cpp.
void Midi::selectOutputDevice |
( |
QString |
deviceName | ) |
|
|
privateslot |
Select the output device from a given device name.
This function is needed for Qml. In contrast to ordinary widgets, where we can store the device info in the combo box as user data, the Qml combo boxes can only store a 'model' in form of a QStringList. This function selects the output device for a given deviceName.
- Parameters
-
deviceName | : String of the device name |
Definition at line 439 of file midi.cpp.
void Midi::sendMidiEventToOutputDevice |
( |
const QMidiMessage & |
event | ) |
|
|
signal |
void Midi::sendMidiMessage |
( |
const QMidiMessage & |
event | ) |
|
|
slot |
Send a Midi message to the output device.
This function forwards a QMidiMessage to QMidi-Output. Moreover, if the verbosity is high, the hexadecimal numbers of the message will be sent to qDebug().
- Parameters
-
event | : qMidiMessage structure holding a Midi message |
Definition at line 126 of file midi.cpp.
void Midi::setAutomaticInputMode |
( |
bool |
autoconnect | ) |
|
|
privateslot |
void Midi::setAutomaticOutputMode |
( |
bool |
autoconnect | ) |
|
|
privateslot |
Set automatic output mode.
- Parameters
-
autoconnect | : true = automatic, false = manual |
Definition at line 485 of file midi.cpp.
void Log::setVerbosity |
( |
int |
verbosity | ) |
|
|
inherited |
Set the verbosity level of the class-specific messages.
- Parameters
-
verbosity | : Verbosity level (1...4) |
Definition at line 107 of file log.cpp.
void Midi::updateAvailableDevices |
( |
QMidi::Mode |
mode | ) |
|
|
private |
Update the shown available devices.
- Parameters
-
Definition at line 500 of file midi.cpp.
QMidiAutoConnector* Midi::pConnector |
|
private |
QMidiInput* Midi::pCurrentInputDevice |
|
private |
QMidiOutput* Midi::pCurrentOutputDevice |
|
private |
The documentation for this class was generated from the following files: