Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
CARtMidiDevice Class Reference

Canorus wrapper for RtMidi library CARtMidiDevice is a Canorus wrapper class for a cross-platform MIDI library RtMidi written by Gary P. Scavone (http://www.music.mcgill.ca/~gary/rtmidi/). More...

#include <rtmididevice.h>

Inheritance diagram for CARtMidiDevice:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CARtMidiDevice ()
 ~CARtMidiDevice ()
QMap< int, QString > getOutputPorts ()
QMap< int, QString > getInputPorts ()
bool openOutputPort (int port)
bool openInputPort (int port)
void closeOutputPort ()
void closeInputPort ()
void send (QVector< unsigned char > message, int offset=0)

Private Attributes

RtMidiOut_out
RtMidiIn_in
bool _outOpen
bool _inOpen

Detailed Description

Canorus wrapper for RtMidi library CARtMidiDevice is a Canorus wrapper class for a cross-platform MIDI library RtMidi written by Gary P. Scavone (http://www.music.mcgill.ca/~gary/rtmidi/).

    Copyright (c) 2006, Matevž Jekovec, Canorus development team
    All Rights Reserved. See AUTHORS for a complete list of authors.

    Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.



    Usage:
    1) When created, Input and Output MIDI devices get initialized.
    2) Call getOutputPorts() and getInputPorts() to retreive a map of portNumber/portName.
    3) Call openOutputPort(port) and/or openInputPort(port) to open an Output/Input port.
    4) Send MIDI events (for midi output) using send(QVector<unsigned char>).
Todo:
Callback function implementation for retreiving MIDI-IN events. This should probably be done by using Qt's signal-slot implementation. -Matevz

Constructor & Destructor Documentation

References _in, _out, closeInputPort(), and closeOutputPort().

Here is the call graph for this function:


Member Function Documentation

void CARtMidiDevice::closeInputPort ( ) [virtual]

Implements CAMidiDevice.

References _in, _inOpen, RtMidiIn::cancelCallback(), RtMidiIn::closePort(), and RtError::printMessage().

Referenced by ~CARtMidiDevice().

Here is the call graph for this function:

Here is the caller graph for this function:

void CARtMidiDevice::closeOutputPort ( ) [virtual]

Implements CAMidiDevice.

References _out, _outOpen, RtMidiOut::closePort(), and RtError::printMessage().

Referenced by ~CARtMidiDevice().

Here is the call graph for this function:

Here is the caller graph for this function:

QMap< int, QString > CARtMidiDevice::getInputPorts ( ) [virtual]

Implements CAMidiDevice.

References _in, RtMidiIn::getPortCount(), RtMidiIn::getPortName(), and RtError::printMessage().

Here is the call graph for this function:

QMap< int, QString > CARtMidiDevice::getOutputPorts ( ) [virtual]

Implements CAMidiDevice.

References _out, RtMidiOut::getPortCount(), RtMidiOut::getPortName(), and RtError::printMessage().

Here is the call graph for this function:

bool CARtMidiDevice::openInputPort ( int  port) [virtual]
bool CARtMidiDevice::openOutputPort ( int  port) [virtual]

Implements CAMidiDevice.

References _out, _outOpen, RtMidiOut::getPortCount(), RtMidiOut::openPort(), and RtError::printMessage().

Here is the call graph for this function:

void CARtMidiDevice::send ( QVector< unsigned char >  message,
int  offset = 0 
) [virtual]

Sends the given message to the midi device. offset is ignored because CARtMidiDevice is a realtime device.

Implements CAMidiDevice.

References _out, _outOpen, and RtMidiOut::sendMessage().

Here is the call graph for this function:


Member Data Documentation

bool CARtMidiDevice::_inOpen [private]
bool CARtMidiDevice::_outOpen [private]

The documentation for this class was generated from the following files: