Mixxx
|
#include <mididevice.h>
Public Slots | |
void | disableMidiLearn () |
void | enableMidiLearn () |
Signals | |
void | midiEvent (MidiMessage message) |
void | callMidiScriptFunction (QString function, char channel, char control, char value, MidiStatusByte status, QString group) |
Public Member Functions | |
MidiDevice (MidiMapping *mapping) | |
virtual | ~MidiDevice () |
virtual int | open ()=0 |
virtual int | close ()=0 |
virtual void | run ()=0 |
void | startup () |
void | shutdown () |
bool | isOpen () |
bool | isOutputDevice () |
bool | isInputDevice () |
QString | getName () |
void | setMidiMapping (MidiMapping *mapping) |
MidiMapping * | getMidiMapping () |
Q_INVOKABLE void | sendShortMsg (unsigned char status, unsigned char byte1, unsigned char byte2) |
virtual void | sendShortMsg (unsigned int word) |
virtual void | sendSysexMsg (unsigned char data[], unsigned int length) |
Q_INVOKABLE void | sendSysexMsg (QList< int > data, unsigned int length) |
bool | getMidiLearnStatus () |
void | receive (MidiStatusByte status, char channel, char control, char value) |
bool | midiDebugging () |
void | setReceiveInhibit (bool inhibit) |
Protected Attributes | |
QString | m_strDeviceName |
bool | m_bIsOutputDevice |
bool | m_bIsInputDevice |
MidiMapping * | m_pMidiMapping |
bool | m_bIsOpen |
bool | m_bMidiLearn |
MidiDevice * | m_pCorrespondingOutputDevice |
bool | m_midiDebug |
QMutex | m_mutex |
QMutex | m_mappingPtrMutex |
bool | m_bReceiveInhibit |
SoftTakeover | m_st |
Definition at line 44 of file mididevice.h.
MidiDevice::MidiDevice | ( | MidiMapping * | mapping | ) |
MidiDevice::~MidiDevice | ( | ) | [virtual] |
Definition at line 60 of file mididevice.cpp.
void MidiDevice::callMidiScriptFunction | ( | QString | function, |
char | channel, | ||
char | control, | ||
char | value, | ||
MidiStatusByte | status, | ||
QString | group | ||
) | [signal] |
virtual int MidiDevice::close | ( | ) | [pure virtual] |
Implemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.
void MidiDevice::disableMidiLearn | ( | ) | [slot] |
Definition at line 167 of file mididevice.cpp.
void MidiDevice::enableMidiLearn | ( | ) | [slot] |
Definition at line 157 of file mididevice.cpp.
bool MidiDevice::getMidiLearnStatus | ( | ) |
Definition at line 150 of file mididevice.cpp.
MidiMapping* MidiDevice::getMidiMapping | ( | ) | [inline] |
QString MidiDevice::getName | ( | ) | [inline] |
bool MidiDevice::isInputDevice | ( | ) | [inline] |
bool MidiDevice::isOpen | ( | ) | [inline] |
bool MidiDevice::isOutputDevice | ( | ) | [inline] |
bool MidiDevice::midiDebugging | ( | ) |
Specifies whether or not we should dump MIDI messages to the console at runtime. This is useful for end-user debugging and to help people map their controllers.
Definition at line 361 of file mididevice.cpp.
void MidiDevice::midiEvent | ( | MidiMessage | message | ) | [signal] |
virtual int MidiDevice::open | ( | ) | [pure virtual] |
Implemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.
void MidiDevice::receive | ( | MidiStatusByte | status, |
char | channel, | ||
char | control, | ||
char | value | ||
) |
Definition at line 177 of file mididevice.cpp.
virtual void MidiDevice::run | ( | ) | [pure virtual] |
Implemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.
void MidiDevice::sendShortMsg | ( | unsigned int | word | ) | [virtual] |
Reimplemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.
Definition at line 124 of file mididevice.cpp.
void MidiDevice::sendShortMsg | ( | unsigned char | status, |
unsigned char | byte1, | ||
unsigned char | byte2 | ||
) |
void MidiDevice::sendSysexMsg | ( | QList< int > | data, |
unsigned int | length | ||
) |
void MidiDevice::sendSysexMsg | ( | unsigned char | data[], |
unsigned int | length | ||
) | [virtual] |
Reimplemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.
Definition at line 146 of file mididevice.cpp.
void MidiDevice::setMidiMapping | ( | MidiMapping * | mapping | ) |
Definition at line 104 of file mididevice.cpp.
void MidiDevice::setReceiveInhibit | ( | bool | inhibit | ) |
void MidiDevice::shutdown | ( | ) |
Definition at line 80 of file mididevice.cpp.
void MidiDevice::startup | ( | ) |
Definition at line 70 of file mididevice.cpp.
bool MidiDevice::m_bIsInputDevice [protected] |
Flag indicating if this device supports MIDI input
Definition at line 90 of file mididevice.h.
bool MidiDevice::m_bIsOpen [protected] |
Indicates whether or not the MIDI device has been opened for input/output.
Definition at line 94 of file mididevice.h.
bool MidiDevice::m_bIsOutputDevice [protected] |
Flag indicating if this device supports MIDI output
Definition at line 88 of file mididevice.h.
bool MidiDevice::m_bMidiLearn [protected] |
Indicates whether MIDI learning is currently enabled or not
Definition at line 96 of file mididevice.h.
bool MidiDevice::m_bReceiveInhibit [protected] |
A flag to inhibit the reception of messages from this device. This is used to prevent a race condition when a MIDI message is received and looked up in the MidiMapping while the MidiMapping is being modified (and is already locked).
Definition at line 111 of file mididevice.h.
QMutex MidiDevice::m_mappingPtrMutex [protected] |
Mutex to protect against concurrent access to the m_pMidiMapping _pointer. Note that MidiMapping itself is thread-safe, so we just need to protect the pointer!.
Definition at line 107 of file mididevice.h.
bool MidiDevice::m_midiDebug [protected] |
Specifies whether or not we should dump MIDI messages to the console at runtime. This is useful for end-user debugging and to help people map their controllers.
Definition at line 103 of file mididevice.h.
QMutex MidiDevice::m_mutex [protected] |
Mutex to protect against concurrent access to member variables
Reimplemented in MidiDeviceHss1394, and MidiDevicePortMidi.
Definition at line 105 of file mididevice.h.
MidiDevice* MidiDevice::m_pCorrespondingOutputDevice [protected] |
Pointer to the output device that corresponds to this physical input device. MIDI is a half-duplex protocol that treats input and output ports on a single device as complete separate entities. This helps us group those back together for sanity/usability.
Definition at line 100 of file mididevice.h.
MidiMapping* MidiDevice::m_pMidiMapping [protected] |
MIDI Mapping for this MIDI device, maps MIDI messages onto Mixxx controls
Definition at line 92 of file mididevice.h.
SoftTakeover MidiDevice::m_st [protected] |
Definition at line 112 of file mididevice.h.
QString MidiDevice::m_strDeviceName [protected] |
Verbose device name, in format "[index]. [device name]". Suitable for display in GUI.
Definition at line 86 of file mididevice.h.