Mixxx

MidiDevice Class Reference

#include <mididevice.h>

Inheritance diagram for MidiDevice:
Collaboration diagram for MidiDevice:

List of all members.

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)
MidiMappinggetMidiMapping ()
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
MidiMappingm_pMidiMapping
bool m_bIsOpen
bool m_bMidiLearn
MidiDevicem_pCorrespondingOutputDevice
bool m_midiDebug
QMutex m_mutex
QMutex m_mappingPtrMutex
bool m_bReceiveInhibit
SoftTakeover m_st

Detailed Description

Definition at line 44 of file mididevice.h.


Constructor & Destructor Documentation

MidiDevice::MidiDevice ( MidiMapping mapping)

Definition at line 36 of file mididevice.cpp.

Here is the call graph for this function:

MidiDevice::~MidiDevice ( ) [virtual]

Definition at line 60 of file mididevice.cpp.


Member Function Documentation

void MidiDevice::callMidiScriptFunction ( QString  function,
char  channel,
char  control,
char  value,
MidiStatusByte  status,
QString  group 
) [signal]

Here is the caller graph for this function:

virtual int MidiDevice::close ( ) [pure virtual]

Implemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.

Here is the caller graph for this function:

void MidiDevice::disableMidiLearn ( ) [slot]

Definition at line 167 of file mididevice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MidiDevice::enableMidiLearn ( ) [slot]

Definition at line 157 of file mididevice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool MidiDevice::getMidiLearnStatus ( )

Definition at line 150 of file mididevice.cpp.

MidiMapping* MidiDevice::getMidiMapping ( ) [inline]

Definition at line 60 of file mididevice.h.

Here is the caller graph for this function:

QString MidiDevice::getName ( ) [inline]

Definition at line 58 of file mididevice.h.

Here is the caller graph for this function:

bool MidiDevice::isInputDevice ( ) [inline]

Definition at line 57 of file mididevice.h.

Here is the caller graph for this function:

bool MidiDevice::isOpen ( ) [inline]

Definition at line 55 of file mididevice.h.

Here is the caller graph for this function:

bool MidiDevice::isOutputDevice ( ) [inline]

Definition at line 56 of file mididevice.h.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

void MidiDevice::midiEvent ( MidiMessage  message) [signal]

Here is the caller graph for this function:

virtual int MidiDevice::open ( ) [pure virtual]

Implemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.

Here is the caller graph for this function:

void MidiDevice::receive ( MidiStatusByte  status,
char  channel,
char  control,
char  value 
)

Definition at line 177 of file mididevice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void MidiDevice::run ( ) [pure virtual]
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 
)

Definition at line 118 of file mididevice.cpp.

Here is the caller graph for this function:

void MidiDevice::sendSysexMsg ( QList< int >  data,
unsigned int  length 
)

Definition at line 130 of file mididevice.cpp.

Here is the call graph for this function:

void MidiDevice::sendSysexMsg ( unsigned char  data[],
unsigned int  length 
) [virtual]

Reimplemented in MidiDeviceDummy, MidiDeviceHss1394, and MidiDevicePortMidi.

Definition at line 146 of file mididevice.cpp.

Here is the caller graph for this function:

void MidiDevice::setMidiMapping ( MidiMapping mapping)

Definition at line 104 of file mididevice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MidiDevice::setReceiveInhibit ( bool  inhibit)

Definition at line 366 of file mididevice.cpp.

Here is the caller graph for this function:

void MidiDevice::shutdown ( )

Definition at line 80 of file mididevice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void MidiDevice::startup ( )

Definition at line 70 of file mididevice.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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.

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.

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.

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.

MIDI Mapping for this MIDI device, maps MIDI messages onto Mixxx controls

Definition at line 92 of file mididevice.h.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines