├── README.md ├── org └── komplex │ └── qmlmidi │ └── qmldir ├── piano.qml ├── qmlmidi.h ├── qmlmidi.pro ├── qmlmidi_plugin.cpp ├── qmlmidi_plugin.h ├── qmlmidiin.cpp ├── qmlmidiin.h ├── qmlmidiout.cpp ├── qmlmidiout.h └── rtmidi-1.0.15 ├── RtError.h ├── RtMidi.cpp ├── RtMidi.h ├── config ├── config.guess ├── config.sub └── install.sh ├── configure ├── configure.ac ├── doc ├── doxygen │ ├── Doxyfile │ ├── footer.html │ ├── header.html │ └── tutorial.txt ├── html │ ├── RtError_8h-source.html │ ├── RtError_8h_source.html │ ├── RtMidi_8h-source.html │ ├── RtMidi_8h_source.html │ ├── annotated.html │ ├── classRtError-members.html │ ├── classRtError.html │ ├── classRtMidi-members.html │ ├── classRtMidi.gif │ ├── classRtMidi.html │ ├── classRtMidi.png │ ├── classRtMidiIn-members.html │ ├── classRtMidiIn.gif │ ├── classRtMidiIn.html │ ├── classRtMidiIn.png │ ├── classRtMidiOut-members.html │ ├── classRtMidiOut.gif │ ├── classRtMidiOut.html │ ├── classRtMidiOut.png │ ├── classes.html │ ├── doxygen.css │ ├── doxygen.png │ ├── files.html │ ├── functions.html │ ├── functions_enum.html │ ├── functions_eval.html │ ├── functions_func.html │ ├── functions_type.html │ ├── hierarchy.html │ ├── index.html │ ├── structRtMidiIn_1_1MidiMessage-members.html │ ├── structRtMidiIn_1_1MidiMessage.html │ ├── structRtMidiIn_1_1MidiQueue-members.html │ ├── structRtMidiIn_1_1MidiQueue.html │ ├── structRtMidiIn_1_1RtMidiInData-members.html │ ├── structRtMidiIn_1_1RtMidiInData.html │ ├── tab_b.gif │ ├── tab_l.gif │ ├── tab_r.gif │ └── tabs.css ├── images │ ├── ccrma.gif │ └── mcgill.gif └── release.txt ├── msw ├── readme ├── rtmidilib.sln └── rtmidilib.vcproj ├── readme └── tests ├── Makefile.in ├── RtMidi.dsw ├── cmidiin.cpp ├── cmidiin.dsp ├── midiout.cpp ├── midiout.dsp ├── midiprobe.cpp ├── midiprobe.dsp ├── qmidiin.cpp ├── qmidiin.dsp ├── sysextest.cpp └── sysextest.dsp /README.md: -------------------------------------------------------------------------------- 1 | qmlmidi 2 | ------- 3 | 4 | QML extension plugin enabling access to MIDI in/out devices, based on RtMidi library. Tested on Windows and OS X platforms. 5 | 6 | Instructions 7 | ------------ 8 | 9 | Compile plugin, then use in any QML application or QML viewer. 10 | 11 | Example 12 | ------- 13 | See piano.qml. 14 | 15 | If you are using QMLViewer, please start with "qmlviewer -I . piano.qml" so that the current (project) directory is included in module search path. 16 | 17 | * Up/down arrows to change MIDI output device 18 | * Left/right arrow to change program (instrument) 19 | * qwerty (protracker) keys play notes. 20 | 21 | 22 | Legal 23 | ----- 24 | 25 | **qmlmidi** is available under MIT License. 26 | 27 | Copyright (c) 2011 Jarno Heikkinen . 28 | 29 | --- 30 | 31 | The RtMidi license is similar to the the MIT License, with the added "feature" that modifications be sent to the developer. 32 | 33 | RtMidi: realtime MIDI i/o C++ classes 34 | Copyright (c) 2003-2011 Gary P. Scavone 35 | 36 | -------------------------------------------------------------------------------- /org/komplex/qmlmidi/qmldir: -------------------------------------------------------------------------------- 1 | plugin qmlmidi 2 | 3 | -------------------------------------------------------------------------------- /piano.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 1.0 2 | import org.komplex.qmlmidi 1.0 3 | import QtWebKit 1.0 4 | 5 | Rectangle 6 | { 7 | id:main 8 | 9 | width:640 10 | height:480 11 | 12 | Column 13 | { 14 | Text { text: "Out: "+synth.portName } 15 | Text { text: "Program: #"+synth.program } 16 | Text { text: "Use up/down to select midi out port, left/right to select program" } 17 | Text { text: "Use qwerty to play" } 18 | } 19 | 20 | MidiOut 21 | { 22 | id:synth 23 | port:0 24 | 25 | property int program: 0 26 | 27 | onPortChanged: { 28 | program=0; 29 | } 30 | 31 | onProgramChanged: { 32 | sendMessage(0xc0, program, 0); 33 | } 34 | } 35 | 36 | 37 | Item { 38 | id:piano 39 | anchors.fill: parent 40 | focus: true 41 | 42 | function key2note(keycode) 43 | { 44 | var ch=String.fromCharCode(keycode); 45 | var n = "Q2W3ER5T6Y7UI9O0P".indexOf(ch); 46 | if(n==-1) return -1; 47 | return n+60; 48 | } 49 | 50 | Keys.onPressed: 51 | { 52 | if(event.isAutoRepeat) return; 53 | var k=key2note(event.key); 54 | synth.sendMessage(0x90, k, 100); 55 | } 56 | Keys.onReleased: 57 | { 58 | var k=key2note(event.key); 59 | synth.sendMessage(0x80, k, 0); 60 | } 61 | 62 | Keys.onUpPressed: 63 | { 64 | if(synth.port+10) 73 | { 74 | synth.port--; 75 | } 76 | } 77 | 78 | Keys.onLeftPressed: 79 | { 80 | synth.program--; 81 | } 82 | 83 | Keys.onRightPressed: 84 | { 85 | synth.program++; 86 | } 87 | 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /qmlmidi.h: -------------------------------------------------------------------------------- 1 | #ifndef QMLMIDI_H 2 | #define QMLMIDI_H 3 | 4 | /** QML Midi plugin 5 | * jarnoh@komplex.org 6 | * Copyright (c) 2011 Jarno Heikkinen 7 | */ 8 | 9 | #include 10 | #include "RtMidi.h" 11 | 12 | #ifdef __RTMIDI_DEBUG__ // debug output flag shared with rtmidi 13 | #define DEBUG(s...) qDebug(__FILE__ " " s) 14 | #else 15 | #define DEBUG(s...) while(0) 16 | #endif 17 | 18 | #endif // QMLMIDI_H 19 | -------------------------------------------------------------------------------- /qmlmidi.pro: -------------------------------------------------------------------------------- 1 | # QML Midi plugin 2 | # jarnoh@komplex.org 3 | # Copyright (c) 2011 Jarno Heikkinen 4 | # 5 | 6 | TEMPLATE = lib 7 | TARGET = qmlmidi 8 | QT += declarative 9 | CONFIG += qt plugin 10 | 11 | DESTDIR = $$PWD/org/komplex/qmlmidi 12 | 13 | INCLUDEPATH += rtmidi-1.0.15 14 | 15 | # Input 16 | SOURCES += \ 17 | qmlmidi_plugin.cpp \ 18 | rtmidi-1.0.15/RtMidi.cpp \ 19 | qmlmidiin.cpp \ 20 | qmlmidiout.cpp 21 | 22 | HEADERS += \ 23 | qmlmidi_plugin.h \ 24 | rtmidi-1.0.15/RtMidi.h \ 25 | rtmidi-1.0.15/RtError.h \ 26 | qmlmidiin.h \ 27 | qmlmidiout.h \ 28 | qmlmidi.h 29 | 30 | OTHER_FILES = $$DESTDIR/qmldir \ 31 | piano.qml 32 | 33 | !equals(_PRO_FILE_PWD_, $$OUT_PWD) { 34 | copy_qmldir.target = $$OUT_PWD/qmldir 35 | copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir 36 | copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" 37 | QMAKE_EXTRA_TARGETS += copy_qmldir 38 | PRE_TARGETDEPS += $$copy_qmldir.target 39 | } 40 | 41 | qmldir.files = qmldir 42 | 43 | windows:DEFINES += __WINDOWS_MM__ 44 | windows:LIBS += -lWINMM 45 | 46 | macx:DEFINES += __MACOSX_CORE__ 47 | macx:LIBS += -framework CoreMIDI -framework CoreFoundation -framework CoreAudio 48 | 49 | DEFINES += __RTMIDI_DEBUG__ 50 | -------------------------------------------------------------------------------- /qmlmidi_plugin.cpp: -------------------------------------------------------------------------------- 1 | /** QML Midi plugin 2 | * jarnoh@komplex.org 3 | * Copyright (c) 2011 Jarno Heikkinen 4 | */ 5 | 6 | #include "qmlmidi_plugin.h" 7 | #include "qmlmidiin.h" 8 | #include "qmlmidiout.h" 9 | #include 10 | 11 | void QmlMidiPlugin::registerTypes(const char *uri) 12 | { 13 | qmlRegisterType("org.komplex.qmlmidi", 1, 0, "MidiIn"); 14 | qmlRegisterType("org.komplex.qmlmidi", 1, 0, "MidiOut"); 15 | } 16 | 17 | #if QT_VERSION < 0x050000 18 | Q_EXPORT_PLUGIN2(QmlMidi, QmlMidiPlugin) 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /qmlmidi_plugin.h: -------------------------------------------------------------------------------- 1 | #ifndef QMLMIDI_PLUGIN_H 2 | #define QMLMIDI_PLUGIN_H 3 | 4 | /** QML Midi plugin 5 | * jarnoh@komplex.org 6 | * Copyright (c) 2011 Jarno Heikkinen 7 | */ 8 | 9 | #include 10 | 11 | class QmlMidiPlugin : public QDeclarativeExtensionPlugin 12 | { 13 | Q_OBJECT 14 | #if QT_VERSION >= 0x050000 15 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 16 | #endif 17 | 18 | public: 19 | void registerTypes(const char *uri); 20 | }; 21 | 22 | #endif // QMLMIDI_PLUGIN_H 23 | 24 | -------------------------------------------------------------------------------- /qmlmidiin.cpp: -------------------------------------------------------------------------------- 1 | /** QML Midi plugin 2 | * jarnoh@komplex.org 3 | * Copyright (c) 2011 Jarno Heikkinen 4 | */ 5 | 6 | #include "qmlmidiin.h" 7 | 8 | QmlMidiIn::QmlMidiIn(QDeclarativeItem *parent) : 9 | QDeclarativeItem(parent), port(-1) 10 | { 11 | } 12 | -------------------------------------------------------------------------------- /qmlmidiin.h: -------------------------------------------------------------------------------- 1 | #ifndef QMLMIDIIN_H 2 | #define QMLMIDIIN_H 3 | 4 | /** QML Midi plugin 5 | * jarnoh@komplex.org 6 | * Copyright (c) 2011 Jarno Heikkinen 7 | */ 8 | 9 | #include "qmlmidi.h" 10 | 11 | class QmlMidiIn : public QDeclarativeItem 12 | { 13 | Q_OBJECT 14 | 15 | Q_PROPERTY(int portCount READ getPortCount) 16 | Q_PROPERTY(int port READ getPort WRITE setPort) 17 | Q_PROPERTY(QString portName READ getPortName WRITE setPortByName) 18 | Q_PROPERTY(QList portNames READ getPortNames) 19 | Q_PROPERTY(bool active READ getActive WRITE setActive) 20 | 21 | public: 22 | explicit QmlMidiIn(QDeclarativeItem *parent = 0); 23 | 24 | private: 25 | RtMidiIn midiIn; 26 | bool active; 27 | int port; 28 | 29 | public: 30 | int getPortCount() 31 | { 32 | DEBUG("getPortCount %d",midiIn.getPortCount()); 33 | return midiIn.getPortCount(); 34 | } 35 | 36 | bool openPort(int portNumber, QString portname=QString("QmlmidiIn")) 37 | { 38 | DEBUG("openPort %d", portNumber); 39 | try 40 | { 41 | midiIn.openPort(portNumber, portname.toStdString()); 42 | // midiIn.ignoreTypes(false,false,false); 43 | return true; 44 | } 45 | catch(RtError e) 46 | { 47 | DEBUG("Exception %s", e.what()); 48 | return false; 49 | } 50 | } 51 | 52 | bool getActive() 53 | { 54 | return active; 55 | } 56 | 57 | void setActive(bool active) 58 | { 59 | DEBUG("setActive %d", active); 60 | this->active=active; 61 | if(active) 62 | { 63 | midiIn.setCallback(callback_emitter, this); 64 | } 65 | else 66 | { 67 | midiIn.cancelCallback(); 68 | } 69 | } 70 | 71 | int getPort() 72 | { 73 | return port; 74 | } 75 | 76 | void setPort(int port) 77 | { 78 | if(this->port>=0) closePort(); 79 | this->port=port; 80 | if(!openPort(port)) port=-1; 81 | } 82 | 83 | QList getPortNames() 84 | { 85 | QList l; 86 | for(int i=0;i msg; 137 | qreal timeStamp = midiIn.getMessage(&msg); 138 | 139 | QList m; 140 | m.append(timeStamp); 141 | for(int i=0;i *msg, void *userData) 146 | { 147 | ((QmlMidiIn*)userData)->emitMidiMessage(timeStamp, msg); 148 | } 149 | 150 | signals: 151 | void data(QVariant data); 152 | 153 | public slots: 154 | void emitMidiMessage(double timeStamp, std::vector *msg) 155 | { 156 | QList m; 157 | m.append((qreal)timeStamp); 158 | for(int i=0;isize();i++) m.append((quint8)msg->at(i)); 159 | emit data(QVariant(m)); 160 | } 161 | 162 | }; 163 | 164 | QML_DECLARE_TYPE(QmlMidiIn) 165 | 166 | #endif // QMLMIDIIN_H 167 | -------------------------------------------------------------------------------- /qmlmidiout.cpp: -------------------------------------------------------------------------------- 1 | /** QML Midi plugin 2 | * jarnoh@komplex.org 3 | * Copyright (c) 2011 Jarno Heikkinen 4 | */ 5 | 6 | #include "qmlmidiout.h" 7 | 8 | QmlMidiOut::QmlMidiOut(QDeclarativeItem *parent) : 9 | QDeclarativeItem(parent), port(-1) 10 | { 11 | } 12 | -------------------------------------------------------------------------------- /qmlmidiout.h: -------------------------------------------------------------------------------- 1 | #ifndef QMLMIDIOUT_H 2 | #define QMLMIDIOUT_H 3 | 4 | /** QML Midi plugin 5 | * jarnoh@komplex.org 6 | * Copyright (c) 2011 Jarno Heikkinen 7 | */ 8 | 9 | #include "qmlmidi.h" 10 | 11 | class QmlMidiOut : public QDeclarativeItem 12 | { 13 | Q_OBJECT 14 | 15 | Q_PROPERTY(int portCount READ getPortCount) 16 | Q_PROPERTY(int port READ getPort WRITE setPort NOTIFY portChanged) 17 | Q_PROPERTY(QString portName READ portName WRITE setPortByName NOTIFY portChanged) 18 | Q_PROPERTY(QList portNames READ getPortNames) 19 | 20 | public: 21 | explicit QmlMidiOut(QDeclarativeItem *parent = 0); 22 | 23 | signals: 24 | void portChanged(); 25 | void portNameChanged(); 26 | 27 | public slots: 28 | 29 | private: 30 | int port; 31 | 32 | 33 | public: 34 | int getPort() 35 | { 36 | return port; 37 | } 38 | 39 | void setPort(int port) 40 | { 41 | DEBUG("setPort %d", port); 42 | if(this->port!=port) 43 | { 44 | if(this->port>=0) closePort(); 45 | if(port==-1 || !openPort(port)) 46 | this->port=-1; 47 | else 48 | this->port=port; 49 | DEBUG("emit portChanged"); 50 | emit portChanged(); 51 | } 52 | } 53 | 54 | QList getPortNames() 55 | { 56 | QList l; 57 | for(int i=0;i m; 127 | m.push_back(a); 128 | m.push_back(b); 129 | m.push_back(c); 130 | 131 | try 132 | { 133 | midiOut.sendMessage(&m); 134 | return true; 135 | } 136 | catch(RtError e) 137 | { 138 | DEBUG("Exception %s", e.what()); 139 | return false; 140 | } 141 | 142 | } 143 | 144 | protected: 145 | RtMidiOut midiOut; 146 | 147 | }; 148 | 149 | QML_DECLARE_TYPE(QmlMidiOut) 150 | 151 | #endif // QMLMIDIOUT_H 152 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/RtError.h: -------------------------------------------------------------------------------- 1 | /************************************************************************/ 2 | /*! \class RtError 3 | \brief Exception handling class for RtAudio & RtMidi. 4 | 5 | The RtError class is quite simple but it does allow errors to be 6 | "caught" by RtError::Type. See the RtAudio and RtMidi 7 | documentation to know which methods can throw an RtError. 8 | 9 | */ 10 | /************************************************************************/ 11 | 12 | #ifndef RTERROR_H 13 | #define RTERROR_H 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | class RtError : public std::exception 20 | { 21 | public: 22 | //! Defined RtError types. 23 | enum Type { 24 | WARNING, /*!< A non-critical error. */ 25 | DEBUG_WARNING, /*!< A non-critical error which might be useful for debugging. */ 26 | UNSPECIFIED, /*!< The default, unspecified error type. */ 27 | NO_DEVICES_FOUND, /*!< No devices found on system. */ 28 | INVALID_DEVICE, /*!< An invalid device ID was specified. */ 29 | MEMORY_ERROR, /*!< An error occured during memory allocation. */ 30 | INVALID_PARAMETER, /*!< An invalid parameter was specified to a function. */ 31 | INVALID_USE, /*!< The function was called incorrectly. */ 32 | DRIVER_ERROR, /*!< A system driver error occured. */ 33 | SYSTEM_ERROR, /*!< A system error occured. */ 34 | THREAD_ERROR /*!< A thread error occured. */ 35 | }; 36 | 37 | //! The constructor. 38 | RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {} 39 | 40 | //! The destructor. 41 | virtual ~RtError( void ) throw() {} 42 | 43 | //! Prints thrown error message to stderr. 44 | virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; } 45 | 46 | //! Returns the thrown error message type. 47 | virtual const Type& getType(void) const throw() { return type_; } 48 | 49 | //! Returns the thrown error message string. 50 | virtual const std::string& getMessage(void) const throw() { return message_; } 51 | 52 | //! Returns the thrown error message as a c-style string. 53 | virtual const char* what( void ) const throw() { return message_.c_str(); } 54 | 55 | protected: 56 | std::string message_; 57 | Type type_; 58 | }; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/RtMidi.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************/ 2 | /*! \class RtMidi 3 | \brief An abstract base class for realtime MIDI input/output. 4 | 5 | This class implements some common functionality for the realtime 6 | MIDI input/output subclasses RtMidiIn and RtMidiOut. 7 | 8 | RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/ 9 | 10 | RtMidi: realtime MIDI i/o C++ classes 11 | Copyright (c) 2003-2011 Gary P. Scavone 12 | 13 | Permission is hereby granted, free of charge, to any person 14 | obtaining a copy of this software and associated documentation files 15 | (the "Software"), to deal in the Software without restriction, 16 | including without limitation the rights to use, copy, modify, merge, 17 | publish, distribute, sublicense, and/or sell copies of the Software, 18 | and to permit persons to whom the Software is furnished to do so, 19 | subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be 22 | included in all copies or substantial portions of the Software. 23 | 24 | Any person wishing to distribute modifications to the Software is 25 | requested to send the modifications to the original developer so that 26 | they can be incorporated into the canonical version. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 29 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 30 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 31 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 32 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 33 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 34 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 35 | */ 36 | /**********************************************************************/ 37 | 38 | // RtMidi: Version 1.0.15 39 | 40 | #ifndef RTMIDI_H 41 | #define RTMIDI_H 42 | 43 | #include "RtError.h" 44 | #include 45 | 46 | class RtMidi 47 | { 48 | public: 49 | 50 | //! Pure virtual openPort() function. 51 | virtual void openPort( unsigned int portNumber = 0, const std::string portName = std::string( "RtMidi" ) ) = 0; 52 | 53 | //! Pure virtual openVirtualPort() function. 54 | virtual void openVirtualPort( const std::string portName = std::string( "RtMidi" ) ) = 0; 55 | 56 | //! Pure virtual getPortCount() function. 57 | virtual unsigned int getPortCount() = 0; 58 | 59 | //! Pure virtual getPortName() function. 60 | virtual std::string getPortName( unsigned int portNumber = 0 ) = 0; 61 | 62 | //! Pure virtual closePort() function. 63 | virtual void closePort( void ) = 0; 64 | 65 | protected: 66 | 67 | RtMidi(); 68 | virtual ~RtMidi() {}; 69 | 70 | // A basic error reporting function for internal use in the RtMidi 71 | // subclasses. The behavior of this function can be modified to 72 | // suit specific needs. 73 | void error( RtError::Type type ); 74 | 75 | void *apiData_; 76 | bool connected_; 77 | std::string errorString_; 78 | }; 79 | 80 | /**********************************************************************/ 81 | /*! \class RtMidiIn 82 | \brief A realtime MIDI input class. 83 | 84 | This class provides a common, platform-independent API for 85 | realtime MIDI input. It allows access to a single MIDI input 86 | port. Incoming MIDI messages are either saved to a queue for 87 | retrieval using the getMessage() function or immediately passed to 88 | a user-specified callback function. Create multiple instances of 89 | this class to connect to more than one MIDI device at the same 90 | time. With the OS-X and Linux ALSA MIDI APIs, it is also possible 91 | to open a virtual input port to which other MIDI software clients 92 | can connect. 93 | 94 | by Gary P. Scavone, 2003-2008. 95 | */ 96 | /**********************************************************************/ 97 | 98 | #include 99 | 100 | class RtMidiIn : public RtMidi 101 | { 102 | public: 103 | 104 | //! User callback function type definition. 105 | typedef void (*RtMidiCallback)( double timeStamp, std::vector *message, void *userData); 106 | 107 | //! Default constructor that allows an optional client name and queue size. 108 | /*! 109 | An exception will be thrown if a MIDI system initialization 110 | error occurs. The queue size defines the maximum number of 111 | messages that can be held in the MIDI queue (when not using a 112 | callback function). If the queue size limit is reached, 113 | incoming messages will be ignored. 114 | */ 115 | RtMidiIn( const std::string clientName = std::string( "RtMidi Input Client"), unsigned int queueSizeLimit = 100 ); 116 | 117 | //! If a MIDI connection is still open, it will be closed by the destructor. 118 | ~RtMidiIn(); 119 | 120 | //! Open a MIDI input connection. 121 | /*! 122 | An optional port number greater than 0 can be specified. 123 | Otherwise, the default or first port found is opened. 124 | */ 125 | void openPort( unsigned int portNumber = 0, const std::string Portname = std::string( "RtMidi Input" ) ); 126 | 127 | //! Create a virtual input port, with optional name, to allow software connections (OS X and ALSA only). 128 | /*! 129 | This function creates a virtual MIDI input port to which other 130 | software applications can connect. This type of functionality 131 | is currently only supported by the Macintosh OS-X and Linux ALSA 132 | APIs (the function does nothing for the other APIs). 133 | */ 134 | void openVirtualPort( const std::string portName = std::string( "RtMidi Input" ) ); 135 | 136 | //! Set a callback function to be invoked for incoming MIDI messages. 137 | /*! 138 | The callback function will be called whenever an incoming MIDI 139 | message is received. While not absolutely necessary, it is best 140 | to set the callback function before opening a MIDI port to avoid 141 | leaving some messages in the queue. 142 | */ 143 | void setCallback( RtMidiCallback callback, void *userData = 0 ); 144 | 145 | //! Cancel use of the current callback function (if one exists). 146 | /*! 147 | Subsequent incoming MIDI messages will be written to the queue 148 | and can be retrieved with the \e getMessage function. 149 | */ 150 | void cancelCallback(); 151 | 152 | //! Close an open MIDI connection (if one exists). 153 | void closePort( void ); 154 | 155 | //! Return the number of available MIDI input ports. 156 | unsigned int getPortCount(); 157 | 158 | //! Return a string identifier for the specified MIDI input port number. 159 | /*! 160 | An empty string is returned if an invalid port specifier is provided. 161 | */ 162 | std::string getPortName( unsigned int portNumber = 0 ); 163 | 164 | //! Specify whether certain MIDI message types should be queued or ignored during input. 165 | /*! 166 | o By default, MIDI timing and active sensing messages are ignored 167 | during message input because of their relative high data rates. 168 | MIDI sysex messages are ignored by default as well. Variable 169 | values of "true" imply that the respective message type will be 170 | ignored. 171 | */ 172 | void ignoreTypes( bool midiSysex = true, bool midiTime = true, bool midiSense = true ); 173 | 174 | //! Fill the user-provided vector with the data bytes for the next available MIDI message in the input queue and return the event delta-time in seconds. 175 | /*! 176 | This function returns immediately whether a new message is 177 | available or not. A valid message is indicated by a non-zero 178 | vector size. An exception is thrown if an error occurs during 179 | message retrieval or an input connection was not previously 180 | established. 181 | */ 182 | double getMessage( std::vector *message ); 183 | 184 | // A MIDI structure used internally by the class to store incoming 185 | // messages. Each message represents one and only one MIDI message. 186 | struct MidiMessage { 187 | std::vector bytes; 188 | double timeStamp; 189 | 190 | // Default constructor. 191 | MidiMessage() 192 | :bytes(0), timeStamp(0.0) {} 193 | }; 194 | 195 | struct MidiQueue { 196 | unsigned int front; 197 | unsigned int back; 198 | unsigned int size; 199 | unsigned int ringSize; 200 | MidiMessage *ring; 201 | 202 | // Default constructor. 203 | MidiQueue() 204 | :front(0), back(0), size(0), ringSize(0) {} 205 | }; 206 | 207 | // The RtMidiInData structure is used to pass private class data to 208 | // the MIDI input handling function or thread. 209 | struct RtMidiInData { 210 | MidiQueue queue; 211 | MidiMessage message; 212 | unsigned char ignoreFlags; 213 | bool doInput; 214 | bool firstMessage; 215 | void *apiData; 216 | bool usingCallback; 217 | void *userCallback; 218 | void *userData; 219 | bool continueSysex; 220 | 221 | // Default constructor. 222 | RtMidiInData() 223 | : ignoreFlags(7), doInput(false), firstMessage(true), 224 | apiData(0), usingCallback(false), userCallback(0), userData(0), 225 | continueSysex(false) {} 226 | }; 227 | 228 | private: 229 | 230 | void initialize( const std::string& clientName ); 231 | RtMidiInData inputData_; 232 | 233 | }; 234 | 235 | /**********************************************************************/ 236 | /*! \class RtMidiOut 237 | \brief A realtime MIDI output class. 238 | 239 | This class provides a common, platform-independent API for MIDI 240 | output. It allows one to probe available MIDI output ports, to 241 | connect to one such port, and to send MIDI bytes immediately over 242 | the connection. Create multiple instances of this class to 243 | connect to more than one MIDI device at the same time. 244 | 245 | by Gary P. Scavone, 2003-2008. 246 | */ 247 | /**********************************************************************/ 248 | 249 | class RtMidiOut : public RtMidi 250 | { 251 | public: 252 | 253 | //! Default constructor that allows an optional client name. 254 | /*! 255 | An exception will be thrown if a MIDI system initialization error occurs. 256 | */ 257 | RtMidiOut( const std::string clientName = std::string( "RtMidi Output Client" ) ); 258 | 259 | //! The destructor closes any open MIDI connections. 260 | ~RtMidiOut(); 261 | 262 | //! Open a MIDI output connection. 263 | /*! 264 | An optional port number greater than 0 can be specified. 265 | Otherwise, the default or first port found is opened. An 266 | exception is thrown if an error occurs while attempting to make 267 | the port connection. 268 | */ 269 | void openPort( unsigned int portNumber = 0, const std::string portName = std::string( "RtMidi Output" ) ); 270 | 271 | //! Close an open MIDI connection (if one exists). 272 | void closePort(); 273 | 274 | //! Create a virtual output port, with optional name, to allow software connections (OS X and ALSA only). 275 | /*! 276 | This function creates a virtual MIDI output port to which other 277 | software applications can connect. This type of functionality 278 | is currently only supported by the Macintosh OS-X and Linux ALSA 279 | APIs (the function does nothing with the other APIs). An 280 | exception is thrown if an error occurs while attempting to create 281 | the virtual port. 282 | */ 283 | void openVirtualPort( const std::string portName = std::string( "RtMidi Output" ) ); 284 | 285 | //! Return the number of available MIDI output ports. 286 | unsigned int getPortCount(); 287 | 288 | //! Return a string identifier for the specified MIDI port type and number. 289 | /*! 290 | An empty string is returned if an invalid port specifier is provided. 291 | */ 292 | std::string getPortName( unsigned int portNumber = 0 ); 293 | 294 | //! Immediately send a single message out an open MIDI output port. 295 | /*! 296 | An exception is thrown if an error occurs during output or an 297 | output connection was not previously established. 298 | */ 299 | void sendMessage( std::vector *message ); 300 | 301 | private: 302 | 303 | void initialize( const std::string& clientName ); 304 | }; 305 | 306 | #endif 307 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/config/install.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/config/install.sh -------------------------------------------------------------------------------- /rtmidi-1.0.15/configure.ac: -------------------------------------------------------------------------------- 1 | # Process this file with autoconf to produce a configure script. 2 | AC_INIT(RtMidi, 1.0, gary@music.mcgill.ca, rtmidi) 3 | AC_CONFIG_AUX_DIR(config) 4 | AC_CONFIG_SRCDIR(RtMidi.cpp) 5 | AC_CONFIG_FILES(tests/Makefile) 6 | 7 | # Fill GXX with something before test. 8 | AC_SUBST( GXX, ["no"] ) 9 | 10 | # Checks for programs. 11 | AC_PROG_CXX(g++ CC c++ cxx) 12 | 13 | # Checks for header files. 14 | AC_HEADER_STDC 15 | #AC_CHECK_HEADERS(sys/ioctl.h unistd.h) 16 | 17 | # Check for debug 18 | AC_MSG_CHECKING(whether to compile debug version) 19 | AC_ARG_ENABLE(debug, 20 | [ --enable-debug = enable various debug output], 21 | [AC_SUBST( cppflag, [-D__RTMIDI_DEBUG__] ) AC_SUBST( cxxflag, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)], 22 | [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O3] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)]) 23 | 24 | # For -I and -D flags 25 | CPPFLAGS="$CPPFLAGS $cppflag" 26 | 27 | # For debugging and optimization ... overwrite default because it has both -g and -O2 28 | #CXXFLAGS="$CXXFLAGS $cxxflag" 29 | CXXFLAGS="$cxxflag" 30 | 31 | # Check compiler and use -Wall if gnu. 32 | if [test $GXX = "yes" ;] then 33 | AC_SUBST( cxxflag, [-Wall] ) 34 | fi 35 | 36 | CXXFLAGS="$CXXFLAGS $cxxflag" 37 | 38 | # Checks for package options and external software 39 | AC_CANONICAL_HOST 40 | AC_MSG_CHECKING(for MIDI API) 41 | case $host in 42 | *-*-linux*) 43 | AC_SUBST( api, [""] ) 44 | AC_ARG_WITH(jack, [ --with-jack = choose JACK server support (linux only)], [ 45 | AC_SUBST( api, [-D__LINUX_JACK__] ) 46 | AC_MSG_RESULT(using JACK) 47 | AC_CHECK_LIB(jack, jack_client_open, , AC_MSG_ERROR(JACK support requires the jack library!))], ) 48 | 49 | if [test "$api" == "";] then 50 | AC_SUBST( api, [-D__LINUX_ALSASEQ__] ) 51 | AC_CHECK_LIB(asound, snd_seq_open, , AC_MSG_ERROR(RtMidi in Linux requires the ALSA asound library!)) 52 | # Checks for pthread library. 53 | AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtMidi requires the pthread library!)) 54 | fi 55 | 56 | ;; 57 | 58 | *-sgi*) 59 | AC_SUBST( api, ["-D__IRIX_MD__ -LANG:std -w"] ) 60 | AC_MSG_RESULT(using IRIX MD) 61 | AC_CHECK_LIB(md, mdInit, , AC_MSG_ERROR(IRIX MIDI support requires the md library!) ) 62 | # Checks for pthread library. 63 | AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtMidi requires the pthread library!)) 64 | ;; 65 | 66 | *-apple*) 67 | # Check for CoreAudio framework 68 | AC_CHECK_HEADER(CoreMIDI/CoreMIDI.h, [AC_SUBST( api, [-D__MACOSX_CORE__] )], [AC_MSG_ERROR(CoreMIDI header files not found!)] ) 69 | AC_SUBST( LIBS, ["-framework CoreMIDI -framework CoreFoundation -framework CoreAudio"] ) 70 | ;; 71 | 72 | *-mingw32*) 73 | # Use WinMM library 74 | AC_SUBST( api, [-D__WINDOWS_MM__] ) 75 | # I can't get the following check to work so just manually add the library 76 | # AC_CHECK_LIB(winmm, midiInGetNumDevs, , AC_MSG_ERROR(Windows MIDI support requires the winmm library!) ) 77 | AC_SUBST( LIBS, [-lwinmm] ) 78 | ;; 79 | 80 | *) 81 | # Default case for unknown realtime systems. 82 | AC_MSG_ERROR(Unknown system type for MIDI support!) 83 | ;; 84 | esac 85 | 86 | CPPFLAGS="$CPPFLAGS $api" 87 | 88 | AC_OUTPUT 89 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/doxygen/footer.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 6 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
5 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/doxygen/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/RtError_8h-source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |

RtError.h

00001 /************************************************************************/
12 | 00010 /************************************************************************/
13 | 00011 
14 | 00012 #ifndef RTERROR_H
15 | 00013 #define RTERROR_H
16 | 00014 
17 | 00015 #include <iostream>
18 | 00016 #include <string>
19 | 00017 
20 | 00018 class RtError
21 | 00019 {
22 | 00020 public:
23 | 00022   enum Type {
24 | 00023     WARNING,           
25 | 00024     DEBUG_WARNING,     
26 | 00025     UNSPECIFIED,       
27 | 00026     NO_DEVICES_FOUND,  
28 | 00027     INVALID_DEVICE,    
29 | 00028     INVALID_STREAM,    
30 | 00029     MEMORY_ERROR,      
31 | 00030     INVALID_PARAMETER, 
32 | 00031     DRIVER_ERROR,      
33 | 00032     SYSTEM_ERROR,      
34 | 00033     THREAD_ERROR       
35 | 00034   };
36 | 00035 
37 | 00036 protected:
38 | 00037   std::string message_;
39 | 00038   Type type_;
40 | 00039 
41 | 00040 public:
42 | 00042   RtError(const std::string& message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type) {}
43 | 00043 
44 | 00045   virtual ~RtError(void) {};
45 | 00046 
46 | 00048   virtual void printMessage(void) { std::cerr << '\n' << message_ << "\n\n"; }
47 | 00049 
48 | 00051   virtual const Type& getType(void) { return type_; }
49 | 00052 
50 | 00054   virtual const std::string& getMessage(void) { return message_; }
51 | 00055 
52 | 00057   virtual const char *getMessageString(void) { return message_.c_str(); }
53 | 00058 };
54 | 00059 
55 | 00060 #endif
56 | 
57 |
58 | 59 | 60 | 62 |
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
61 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/RtError_8h_source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |

RtError.h

00001 /************************************************************************/
12 | 00010 /************************************************************************/
13 | 00011 
14 | 00012 #ifndef RTERROR_H
15 | 00013 #define RTERROR_H
16 | 00014 
17 | 00015 #include <exception>
18 | 00016 #include <iostream>
19 | 00017 #include <string>
20 | 00018 
21 | 00019 class RtError : public std::exception
22 | 00020 {
23 | 00021  public:
24 | 00023   enum Type {
25 | 00024     WARNING,           
26 | 00025     DEBUG_WARNING,     
27 | 00026     UNSPECIFIED,       
28 | 00027     NO_DEVICES_FOUND,  
29 | 00028     INVALID_DEVICE,    
30 | 00029     MEMORY_ERROR,      
31 | 00030     INVALID_PARAMETER, 
32 | 00031     INVALID_USE,       
33 | 00032     DRIVER_ERROR,      
34 | 00033     SYSTEM_ERROR,      
35 | 00034     THREAD_ERROR       
36 | 00035   };
37 | 00036 
38 | 00038   RtError( const std::string& message, Type type = RtError::UNSPECIFIED ) throw() : message_(message), type_(type) {}
39 | 00039  
40 | 00041   virtual ~RtError( void ) throw() {}
41 | 00042 
42 | 00044   virtual void printMessage( void ) const throw() { std::cerr << '\n' << message_ << "\n\n"; }
43 | 00045 
44 | 00047   virtual const Type& getType(void) const throw() { return type_; }
45 | 00048 
46 | 00050   virtual const std::string& getMessage(void) const throw() { return message_; }
47 | 00051 
48 | 00053   virtual const char* what( void ) const throw() { return message_.c_str(); }
49 | 00054 
50 | 00055  protected:
51 | 00056   std::string message_;
52 | 00057   Type type_;
53 | 00058 };
54 | 00059 
55 | 00060 #endif
56 | 
57 |
58 | 59 | 60 | 62 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
61 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/RtMidi_8h-source.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |

RtMidi.h

00001 /**********************************************************************/
 12 | 00036 /**********************************************************************/
 13 | 00037 
 14 | 00038 // RtMidi: Version 1.0.11
 15 | 00039 
 16 | 00040 #ifndef RTMIDI_H
 17 | 00041 #define RTMIDI_H
 18 | 00042 
 19 | 00043 #include "RtError.h"
 20 | 00044 #include <string>
 21 | 00045 
 22 | 00046 class RtMidi
 23 | 00047 {
 24 | 00048  public:
 25 | 00049 
 26 | 00051   virtual void openPort( unsigned int portNumber = 0, const std::string portName = std::string( "RtMidi" ) ) = 0;
 27 | 00052 
 28 | 00054   virtual void openVirtualPort( const std::string portName = std::string( "RtMidi" ) ) = 0;
 29 | 00055 
 30 | 00057   virtual unsigned int getPortCount() = 0;
 31 | 00058 
 32 | 00060   virtual std::string getPortName( unsigned int portNumber = 0 ) = 0;
 33 | 00061 
 34 | 00063   virtual void closePort( void ) = 0;
 35 | 00064 
 36 | 00065  protected:
 37 | 00066 
 38 | 00067   RtMidi();
 39 | 00068   virtual ~RtMidi() {};
 40 | 00069 
 41 | 00070   // A basic error reporting function for internal use in the RtMidi
 42 | 00071   // subclasses.  The behavior of this function can be modified to
 43 | 00072   // suit specific needs.
 44 | 00073   void error( RtError::Type type );
 45 | 00074 
 46 | 00075   void *apiData_;
 47 | 00076   bool connected_;
 48 | 00077   std::string errorString_;
 49 | 00078 };
 50 | 00079 
 51 | 00080 /**********************************************************************/
 52 | 00096 /**********************************************************************/
 53 | 00097 
 54 | 00098 #include <vector>
 55 | 00099 #include <queue>
 56 | 00100 
 57 | 00101 class RtMidiIn : public RtMidi
 58 | 00102 {
 59 | 00103  public:
 60 | 00104 
 61 | 00106   typedef void (*RtMidiCallback)( double timeStamp, std::vector<unsigned char> *message, void *userData);
 62 | 00107 
 63 | 00109 
 64 | 00112   RtMidiIn( const std::string clientName = std::string( "RtMidi Input Client") );
 65 | 00113 
 66 | 00115   ~RtMidiIn();
 67 | 00116 
 68 | 00118 
 69 | 00122   void openPort( unsigned int portNumber = 0, const std::string Portname = std::string( "RtMidi Input" ) );
 70 | 00123 
 71 | 00125 
 72 | 00131   void openVirtualPort( const std::string portName = std::string( "RtMidi Input" ) );
 73 | 00132 
 74 | 00134 
 75 | 00140   void setCallback( RtMidiCallback callback, void *userData = 0 );
 76 | 00141 
 77 | 00143 
 78 | 00147   void cancelCallback();
 79 | 00148 
 80 | 00150   void closePort( void );
 81 | 00151 
 82 | 00153   unsigned int getPortCount();
 83 | 00154 
 84 | 00156 
 85 | 00159   std::string getPortName( unsigned int portNumber = 0 );
 86 | 00160 
 87 | 00162 
 88 | 00166   void setQueueSizeLimit( unsigned int queueSize );
 89 | 00167 
 90 | 00169 
 91 | 00176   void ignoreTypes( bool midiSysex = true, bool midiTime = true, bool midiSense = true );
 92 | 00177 
 93 | 00179 
 94 | 00186   double getMessage( std::vector<unsigned char> *message );
 95 | 00187 
 96 | 00188   // A MIDI structure used internally by the class to store incoming
 97 | 00189   // messages.  Each message represents one and only one MIDI message.
 98 | 00190   struct MidiMessage { 
 99 | 00191     std::vector<unsigned char> bytes; 
100 | 00192     double timeStamp;
101 | 00193 
102 | 00194     // Default constructor.
103 | 00195     MidiMessage()
104 | 00196       :bytes(3), timeStamp(0.0) {}
105 | 00197   };
106 | 00198 
107 | 00199   // The RtMidiInData structure is used to pass private class data to
108 | 00200   // the MIDI input handling function or thread.
109 | 00201   struct RtMidiInData {
110 | 00202     std::queue<MidiMessage> queue;
111 | 00203     MidiMessage message;
112 | 00204     unsigned int queueLimit;
113 | 00205     unsigned char ignoreFlags;
114 | 00206     bool doInput;
115 | 00207     bool firstMessage;
116 | 00208     void *apiData;
117 | 00209     bool usingCallback;
118 | 00210     void *userCallback;
119 | 00211     void *userData;
120 | 00212     bool continueSysex;
121 | 00213 
122 | 00214     // Default constructor.
123 | 00215     RtMidiInData()
124 | 00216       : queueLimit(1024), ignoreFlags(7), doInput(false), firstMessage(true),
125 | 00217         apiData(0), usingCallback(false), userCallback(0), userData(0),
126 | 00218         continueSysex(false) {}
127 | 00219   };
128 | 00220 
129 | 00221  private:
130 | 00222 
131 | 00223   void initialize( const std::string& clientName );
132 | 00224   RtMidiInData inputData_;
133 | 00225 
134 | 00226 };
135 | 00227 
136 | 00228 /**********************************************************************/
137 | 00240 /**********************************************************************/
138 | 00241 
139 | 00242 class RtMidiOut : public RtMidi
140 | 00243 {
141 | 00244  public:
142 | 00245 
143 | 00247 
144 | 00250   RtMidiOut( const std::string clientName = std::string( "RtMidi Output Client" ) );
145 | 00251 
146 | 00253   ~RtMidiOut();
147 | 00254 
148 | 00256 
149 | 00262   void openPort( unsigned int portNumber = 0, const std::string portName = std::string( "RtMidi Output" ) );
150 | 00263 
151 | 00265   void closePort();
152 | 00266 
153 | 00268 
154 | 00276   void openVirtualPort( const std::string portName = std::string( "RtMidi Output" ) );
155 | 00277 
156 | 00279   unsigned int getPortCount();
157 | 00280 
158 | 00282 
159 | 00285   std::string getPortName( unsigned int portNumber = 0 );
160 | 00286 
161 | 00288 
162 | 00292   void sendMessage( std::vector<unsigned char> *message );
163 | 00293 
164 | 00294  private:
165 | 00295 
166 | 00296   void initialize( const std::string& clientName );
167 | 00297 };
168 | 00298 
169 | 00299 #endif
170 | 
171 |
172 | 173 | 174 | 176 |
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
175 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

Class List

Here are the classes, structs, unions and interfaces with brief descriptions: 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
RtMidiIn::MidiMessage
RtMidiIn::MidiQueue
RtErrorException handling class for RtAudio & RtMidi
RtMidiAn abstract base class for realtime MIDI input/output
RtMidiInA realtime MIDI input class
RtMidiIn::RtMidiInData
RtMidiOutA realtime MIDI output class
21 |
22 |
23 | 24 | 25 | 27 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
26 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtError-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtError Member List

This is the complete list of members for RtError, including all inherited members. 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
DEBUG_WARNING enum valueRtError
DRIVER_ERROR enum valueRtError
getMessage(void) const RtError [inline, virtual]
getType(void) const RtError [inline, virtual]
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_USE enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void) const RtError [inline, virtual]
RtError(const std::string &message, Type type=RtError::UNSPECIFIED)RtError [inline]
SYSTEM_ERROR enum valueRtError
THREAD_ERROR enum valueRtError
Type enum nameRtError
UNSPECIFIED enum valueRtError
WARNING enum valueRtError
what(void) const RtError [inline, virtual]
~RtError(void)RtError [inline, virtual]
32 |
33 | 34 | 35 | 37 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
36 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtError.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtError Class Reference

13 |

Exception handling class for RtAudio & RtMidi. 14 | More...

15 | 16 |

#include <RtError.h>

17 | 18 |

List of all members.

19 | 20 | 21 | 37 | 39 | 40 | 42 | 43 | 45 | 46 | 48 | 49 | 51 | 52 | 54 | 55 | 57 | 58 |

Public Types

enum  Type {
22 |   WARNING, 23 | DEBUG_WARNING, 24 | UNSPECIFIED, 25 | NO_DEVICES_FOUND, 26 |
27 |   INVALID_DEVICE, 28 | MEMORY_ERROR, 29 | INVALID_PARAMETER, 30 | INVALID_USE, 31 |
32 |   DRIVER_ERROR, 33 | SYSTEM_ERROR, 34 | THREAD_ERROR 35 |
36 | }
 

Defined RtError types.

38 | More...

Public Member Functions

41 |  RtError (const std::string &message, Type type=RtError::UNSPECIFIED) throw ()
 The constructor.
44 | virtual ~RtError (void) throw ()
 The destructor.
47 | virtual void printMessage (void) const throw ()
 Prints thrown error message to stderr.
50 | virtual const TypegetType (void) const throw ()
 Returns the thrown error message type.
53 | virtual const std::string & getMessage (void) const throw ()
 Returns the thrown error message string.
56 | virtual const char * what (void) const throw ()
 Returns the thrown error message as a c-style string.
59 |

Detailed Description

60 |

Exception handling class for RtAudio & RtMidi.

61 |

The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. See the RtAudio and RtMidi documentation to know which methods can throw an RtError.

62 |

Member Enumeration Documentation

63 | 64 |
65 |
66 | 67 | 68 | 69 | 70 |
enum RtError::Type
71 |
72 |
73 | 74 |

Defined RtError types.

75 |
Enumerator:
76 | 79 | 82 | 85 | 88 | 91 | 94 | 97 | 100 | 103 | 106 | 109 |
WARNING  77 |

A non-critical error.

78 |
DEBUG_WARNING  80 |

A non-critical error which might be useful for debugging.

81 |
UNSPECIFIED  83 |

The default, unspecified error type.

84 |
NO_DEVICES_FOUND  86 |

No devices found on system.

87 |
INVALID_DEVICE  89 |

An invalid device ID was specified.

90 |
MEMORY_ERROR  92 |

An error occured during memory allocation.

93 |
INVALID_PARAMETER  95 |

An invalid parameter was specified to a function.

96 |
INVALID_USE  98 |

The function was called incorrectly.

99 |
DRIVER_ERROR  101 |

A system driver error occured.

102 |
SYSTEM_ERROR  104 |

A system error occured.

105 |
THREAD_ERROR  107 |

A thread error occured.

108 |
110 |
111 |
112 | 113 |
114 |
115 |
The documentation for this class was generated from the following file: 118 |
119 |
120 | 121 | 122 | 124 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
123 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidi-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidi Member List

This is the complete list of members for RtMidi, including all inherited members. 13 | 14 | 15 | 16 | 17 | 18 |
closePort(void)=0RtMidi [pure virtual]
getPortCount()=0RtMidi [pure virtual]
getPortName(unsigned int portNumber=0)=0RtMidi [pure virtual]
openPort(unsigned int portNumber=0, const std::string portName=std::string("RtMidi"))=0RtMidi [pure virtual]
openVirtualPort(const std::string portName=std::string("RtMidi"))=0RtMidi [pure virtual]
19 |
20 | 21 | 22 | 24 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
23 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/classRtMidi.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidi.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidi Class Reference

13 |

An abstract base class for realtime MIDI input/output. 14 | More...

15 | 16 |

#include <RtMidi.h>

17 |
18 | Inheritance diagram for RtMidi:
19 |
20 |
21 | 22 | 23 | RtMidiIn 24 | RtMidiOut 25 | 26 |
27 |
28 | 29 |

List of all members.

30 | 31 | 32 | 34 | 35 | 37 | 38 | 40 | 41 | 43 | 44 | 46 | 47 |

Public Member Functions

33 | virtual void openPort (unsigned int portNumber=0, const std::string portName=std::string("RtMidi"))=0
 Pure virtual openPort() function.
36 | virtual void openVirtualPort (const std::string portName=std::string("RtMidi"))=0
 Pure virtual openVirtualPort() function.
39 | virtual unsigned int getPortCount ()=0
 Pure virtual getPortCount() function.
42 | virtual std::string getPortName (unsigned int portNumber=0)=0
 Pure virtual getPortName() function.
45 | virtual void closePort (void)=0
 Pure virtual closePort() function.
48 |

Detailed Description

49 |

An abstract base class for realtime MIDI input/output.

50 |

This class implements some common functionality for the realtime MIDI input/output subclasses RtMidiIn and RtMidiOut.

51 |

RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/

52 |

RtMidi: realtime MIDI i/o C++ classes Copyright (c) 2003-2011 Gary P. Scavone

53 |

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

54 |

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

55 |

Any person wishing to distribute modifications to the Software is requested to send the modifications to the original developer so that they can be incorporated into the canonical version.

56 |

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

57 |
The documentation for this class was generated from the following file: 60 |
61 |
62 | 63 | 64 | 66 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
65 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/classRtMidi.png -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiIn-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidiIn Member List

This is the complete list of members for RtMidiIn, including all inherited members. 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
cancelCallback()RtMidiIn
closePort(void)RtMidiIn [virtual]
getMessage(std::vector< unsigned char > *message)RtMidiIn
getPortCount()RtMidiIn [virtual]
getPortName(unsigned int portNumber=0)RtMidiIn [virtual]
ignoreTypes(bool midiSysex=true, bool midiTime=true, bool midiSense=true)RtMidiIn
openPort(unsigned int portNumber=0, const std::string Portname=std::string("RtMidi Input"))RtMidiIn [virtual]
openVirtualPort(const std::string portName=std::string("RtMidi Input"))RtMidiIn [virtual]
RtMidiCallback typedefRtMidiIn
RtMidiIn(const std::string clientName=std::string("RtMidi Input Client"), unsigned int queueSizeLimit=100)RtMidiIn
setCallback(RtMidiCallback callback, void *userData=0)RtMidiIn
~RtMidiIn()RtMidiIn
26 |
27 | 28 | 29 | 31 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
30 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiIn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/classRtMidiIn.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/classRtMidiIn.png -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiOut-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidiOut Member List

This is the complete list of members for RtMidiOut, including all inherited members. 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
closePort()RtMidiOut [virtual]
getPortCount()RtMidiOut [virtual]
getPortName(unsigned int portNumber=0)RtMidiOut [virtual]
openPort(unsigned int portNumber=0, const std::string portName=std::string("RtMidi Output"))RtMidiOut [virtual]
openVirtualPort(const std::string portName=std::string("RtMidi Output"))RtMidiOut [virtual]
RtMidiOut(const std::string clientName=std::string("RtMidi Output Client"))RtMidiOut
sendMessage(std::vector< unsigned char > *message)RtMidiOut
~RtMidiOut()RtMidiOut
22 |
23 | 24 | 25 | 27 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
26 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiOut.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/classRtMidiOut.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiOut.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidiOut Class Reference

13 |

A realtime MIDI output class. 14 | More...

15 | 16 |

#include <RtMidi.h>

17 |
18 | Inheritance diagram for RtMidiOut:
19 |
20 |
21 | 22 | 23 | RtMidi 24 | 25 |
26 |
27 | 28 |

List of all members.

29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 |

Public Member Functions

 RtMidiOut (const std::string clientName=std::string("RtMidi Output Client"))
 Default constructor that allows an optional client name.
34 |  ~RtMidiOut ()
 The destructor closes any open MIDI connections.
void openPort (unsigned int portNumber=0, const std::string portName=std::string("RtMidi Output"))
 Open a MIDI output connection.
39 | void closePort ()
 Close an open MIDI connection (if one exists).
void openVirtualPort (const std::string portName=std::string("RtMidi Output"))
 Create a virtual output port, with optional name, to allow software connections (OS X and ALSA only).
44 | unsigned int getPortCount ()
 Return the number of available MIDI output ports.
std::string getPortName (unsigned int portNumber=0)
 Return a string identifier for the specified MIDI port type and number.
void sendMessage (std::vector< unsigned char > *message)
 Immediately send a single message out an open MIDI output port.
51 |

Detailed Description

52 |

A realtime MIDI output class.

53 |

This class provides a common, platform-independent API for MIDI output. It allows one to probe available MIDI output ports, to connect to one such port, and to send MIDI bytes immediately over the connection. Create multiple instances of this class to connect to more than one MIDI device at the same time.

54 |

by Gary P. Scavone, 2003-2008.

55 |

Constructor & Destructor Documentation

56 | 57 |
58 |
59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
RtMidiOut::RtMidiOut (const std::string  clientName = std::string("RtMidi Output Client") ) 
69 |
70 |
71 | 72 |

Default constructor that allows an optional client name.

73 |

An exception will be thrown if a MIDI system initialization error occurs.

74 | 75 |
76 |
77 |

Member Function Documentation

78 | 79 |
80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
void RtMidiOut::openPort (unsigned int  portNumber = 0,
const std::string  portName = std::string("RtMidi Output") 
) [virtual]
100 |
101 |
102 | 103 |

Open a MIDI output connection.

104 |

An optional port number greater than 0 can be specified. Otherwise, the default or first port found is opened. An exception is thrown if an error occurs while attempting to make the port connection.

105 | 106 |

Implements RtMidi.

107 | 108 |
109 |
110 | 111 |
112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 |
void RtMidiOut::openVirtualPort (const std::string  portName = std::string("RtMidi Output") )  [virtual]
123 |
124 |
125 | 126 |

Create a virtual output port, with optional name, to allow software connections (OS X and ALSA only).

127 |

This function creates a virtual MIDI output port to which other software applications can connect. This type of functionality is currently only supported by the Macintosh OS-X and Linux ALSA APIs (the function does nothing with the other APIs). An exception is thrown if an error occurs while attempting to create the virtual port.

128 | 129 |

Implements RtMidi.

130 | 131 |
132 |
133 | 134 |
135 |
136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 |
std::string RtMidiOut::getPortName (unsigned int  portNumber = 0 )  [virtual]
146 |
147 |
148 | 149 |

Return a string identifier for the specified MIDI port type and number.

150 |

An empty string is returned if an invalid port specifier is provided.

151 | 152 |

Implements RtMidi.

153 | 154 |
155 |
156 | 157 |
158 |
159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
void RtMidiOut::sendMessage (std::vector< unsigned char > *  message ) 
169 |
170 |
171 | 172 |

Immediately send a single message out an open MIDI output port.

173 |

An exception is thrown if an error occurs during output or an output connection was not previously established.

174 | 175 |
176 |
177 |
The documentation for this class was generated from the following file: 180 |
181 |
182 | 183 | 184 | 186 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
185 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classRtMidiOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/classRtMidiOut.png -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

Class Index

M | R
13 | 14 |
  M  
15 |
RtMidiIn::MidiQueue   RtError   RtMidiIn   RtMidiOut   
RtMidiIn::MidiMessage   
  R  
16 |
RtMidi   RtMidiIn::RtMidiInData   
M | R
17 |
18 |
19 | 20 | 21 | 23 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
22 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/doxygen.css: -------------------------------------------------------------------------------- 1 | /* The standard CSS for doxygen */ 2 | 3 | body, table, div, p, dl { 4 | font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; 5 | font-size: 12px; 6 | } 7 | 8 | /* @group Heading Levels */ 9 | 10 | h1 { 11 | text-align: center; 12 | font-size: 150%; 13 | } 14 | 15 | h2 { 16 | font-size: 120%; 17 | } 18 | 19 | h3 { 20 | font-size: 100%; 21 | } 22 | 23 | dt { 24 | font-weight: bold; 25 | } 26 | 27 | div.multicol { 28 | -moz-column-gap: 1em; 29 | -webkit-column-gap: 1em; 30 | -moz-column-count: 3; 31 | -webkit-column-count: 3; 32 | } 33 | 34 | p.startli, p.startdd, p.starttd { 35 | margin-top: 2px; 36 | } 37 | 38 | p.endli { 39 | margin-bottom: 0px; 40 | } 41 | 42 | p.enddd { 43 | margin-bottom: 4px; 44 | } 45 | 46 | p.endtd { 47 | margin-bottom: 2px; 48 | } 49 | 50 | /* @end */ 51 | 52 | caption { 53 | font-weight: bold; 54 | } 55 | 56 | span.legend { 57 | font-size: 70%; 58 | text-align: center; 59 | } 60 | 61 | h3.version { 62 | font-size: 90%; 63 | text-align: center; 64 | } 65 | 66 | div.qindex, div.navtab{ 67 | background-color: #e8eef2; 68 | border: 1px solid #84b0c7; 69 | text-align: center; 70 | margin: 2px; 71 | padding: 2px; 72 | } 73 | 74 | div.qindex, div.navpath { 75 | width: 100%; 76 | line-height: 140%; 77 | } 78 | 79 | div.navtab { 80 | margin-right: 15px; 81 | } 82 | 83 | /* @group Link Styling */ 84 | 85 | a { 86 | color: #153788; 87 | font-weight: normal; 88 | text-decoration: none; 89 | } 90 | 91 | .contents a:visited { 92 | color: #1b77c5; 93 | } 94 | 95 | a:hover { 96 | text-decoration: underline; 97 | } 98 | 99 | a.qindex { 100 | font-weight: bold; 101 | } 102 | 103 | a.qindexHL { 104 | font-weight: bold; 105 | background-color: #6666cc; 106 | color: #ffffff; 107 | border: 1px double #9295C2; 108 | } 109 | 110 | .contents a.qindexHL:visited { 111 | color: #ffffff; 112 | } 113 | 114 | a.el { 115 | font-weight: bold; 116 | } 117 | 118 | a.elRef { 119 | } 120 | 121 | a.code { 122 | color: #3030f0; 123 | } 124 | 125 | a.codeRef { 126 | color: #3030f0; 127 | } 128 | 129 | /* @end */ 130 | 131 | dl.el { 132 | margin-left: -1cm; 133 | } 134 | 135 | .fragment { 136 | font-family: monospace, fixed; 137 | font-size: 105%; 138 | } 139 | 140 | pre.fragment { 141 | border: 1px solid #CCCCCC; 142 | background-color: #f5f5f5; 143 | padding: 4px 6px; 144 | margin: 4px 8px 4px 2px; 145 | overflow: auto; 146 | word-wrap: break-word; 147 | font-size: 9pt; 148 | line-height: 125%; 149 | } 150 | 151 | div.ah { 152 | background-color: black; 153 | font-weight: bold; 154 | color: #ffffff; 155 | margin-bottom: 3px; 156 | margin-top: 3px 157 | } 158 | 159 | div.groupHeader { 160 | margin-left: 16px; 161 | margin-top: 12px; 162 | margin-bottom: 6px; 163 | font-weight: bold; 164 | } 165 | 166 | div.groupText { 167 | margin-left: 16px; 168 | font-style: italic; 169 | } 170 | 171 | body { 172 | background: white; 173 | color: black; 174 | margin-right: 20px; 175 | margin-left: 20px; 176 | } 177 | 178 | td.indexkey { 179 | background-color: #e8eef2; 180 | font-weight: bold; 181 | border: 1px solid #CCCCCC; 182 | margin: 2px 0px 2px 0; 183 | padding: 2px 10px; 184 | } 185 | 186 | td.indexvalue { 187 | background-color: #e8eef2; 188 | border: 1px solid #CCCCCC; 189 | padding: 2px 10px; 190 | margin: 2px 0px; 191 | } 192 | 193 | tr.memlist { 194 | background-color: #f0f0f0; 195 | } 196 | 197 | p.formulaDsp { 198 | text-align: center; 199 | } 200 | 201 | img.formulaDsp { 202 | 203 | } 204 | 205 | img.formulaInl { 206 | vertical-align: middle; 207 | } 208 | 209 | div.center { 210 | text-align: center; 211 | margin-top: 0px; 212 | margin-bottom: 0px; 213 | padding: 0px; 214 | } 215 | 216 | div.center img { 217 | border: 0px; 218 | } 219 | 220 | img.footer { 221 | border: 0px; 222 | vertical-align: middle; 223 | } 224 | 225 | /* @group Code Colorization */ 226 | 227 | span.keyword { 228 | color: #008000 229 | } 230 | 231 | span.keywordtype { 232 | color: #604020 233 | } 234 | 235 | span.keywordflow { 236 | color: #e08000 237 | } 238 | 239 | span.comment { 240 | color: #800000 241 | } 242 | 243 | span.preprocessor { 244 | color: #806020 245 | } 246 | 247 | span.stringliteral { 248 | color: #002080 249 | } 250 | 251 | span.charliteral { 252 | color: #008080 253 | } 254 | 255 | span.vhdldigit { 256 | color: #ff00ff 257 | } 258 | 259 | span.vhdlchar { 260 | color: #000000 261 | } 262 | 263 | span.vhdlkeyword { 264 | color: #700070 265 | } 266 | 267 | span.vhdllogic { 268 | color: #ff0000 269 | } 270 | 271 | /* @end */ 272 | 273 | .search { 274 | color: #003399; 275 | font-weight: bold; 276 | } 277 | 278 | form.search { 279 | margin-bottom: 0px; 280 | margin-top: 0px; 281 | } 282 | 283 | input.search { 284 | font-size: 75%; 285 | color: #000080; 286 | font-weight: normal; 287 | background-color: #e8eef2; 288 | } 289 | 290 | td.tiny { 291 | font-size: 75%; 292 | } 293 | 294 | .dirtab { 295 | padding: 4px; 296 | border-collapse: collapse; 297 | border: 1px solid #84b0c7; 298 | } 299 | 300 | th.dirtab { 301 | background: #e8eef2; 302 | font-weight: bold; 303 | } 304 | 305 | hr { 306 | height: 0; 307 | border: none; 308 | border-top: 1px solid #666; 309 | } 310 | 311 | /* @group Member Descriptions */ 312 | 313 | .mdescLeft, .mdescRight, 314 | .memItemLeft, .memItemRight, 315 | .memTemplItemLeft, .memTemplItemRight, .memTemplParams { 316 | background-color: #FAFAFA; 317 | border: none; 318 | margin: 4px; 319 | padding: 1px 0 0 8px; 320 | } 321 | 322 | .mdescLeft, .mdescRight { 323 | padding: 0px 8px 4px 8px; 324 | color: #555; 325 | } 326 | 327 | .memItemLeft, .memItemRight, .memTemplParams { 328 | border-top: 1px solid #ccc; 329 | } 330 | 331 | .memItemLeft, .memTemplItemLeft { 332 | white-space: nowrap; 333 | } 334 | 335 | .memTemplParams { 336 | color: #606060; 337 | white-space: nowrap; 338 | } 339 | 340 | /* @end */ 341 | 342 | /* @group Member Details */ 343 | 344 | /* Styles for detailed member documentation */ 345 | 346 | .memtemplate { 347 | font-size: 80%; 348 | color: #606060; 349 | font-weight: normal; 350 | margin-left: 3px; 351 | } 352 | 353 | .memnav { 354 | background-color: #e8eef2; 355 | border: 1px solid #84b0c7; 356 | text-align: center; 357 | margin: 2px; 358 | margin-right: 15px; 359 | padding: 2px; 360 | } 361 | 362 | .memitem { 363 | padding: 0; 364 | margin-bottom: 10px; 365 | } 366 | 367 | .memname { 368 | white-space: nowrap; 369 | font-weight: bold; 370 | } 371 | 372 | .memproto, .memdoc { 373 | border: 1px solid #84b0c7; 374 | } 375 | 376 | .memproto { 377 | padding: 0; 378 | background-color: #d5e1e8; 379 | font-weight: bold; 380 | -webkit-border-top-left-radius: 8px; 381 | -webkit-border-top-right-radius: 8px; 382 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 383 | -moz-border-radius-topleft: 8px; 384 | -moz-border-radius-topright: 8px; 385 | -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; 386 | 387 | } 388 | 389 | .memdoc { 390 | padding: 2px 5px; 391 | background-color: #eef3f5; 392 | border-top-width: 0; 393 | -webkit-border-bottom-left-radius: 8px; 394 | -webkit-border-bottom-right-radius: 8px; 395 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 396 | -moz-border-radius-bottomleft: 8px; 397 | -moz-border-radius-bottomright: 8px; 398 | -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; 399 | } 400 | 401 | .paramkey { 402 | text-align: right; 403 | } 404 | 405 | .paramtype { 406 | white-space: nowrap; 407 | } 408 | 409 | .paramname { 410 | color: #602020; 411 | white-space: nowrap; 412 | } 413 | .paramname em { 414 | font-style: normal; 415 | } 416 | 417 | /* @end */ 418 | 419 | /* @group Directory (tree) */ 420 | 421 | /* for the tree view */ 422 | 423 | .ftvtree { 424 | font-family: sans-serif; 425 | margin: 0.5em; 426 | } 427 | 428 | /* these are for tree view when used as main index */ 429 | 430 | .directory { 431 | font-size: 9pt; 432 | font-weight: bold; 433 | } 434 | 435 | .directory h3 { 436 | margin: 0px; 437 | margin-top: 1em; 438 | font-size: 11pt; 439 | } 440 | 441 | /* 442 | The following two styles can be used to replace the root node title 443 | with an image of your choice. Simply uncomment the next two styles, 444 | specify the name of your image and be sure to set 'height' to the 445 | proper pixel height of your image. 446 | */ 447 | 448 | /* 449 | .directory h3.swap { 450 | height: 61px; 451 | background-repeat: no-repeat; 452 | background-image: url("yourimage.gif"); 453 | } 454 | .directory h3.swap span { 455 | display: none; 456 | } 457 | */ 458 | 459 | .directory > h3 { 460 | margin-top: 0; 461 | } 462 | 463 | .directory p { 464 | margin: 0px; 465 | white-space: nowrap; 466 | } 467 | 468 | .directory div { 469 | display: none; 470 | margin: 0px; 471 | } 472 | 473 | .directory img { 474 | vertical-align: -30%; 475 | } 476 | 477 | /* these are for tree view when not used as main index */ 478 | 479 | .directory-alt { 480 | font-size: 100%; 481 | font-weight: bold; 482 | } 483 | 484 | .directory-alt h3 { 485 | margin: 0px; 486 | margin-top: 1em; 487 | font-size: 11pt; 488 | } 489 | 490 | .directory-alt > h3 { 491 | margin-top: 0; 492 | } 493 | 494 | .directory-alt p { 495 | margin: 0px; 496 | white-space: nowrap; 497 | } 498 | 499 | .directory-alt div { 500 | display: none; 501 | margin: 0px; 502 | } 503 | 504 | .directory-alt img { 505 | vertical-align: -30%; 506 | } 507 | 508 | /* @end */ 509 | 510 | address { 511 | font-style: normal; 512 | color: #333; 513 | } 514 | 515 | table.doxtable { 516 | border-collapse:collapse; 517 | } 518 | 519 | table.doxtable td, table.doxtable th { 520 | border: 1px solid #153788; 521 | padding: 3px 7px 2px; 522 | } 523 | 524 | table.doxtable th { 525 | background-color: #254798; 526 | color: #FFFFFF; 527 | font-size: 110%; 528 | padding-bottom: 4px; 529 | padding-top: 5px; 530 | text-align:left; 531 | } 532 | 533 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/doxygen.png -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

File List

Here is a list of all documented files with brief descriptions: 13 | 14 | 15 |
RtError.h [code]
RtMidi.h [code]
16 |
17 |
18 | 19 | 20 | 22 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
21 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/functions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 | 19 |
20 |
21 |
    22 |
  • c
  • 23 |
  • d
  • 24 |
  • g
  • 25 |
  • i
  • 26 |
  • m
  • 27 |
  • n
  • 28 |
  • o
  • 29 |
  • p
  • 30 |
  • r
  • 31 |
  • s
  • 32 |
  • t
  • 33 |
  • u
  • 34 |
  • w
  • 35 |
  • ~
  • 36 |
37 |
38 |
39 | Here is a list of all documented class members with links to the class documentation for each member: 40 | 41 |

- c -

51 | 52 | 53 |

- d -

    54 |
  • DEBUG_WARNING 55 | : RtError 56 |
  • 57 |
  • DRIVER_ERROR 58 | : RtError 59 |
  • 60 |
61 | 62 | 63 |

- g -

82 | 83 | 84 |

- i -

    85 |
  • ignoreTypes() 86 | : RtMidiIn 87 |
  • 88 |
  • INVALID_DEVICE 89 | : RtError 90 |
  • 91 |
  • INVALID_PARAMETER 92 | : RtError 93 |
  • 94 |
  • INVALID_USE 95 | : RtError 96 |
  • 97 |
98 | 99 | 100 |

- m -

    101 |
  • MEMORY_ERROR 102 | : RtError 103 |
  • 104 |
105 | 106 | 107 |

- n -

    108 |
  • NO_DEVICES_FOUND 109 | : RtError 110 |
  • 111 |
112 | 113 | 114 |

- o -

126 | 127 | 128 |

- p -

    129 |
  • printMessage() 130 | : RtError 131 |
  • 132 |
133 | 134 | 135 |

- r -

    136 |
  • RtError() 137 | : RtError 138 |
  • 139 |
  • RtMidiCallback 140 | : RtMidiIn 141 |
  • 142 |
  • RtMidiIn() 143 | : RtMidiIn 144 |
  • 145 |
  • RtMidiOut() 146 | : RtMidiOut 147 |
  • 148 |
149 | 150 | 151 |

- s -

    152 |
  • sendMessage() 153 | : RtMidiOut 154 |
  • 155 |
  • setCallback() 156 | : RtMidiIn 157 |
  • 158 |
  • SYSTEM_ERROR 159 | : RtError 160 |
  • 161 |
162 | 163 | 164 |

- t -

    165 |
  • THREAD_ERROR 166 | : RtError 167 |
  • 168 |
  • Type 169 | : RtError 170 |
  • 171 |
172 | 173 | 174 |

- u -

    175 |
  • UNSPECIFIED 176 | : RtError 177 |
  • 178 |
179 | 180 | 181 |

- w -

    182 |
  • WARNING 183 | : RtError 184 |
  • 185 |
  • what() 186 | : RtError 187 |
  • 188 |
189 | 190 | 191 |

- ~ -

    192 |
  • ~RtError() 193 | : RtError 194 |
  • 195 |
  • ~RtMidiIn() 196 | : RtMidiIn 197 |
  • 198 |
  • ~RtMidiOut() 199 | : RtMidiOut 200 |
  • 201 |
202 |
203 |
204 | 205 | 206 | 208 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
207 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/functions_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 | 19 |
20 |
21 |  
    22 |
  • Type 23 | : RtError 24 |
  • 25 |
26 |
27 |
28 | 29 | 30 | 32 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
31 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/functions_eval.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 | 19 |
20 |
21 |  
    22 |
  • DEBUG_WARNING 23 | : RtError 24 |
  • 25 |
  • DRIVER_ERROR 26 | : RtError 27 |
  • 28 |
  • INVALID_DEVICE 29 | : RtError 30 |
  • 31 |
  • INVALID_PARAMETER 32 | : RtError 33 |
  • 34 |
  • INVALID_USE 35 | : RtError 36 |
  • 37 |
  • MEMORY_ERROR 38 | : RtError 39 |
  • 40 |
  • NO_DEVICES_FOUND 41 | : RtError 42 |
  • 43 |
  • SYSTEM_ERROR 44 | : RtError 45 |
  • 46 |
  • THREAD_ERROR 47 | : RtError 48 |
  • 49 |
  • UNSPECIFIED 50 | : RtError 51 |
  • 52 |
  • WARNING 53 | : RtError 54 |
  • 55 |
56 |
57 |
58 | 59 | 60 | 62 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
61 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/functions_func.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 | 19 |
20 |
21 |   91 |
92 |
93 | 94 | 95 | 97 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
96 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/functions_type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 | 19 |
20 |
21 |  
    22 |
  • RtMidiCallback 23 | : RtMidiIn 24 |
  • 25 |
26 |
27 |
28 | 29 | 30 | 32 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
31 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/hierarchy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: 23 |
24 |
25 | 26 | 27 | 29 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
28 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/structRtMidiIn_1_1MidiMessage-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidiIn::MidiMessage Member List

This is the complete list of members for RtMidiIn::MidiMessage, including all inherited members. 13 |
14 |
15 | 16 | 17 | 19 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
18 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/structRtMidiIn_1_1MidiMessage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 | 13 |
14 |

RtMidiIn::MidiMessage Struct Reference

15 |

List of all members.

16 | 17 |
18 |
The documentation for this struct was generated from the following file: 21 |
22 |
23 | 24 | 25 | 27 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
26 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/structRtMidiIn_1_1MidiQueue-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidiIn::MidiQueue Member List

This is the complete list of members for RtMidiIn::MidiQueue, including all inherited members. 13 |
14 |
15 | 16 | 17 | 19 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
18 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/structRtMidiIn_1_1MidiQueue.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 | 13 |
14 |

RtMidiIn::MidiQueue Struct Reference

15 |

List of all members.

16 | 17 |
18 |
The documentation for this struct was generated from the following file: 21 |
22 |
23 | 24 | 25 | 27 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
26 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/structRtMidiIn_1_1RtMidiInData-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 |
12 |

RtMidiIn::RtMidiInData Member List

This is the complete list of members for RtMidiIn::RtMidiInData, including all inherited members. 13 |
14 |
15 | 16 | 17 | 19 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
18 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/structRtMidiIn_1_1RtMidiInData.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | The RtMidi Tutorial 4 | 5 | 6 | 7 |
8 | Tutorial   Class/Enum List   File List   Compound Members  
9 |
10 | 11 | 13 |
14 |

RtMidiIn::RtMidiInData Struct Reference

15 |

List of all members.

16 | 17 |
18 |
The documentation for this struct was generated from the following file: 21 |
22 |
23 | 24 | 25 | 27 |
©2003-2011 Gary P. Scavone, McGill University. All Rights Reserved.
26 | Maintained by Gary P. Scavone, gary at music.mcgill.ca
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/tab_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/tab_b.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/tab_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/tab_l.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/tab_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/html/tab_r.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/html/tabs.css: -------------------------------------------------------------------------------- 1 | /* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ 2 | 3 | DIV.tabs 4 | { 5 | float : left; 6 | width : 100%; 7 | background : url("tab_b.gif") repeat-x bottom; 8 | margin-bottom : 4px; 9 | } 10 | 11 | DIV.tabs UL 12 | { 13 | margin : 0px; 14 | padding-left : 10px; 15 | list-style : none; 16 | } 17 | 18 | DIV.tabs LI, DIV.tabs FORM 19 | { 20 | display : inline; 21 | margin : 0px; 22 | padding : 0px; 23 | } 24 | 25 | DIV.tabs FORM 26 | { 27 | float : right; 28 | } 29 | 30 | DIV.tabs A 31 | { 32 | float : left; 33 | background : url("tab_r.gif") no-repeat right top; 34 | border-bottom : 1px solid #84B0C7; 35 | font-size : 80%; 36 | font-weight : bold; 37 | text-decoration : none; 38 | } 39 | 40 | DIV.tabs A:hover 41 | { 42 | background-position: 100% -150px; 43 | } 44 | 45 | DIV.tabs A:link, DIV.tabs A:visited, 46 | DIV.tabs A:active, DIV.tabs A:hover 47 | { 48 | color: #1A419D; 49 | } 50 | 51 | DIV.tabs SPAN 52 | { 53 | float : left; 54 | display : block; 55 | background : url("tab_l.gif") no-repeat left top; 56 | padding : 5px 9px; 57 | white-space : nowrap; 58 | } 59 | 60 | DIV.tabs #MSearchBox 61 | { 62 | float : right; 63 | display : inline; 64 | font-size : 1em; 65 | } 66 | 67 | DIV.tabs TD 68 | { 69 | font-size : 80%; 70 | font-weight : bold; 71 | text-decoration : none; 72 | } 73 | 74 | 75 | 76 | /* Commented Backslash Hack hides rule from IE5-Mac \*/ 77 | DIV.tabs SPAN {float : none;} 78 | /* End IE5-Mac hack */ 79 | 80 | DIV.tabs A:hover SPAN 81 | { 82 | background-position: 0% -150px; 83 | } 84 | 85 | DIV.tabs LI.current A 86 | { 87 | background-position: 100% -150px; 88 | border-width : 0px; 89 | } 90 | 91 | DIV.tabs LI.current SPAN 92 | { 93 | background-position: 0% -150px; 94 | padding-bottom : 6px; 95 | } 96 | 97 | DIV.navpath 98 | { 99 | background : none; 100 | border : none; 101 | border-bottom : 1px solid #84B0C7; 102 | text-align : center; 103 | margin : 2px; 104 | padding : 2px; 105 | } 106 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/images/ccrma.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/images/ccrma.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/images/mcgill.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jarnoh/qmlmidi/3c0350c5778b71650785f0ed0c35e870936c036d/rtmidi-1.0.15/doc/images/mcgill.gif -------------------------------------------------------------------------------- /rtmidi-1.0.15/doc/release.txt: -------------------------------------------------------------------------------- 1 | RtMidi - a set of C++ classes that provides a common API for realtime MIDI input/output across Linux (ALSA & Jack), Macintosh OS X (CoreMidi), Windows (Multimedia), and SGI operating systems. 2 | 3 | By Gary P. Scavone, 2003-2011. 4 | 5 | v1.0.15: (11 August 2011) 6 | - updates for wide character support in Windows 7 | - stopped using std::queue and implemented internal MIDI ring buffer (for thread safety ... thanks to Michael Behrman) 8 | - removal of the setQueueSizeLimit() function ... queue size limit now an optional arguement to constructor 9 | 10 | v1.0.14: (17 April 2011) 11 | - bug fix to Jack MIDI support (thanks to Alexander Svetalkin and Pedro Lopez-Cabanillas) 12 | 13 | v1.0.13: (7 April 2011) 14 | - updated RtError.h to the same version as in RtAudio 15 | - new Jack MIDI support in Linux (thanks to Alexander Svetalkin) 16 | 17 | v1.0.12: (17 February 2011) 18 | - Windows 64-bit pointer fixes (thanks to Ward Kockelkorn) 19 | - removed possible exceptions from getPortName() functions 20 | - changed sysex sends in OS-X to use MIDISendSysex() function (thanks to Casey Tucker) 21 | - bug fixes to time code parsing in OS-X and ALSA (thanks to Greg) 22 | - added MSW project file to build as library (into lib/ directory ... thanks to Jason Champion) 23 | 24 | v1.0.11: (29 January 2010) 25 | - added CoreServices/CoreServices.h include for OS-X 10.6 and gcc4.2 compile (thanks to Jon McCormack) 26 | - various increment optimizations (thanks to Paul Dean) 27 | - fixed incorrectly located snd_seq_close() function in ALSA API (thanks to Pedro Lopez-Cabanillas) 28 | - updates to Windows sysex code to better deal with possible delivery problems (thanks to Bastiaan Verreijt) 29 | 30 | v1.0.10: (3 June 2009) 31 | - fix adding timestamp to OS-X sendMessage() function (thanks to John Dey) 32 | 33 | v1.0.9: (30 April 2009) 34 | - added #ifdef AVOID_TIMESTAMPING to conditionally compile support for event timestamping of ALSA sequencer events. This is useful for programs not needing timestamps, saving valuable system resources. 35 | - updated functionality in OSX_CORE for getting driver name (thanks to Casey Tucker) 36 | 37 | v1.0.8: (29 January 2009) 38 | - bug fixes for concatenating segmented sysex messages in ALSA (thanks to Christoph Eckert) 39 | - update to ALSA sequencer port enumeration (thanks to Pedro Lopez-Cabonillas) 40 | - bug fixes for concatenating segmented sysex messages in OS-X (thanks to Emmanuel Litzroth) 41 | - added functionality for naming clients (thanks to Pedro Lopez-Cabonillas and Axel Schmidt) 42 | - bug fix in Windows when receiving sysex messages if the ignore flag was set (thanks to Pedro Lopez-Cabonillas) 43 | 44 | v1.0.7: (7 December 2007) 45 | - configure and Makefile changes for MinGW 46 | - renamed midiinfo.cpp to midiprobe.cpp and updated VC++ project/workspace 47 | 48 | v1.0.6: (9 March 2006) 49 | - bug fix for timestamp problem in ALSA (thanks to Pedro Lopez-Cabanillas) 50 | 51 | v1.0.5: (18 November 2005) 52 | - added optional port name to openVirtualPort() functions 53 | - fixed UNICODE problem in Windows getting device names (thanks Eduardo Coutinho!). 54 | - fixed bug in Windows with respect to getting Sysex data (thanks Jean-Baptiste Berruchon!) 55 | 56 | v1.0.4: (14 October 2005) 57 | - added check for status byte == 0xF8 if ignoring timing messages 58 | - changed pthread attribute to SCHED_OTHER (from SCHED_RR) to avoid thread problem when realtime cababilities are not enabled. 59 | - now using ALSA sequencer time stamp information (thanks to Pedro Lopez-Cabanillas) 60 | - fixed memory leak in ALSA implementation 61 | - now concatenate segmented sysex messages in ALSA 62 | 63 | v1.0.3: (22 November 2004) 64 | - added common pure virtual functions to RtMidi abstract base class 65 | 66 | v1.0.2: (21 September 2004) 67 | - added warning messages to openVirtualPort() functions in Windows and Irix (where it can't be implemented) 68 | 69 | v1.0.1: (20 September 2004) 70 | - changed ALSA preprocessor definition to __LINUX_ALSASEQ__ 71 | 72 | v1.0.0: (17 September 2004) 73 | - first release of new independent class with both input and output functionality 74 | 75 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/msw/readme: -------------------------------------------------------------------------------- 1 | This directory contains a Visual Studio 2008 project, contributed by Jason Champion, to build rtmidi as a library. The library builds to the \lib directory. -------------------------------------------------------------------------------- /rtmidi-1.0.15/msw/rtmidilib.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtmidilib", "rtmidilib.vcproj", "{EBFE5EB3-182A-47A6-922B-52ECF777F6A3}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Debug|Win32.Build.0 = Debug|Win32 14 | {EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Release|Win32.ActiveCfg = Release|Win32 15 | {EBFE5EB3-182A-47A6-922B-52ECF777F6A3}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/msw/rtmidilib.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 25 | 28 | 31 | 34 | 37 | 40 | 50 | 53 | 56 | 59 | 63 | 66 | 69 | 72 | 75 | 78 | 79 | 87 | 90 | 93 | 96 | 99 | 102 | 112 | 115 | 118 | 121 | 125 | 128 | 131 | 134 | 137 | 140 | 141 | 142 | 143 | 144 | 145 | 150 | 153 | 154 | 155 | 160 | 163 | 164 | 167 | 168 | 169 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/readme: -------------------------------------------------------------------------------- 1 | RtMidi - a set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & Jack), Macintosh OS X (CoreMidi), Windows (Multimedia) and SGI operating systems. 2 | 3 | By Gary P. Scavone, 2003-2011. 4 | 5 | This distribution of RtMidi contains the following: 6 | 7 | doc: RtMidi documentation (see doc/html/index.html) 8 | tests: example RtMidi programs 9 | 10 | On unix systems, type "./configure" in the top level directory, then "make" in the tests/ directory to compile the test programs. In Windows, open the Visual C++ workspace file located in the tests/ directory. 11 | 12 | OVERVIEW: 13 | 14 | RtMidi is a set of C++ classes (RtMidiIn and RtMidiOut) that provide a common API (Application Programming Interface) for realtime MIDI input/output across Linux (ALSA), Macintosh OS X, SGI, and Windows (Multimedia Library) operating systems. RtMidi significantly simplifies the process of interacting with computer MIDI hardware and software. It was designed with the following goals: 15 | 16 | - object oriented C++ design 17 | - simple, common API across all supported platforms 18 | - only two header files and one source file for easy inclusion in programming projects 19 | - MIDI device enumeration 20 | 21 | MIDI input and output functionality are separated into two classes, RtMidiIn and RtMidiOut. Each class instance supports only a single MIDI connection. RtMidi does not provide timing functionality (i.e., output messages are sent immediately). Input messages are timestamped with delta times in seconds (via a double floating point type). MIDI data is passed to the user as raw bytes using an std::vector. 22 | 23 | FURTHER READING: 24 | 25 | For complete documentation on RtMidi, see the doc directory of the distribution or surf to http://music.mcgill.ca/~gary/rtmidi/. 26 | 27 | 28 | LEGAL AND ETHICAL: 29 | 30 | The RtMidi license is similar to the the MIT License, with the added "feature" that modifications be sent to the developer. 31 | 32 | RtMidi: realtime MIDI i/o C++ classes 33 | Copyright (c) 2003-2011 Gary P. Scavone 34 | 35 | Permission is hereby granted, free of charge, to any person 36 | obtaining a copy of this software and associated documentation files 37 | (the "Software"), to deal in the Software without restriction, 38 | including without limitation the rights to use, copy, modify, merge, 39 | publish, distribute, sublicense, and/or sell copies of the Software, 40 | and to permit persons to whom the Software is furnished to do so, 41 | subject to the following conditions: 42 | 43 | The above copyright notice and this permission notice shall be 44 | included in all copies or substantial portions of the Software. 45 | 46 | Any person wishing to distribute modifications to the Software is 47 | requested to send the modifications to the original developer so that 48 | they can be incorporated into the canonical version. 49 | 50 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 51 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 52 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 53 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 54 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 55 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 56 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 57 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/Makefile.in: -------------------------------------------------------------------------------- 1 | ### Do not edit -- Generated by 'configure --with-whatever' from Makefile.in 2 | ### RtMidi tests Makefile - for various flavors of unix 3 | 4 | PROGRAMS = midiprobe midiout qmidiin cmidiin sysextest 5 | RM = /bin/rm 6 | SRC_PATH = .. 7 | INCLUDE = .. 8 | OBJECT_PATH = @object_path@ 9 | vpath %.o $(OBJECT_PATH) 10 | 11 | OBJECTS = RtMidi.o 12 | 13 | CC = @CXX@ 14 | DEFS = @CPPFLAGS@ 15 | CFLAGS = @CXXFLAGS@ 16 | CFLAGS += -I$(INCLUDE) 17 | LIBRARY = @LIBS@ 18 | 19 | %.o : $(SRC_PATH)/%.cpp 20 | $(CC) $(CFLAGS) $(DEFS) -c $(<) -o $(OBJECT_PATH)/$@ 21 | 22 | all : $(PROGRAMS) 23 | 24 | midiprobe : midiprobe.cpp $(OBJECTS) 25 | $(CC) $(CFLAGS) $(DEFS) -o midiprobe midiprobe.cpp $(OBJECT_PATH)/RtMidi.o $(LIBRARY) 26 | 27 | midiout : midiout.cpp $(OBJECTS) 28 | $(CC) $(CFLAGS) $(DEFS) -o midiout midiout.cpp $(OBJECT_PATH)/RtMidi.o $(LIBRARY) 29 | 30 | qmidiin : qmidiin.cpp $(OBJECTS) 31 | $(CC) $(CFLAGS) $(DEFS) -o qmidiin qmidiin.cpp $(OBJECT_PATH)/RtMidi.o $(LIBRARY) 32 | 33 | cmidiin : cmidiin.cpp $(OBJECTS) 34 | $(CC) $(CFLAGS) $(DEFS) -o cmidiin cmidiin.cpp $(OBJECT_PATH)/RtMidi.o $(LIBRARY) 35 | 36 | sysextest : sysextest.cpp $(OBJECTS) 37 | $(CC) $(CFLAGS) $(DEFS) -o sysextest sysextest.cpp $(OBJECT_PATH)/RtMidi.o $(LIBRARY) 38 | 39 | clean : 40 | $(RM) -f $(OBJECT_PATH)/*.o 41 | $(RM) -f $(PROGRAMS) *.exe 42 | $(RM) -f *~ 43 | 44 | distclean: clean 45 | $(RM) -f Makefile 46 | 47 | strip : 48 | strip $(PROGRAMS) 49 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/RtMidi.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "cmidiin"=".\cmidiin.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "midiout"=".\midiout.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "midiprobe"=".\midiprobe.dsp" - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "qmidiin"=".\qmidiin.dsp" - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | Project: "sysextest"=".\sysextest.dsp" - Package Owner=<4> 55 | 56 | Package=<5> 57 | {{{ 58 | }}} 59 | 60 | Package=<4> 61 | {{{ 62 | }}} 63 | 64 | ############################################################################### 65 | 66 | Global: 67 | 68 | Package=<5> 69 | {{{ 70 | }}} 71 | 72 | Package=<3> 73 | {{{ 74 | }}} 75 | 76 | ############################################################################### 77 | 78 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/cmidiin.cpp: -------------------------------------------------------------------------------- 1 | //*****************************************// 2 | // cmidiin.cpp 3 | // by Gary Scavone, 2003-2004. 4 | // 5 | // Simple program to test MIDI input and 6 | // use of a user callback function. 7 | // 8 | //*****************************************// 9 | 10 | #include 11 | #include 12 | #include "RtMidi.h" 13 | 14 | void usage( void ) { 15 | // Error function in case of incorrect command-line 16 | // argument specifications. 17 | std::cout << "\nuseage: cmidiin \n"; 18 | std::cout << " where port = the device to use (default = 0).\n\n"; 19 | exit( 0 ); 20 | } 21 | 22 | void mycallback( double deltatime, std::vector< unsigned char > *message, void *userData ) 23 | { 24 | unsigned int nBytes = message->size(); 25 | for ( unsigned int i=0; i 0 ) 28 | std::cout << "stamp = " << deltatime << std::endl; 29 | } 30 | 31 | // This function should be embedded in a try/catch block in case of 32 | // an exception. It offers the user a choice of MIDI ports to open. 33 | // It returns false if there are no ports available. 34 | bool chooseMidiPort( RtMidiIn *rtmidi ); 35 | 36 | int main( int argc, char *argv[] ) 37 | { 38 | RtMidiIn *midiin = 0; 39 | 40 | // Minimal command-line check. 41 | if ( argc > 2 ) usage(); 42 | 43 | try { 44 | 45 | // RtMidiIn constructor 46 | midiin = new RtMidiIn(); 47 | 48 | // Call function to select port. 49 | if ( chooseMidiPort( midiin ) == false ) goto cleanup; 50 | 51 | // Set our callback function. This should be done immediately after 52 | // opening the port to avoid having incoming messages written to the 53 | // queue instead of sent to the callback function. 54 | midiin->setCallback( &mycallback ); 55 | 56 | // Don't ignore sysex, timing, or active sensing messages. 57 | midiin->ignoreTypes( false, false, false ); 58 | 59 | std::cout << "\nReading MIDI input ... press to quit.\n"; 60 | char input; 61 | std::cin.get(input); 62 | 63 | } catch ( RtError &error ) { 64 | error.printMessage(); 65 | } 66 | 67 | cleanup: 68 | 69 | delete midiin; 70 | 71 | return 0; 72 | } 73 | 74 | bool chooseMidiPort( RtMidiIn *rtmidi ) 75 | { 76 | std::cout << "\nWould you like to open a virtual input port? [y/N] "; 77 | 78 | std::string keyHit; 79 | std::getline( std::cin, keyHit ); 80 | if ( keyHit == "y" ) { 81 | rtmidi->openVirtualPort(); 82 | return true; 83 | } 84 | 85 | std::string portName; 86 | unsigned int i = 0, nPorts = rtmidi->getPortCount(); 87 | if ( nPorts == 0 ) { 88 | std::cout << "No input ports available!" << std::endl; 89 | return false; 90 | } 91 | 92 | if ( nPorts == 1 ) { 93 | std::cout << "\nOpening " << rtmidi->getPortName() << std::endl; 94 | } 95 | else { 96 | for ( i=0; igetPortName(i); 98 | std::cout << " Input port #" << i << ": " << portName << '\n'; 99 | } 100 | 101 | do { 102 | std::cout << "\nChoose a port number: "; 103 | std::cin >> i; 104 | } while ( i >= nPorts ); 105 | } 106 | 107 | std::getline( std::cin, keyHit ); // used to clear out stdin 108 | rtmidi->openPort( i ); 109 | 110 | return true; 111 | } 112 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/cmidiin.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="cmidiin" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=cmidiin - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "cmidiin.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "cmidiin.mak" CFG="cmidiin - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "cmidiin - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "cmidiin - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "cmidiin - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "cmidiin___Win32_Release" 36 | # PROP BASE Intermediate_Dir "cmidiin___Win32_Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c 46 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 47 | # ADD RSC /l 0x409 /d "NDEBUG" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LINK32=link.exe 52 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386 54 | 55 | !ELSEIF "$(CFG)" == "cmidiin - Win32 Debug" 56 | 57 | # PROP BASE Use_MFC 0 58 | # PROP BASE Use_Debug_Libraries 1 59 | # PROP BASE Output_Dir "cmidiin___Win32_Debug" 60 | # PROP BASE Intermediate_Dir "cmidiin___Win32_Debug" 61 | # PROP BASE Target_Dir "" 62 | # PROP Use_MFC 0 63 | # PROP Use_Debug_Libraries 1 64 | # PROP Output_Dir "" 65 | # PROP Intermediate_Dir "Debug" 66 | # PROP Ignore_Export_Lib 0 67 | # PROP Target_Dir "" 68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c 70 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 71 | # ADD RSC /l 0x409 /d "_DEBUG" 72 | BSC32=bscmake.exe 73 | # ADD BASE BSC32 /nologo 74 | # ADD BSC32 /nologo 75 | LINK32=link.exe 76 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | 79 | !ENDIF 80 | 81 | # Begin Target 82 | 83 | # Name "cmidiin - Win32 Release" 84 | # Name "cmidiin - Win32 Debug" 85 | # Begin Group "Source Files" 86 | 87 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 88 | # Begin Source File 89 | 90 | SOURCE=.\cmidiin.cpp 91 | # End Source File 92 | # Begin Source File 93 | 94 | SOURCE=..\RtMidi.cpp 95 | # End Source File 96 | # End Group 97 | # Begin Group "Header Files" 98 | 99 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 100 | # Begin Source File 101 | 102 | SOURCE=..\RtError.h 103 | # End Source File 104 | # Begin Source File 105 | 106 | SOURCE=..\RtMidi.h 107 | # End Source File 108 | # End Group 109 | # Begin Group "Resource Files" 110 | 111 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 112 | # End Group 113 | # End Target 114 | # End Project 115 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/midiout.cpp: -------------------------------------------------------------------------------- 1 | //*****************************************// 2 | // midiout.cpp 3 | // by Gary Scavone, 2003-2004. 4 | // 5 | // Simple program to test MIDI output. 6 | // 7 | //*****************************************// 8 | 9 | #include 10 | #include 11 | #include "RtMidi.h" 12 | 13 | // Platform-dependent sleep routines. 14 | #if defined(__WINDOWS_MM__) 15 | #include 16 | #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 17 | #else // Unix variants 18 | #include 19 | #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) ) 20 | #endif 21 | 22 | // This function should be embedded in a try/catch block in case of 23 | // an exception. It offers the user a choice of MIDI ports to open. 24 | // It returns false if there are no ports available. 25 | bool chooseMidiPort( RtMidiOut *rtmidi ); 26 | 27 | int main( int argc, char *argv[] ) 28 | { 29 | RtMidiOut *midiout = 0; 30 | std::vector message; 31 | 32 | // RtMidiOut constructor 33 | try { 34 | midiout = new RtMidiOut(); 35 | } 36 | catch ( RtError &error ) { 37 | error.printMessage(); 38 | exit( EXIT_FAILURE ); 39 | } 40 | 41 | // Call function to select port. 42 | try { 43 | if ( chooseMidiPort( midiout ) == false ) goto cleanup; 44 | } 45 | catch ( RtError &error ) { 46 | error.printMessage(); 47 | goto cleanup; 48 | } 49 | 50 | // Send out a series of MIDI messages. 51 | 52 | // Program change: 192, 5 53 | message.push_back( 192 ); 54 | message.push_back( 5 ); 55 | midiout->sendMessage( &message ); 56 | 57 | SLEEP( 500 ); 58 | 59 | message[0] = 0xF1; 60 | message[1] = 60; 61 | midiout->sendMessage( &message ); 62 | 63 | // Control Change: 176, 7, 100 (volume) 64 | message[0] = 176; 65 | message[1] = 7; 66 | message.push_back( 100 ); 67 | midiout->sendMessage( &message ); 68 | 69 | // Note On: 144, 64, 90 70 | message[0] = 144; 71 | message[1] = 64; 72 | message[2] = 90; 73 | midiout->sendMessage( &message ); 74 | 75 | SLEEP( 500 ); 76 | 77 | // Note Off: 128, 64, 40 78 | message[0] = 128; 79 | message[1] = 64; 80 | message[2] = 40; 81 | midiout->sendMessage( &message ); 82 | 83 | SLEEP( 500 ); 84 | 85 | // Control Change: 176, 7, 40 86 | message[0] = 176; 87 | message[1] = 7; 88 | message[2] = 40; 89 | midiout->sendMessage( &message ); 90 | 91 | SLEEP( 500 ); 92 | 93 | // Sysex: 240, 67, 4, 3, 2, 247 94 | message[0] = 240; 95 | message[1] = 67; 96 | message[2] = 4; 97 | message.push_back( 3 ); 98 | message.push_back( 2 ); 99 | message.push_back( 247 ); 100 | midiout->sendMessage( &message ); 101 | 102 | // Clean up 103 | cleanup: 104 | delete midiout; 105 | 106 | return 0; 107 | } 108 | 109 | bool chooseMidiPort( RtMidiOut *rtmidi ) 110 | { 111 | std::cout << "\nWould you like to open a virtual output port? [y/N] "; 112 | 113 | std::string keyHit; 114 | std::getline( std::cin, keyHit ); 115 | if ( keyHit == "y" ) { 116 | rtmidi->openVirtualPort(); 117 | return true; 118 | } 119 | 120 | std::string portName; 121 | unsigned int i = 0, nPorts = rtmidi->getPortCount(); 122 | if ( nPorts == 0 ) { 123 | std::cout << "No output ports available!" << std::endl; 124 | return false; 125 | } 126 | 127 | if ( nPorts == 1 ) { 128 | std::cout << "\nOpening " << rtmidi->getPortName() << std::endl; 129 | } 130 | else { 131 | for ( i=0; igetPortName(i); 133 | std::cout << " Output port #" << i << ": " << portName << '\n'; 134 | } 135 | 136 | do { 137 | std::cout << "\nChoose a port number: "; 138 | std::cin >> i; 139 | } while ( i >= nPorts ); 140 | } 141 | 142 | std::cout << "\n"; 143 | rtmidi->openPort( i ); 144 | 145 | return true; 146 | } 147 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/midiout.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="midiout" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=midiout - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "midiout.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "midiout.mak" CFG="midiout - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "midiout - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "midiout - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "midiout - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "midiout___Win32_Release" 36 | # PROP BASE Intermediate_Dir "midiout___Win32_Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c 46 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 47 | # ADD RSC /l 0x409 /d "NDEBUG" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LINK32=link.exe 52 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386 54 | 55 | !ELSEIF "$(CFG)" == "midiout - Win32 Debug" 56 | 57 | # PROP BASE Use_MFC 0 58 | # PROP BASE Use_Debug_Libraries 1 59 | # PROP BASE Output_Dir "midiout___Win32_Debug" 60 | # PROP BASE Intermediate_Dir "midiout___Win32_Debug" 61 | # PROP BASE Target_Dir "" 62 | # PROP Use_MFC 0 63 | # PROP Use_Debug_Libraries 1 64 | # PROP Output_Dir "" 65 | # PROP Intermediate_Dir "Debug" 66 | # PROP Ignore_Export_Lib 0 67 | # PROP Target_Dir "" 68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c 70 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 71 | # ADD RSC /l 0x409 /d "_DEBUG" 72 | BSC32=bscmake.exe 73 | # ADD BASE BSC32 /nologo 74 | # ADD BSC32 /nologo 75 | LINK32=link.exe 76 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | 79 | !ENDIF 80 | 81 | # Begin Target 82 | 83 | # Name "midiout - Win32 Release" 84 | # Name "midiout - Win32 Debug" 85 | # Begin Group "Source Files" 86 | 87 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 88 | # Begin Source File 89 | 90 | SOURCE=.\midiout.cpp 91 | # End Source File 92 | # Begin Source File 93 | 94 | SOURCE=..\RtMidi.cpp 95 | # End Source File 96 | # End Group 97 | # Begin Group "Header Files" 98 | 99 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 100 | # Begin Source File 101 | 102 | SOURCE=..\RtError.h 103 | # End Source File 104 | # Begin Source File 105 | 106 | SOURCE=..\RtMidi.h 107 | # End Source File 108 | # End Group 109 | # Begin Group "Resource Files" 110 | 111 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 112 | # End Group 113 | # End Target 114 | # End Project 115 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/midiprobe.cpp: -------------------------------------------------------------------------------- 1 | // midiprobe.cpp 2 | // 3 | // Simple program to check MIDI inputs and outputs. 4 | // 5 | // by Gary Scavone, 2003-2004. 6 | 7 | #include 8 | #include 9 | #include "RtMidi.h" 10 | 11 | int main() 12 | { 13 | RtMidiIn *midiin = 0; 14 | RtMidiOut *midiout = 0; 15 | 16 | try { 17 | 18 | // RtMidiIn constructor ... exception possible 19 | midiin = new RtMidiIn(); 20 | 21 | // Check inputs. 22 | unsigned int nPorts = midiin->getPortCount(); 23 | std::cout << "\nThere are " << nPorts << " MIDI input sources available.\n"; 24 | 25 | for ( unsigned i=0; igetPortName(i); 27 | std::cout << " Input Port #" << i+1 << ": " << portName << '\n'; 28 | } 29 | 30 | // RtMidiOut constructor ... exception possible 31 | midiout = new RtMidiOut(); 32 | 33 | // Check outputs. 34 | nPorts = midiout->getPortCount(); 35 | std::cout << "\nThere are " << nPorts << " MIDI output ports available.\n"; 36 | 37 | for ( unsigned i=0; igetPortName(i); 39 | std::cout << " Output Port #" << i+1 << ": " << portName << std::endl; 40 | } 41 | std::cout << std::endl; 42 | 43 | } catch ( RtError &error ) { 44 | error.printMessage(); 45 | } 46 | 47 | delete midiin; 48 | delete midiout; 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/midiprobe.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="midiprobe" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=midiprobe - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "midiprobe.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "midiprobe.mak" CFG="midiprobe - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "midiprobe - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "midiprobe - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "midiprobe - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "midiprobe___Win32_Release" 36 | # PROP BASE Intermediate_Dir "midiprobe___Win32_Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c 46 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 47 | # ADD RSC /l 0x409 /d "NDEBUG" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LINK32=link.exe 52 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386 54 | 55 | !ELSEIF "$(CFG)" == "midiprobe - Win32 Debug" 56 | 57 | # PROP BASE Use_MFC 0 58 | # PROP BASE Use_Debug_Libraries 1 59 | # PROP BASE Output_Dir "midiprobe___Win32_Debug" 60 | # PROP BASE Intermediate_Dir "midiprobe___Win32_Debug" 61 | # PROP BASE Target_Dir "" 62 | # PROP Use_MFC 0 63 | # PROP Use_Debug_Libraries 1 64 | # PROP Output_Dir "" 65 | # PROP Intermediate_Dir "Debug" 66 | # PROP Ignore_Export_Lib 0 67 | # PROP Target_Dir "" 68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c 70 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 71 | # ADD RSC /l 0x409 /d "_DEBUG" 72 | BSC32=bscmake.exe 73 | # ADD BASE BSC32 /nologo 74 | # ADD BSC32 /nologo 75 | LINK32=link.exe 76 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | 79 | !ENDIF 80 | 81 | # Begin Target 82 | 83 | # Name "midiprobe - Win32 Release" 84 | # Name "midiprobe - Win32 Debug" 85 | # Begin Group "Source Files" 86 | 87 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 88 | # Begin Source File 89 | 90 | SOURCE=.\midiprobe.cpp 91 | # End Source File 92 | # Begin Source File 93 | 94 | SOURCE=..\RtMidi.cpp 95 | # End Source File 96 | # End Group 97 | # Begin Group "Header Files" 98 | 99 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 100 | # Begin Source File 101 | 102 | SOURCE=..\RtError.h 103 | # End Source File 104 | # Begin Source File 105 | 106 | SOURCE=..\RtMidi.h 107 | # End Source File 108 | # End Group 109 | # Begin Group "Resource Files" 110 | 111 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 112 | # End Group 113 | # End Target 114 | # End Project 115 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/qmidiin.cpp: -------------------------------------------------------------------------------- 1 | //*****************************************// 2 | // qmidiin.cpp 3 | // by Gary Scavone, 2003-2004. 4 | // 5 | // Simple program to test MIDI input and 6 | // retrieval from the queue. 7 | // 8 | //*****************************************// 9 | 10 | #include 11 | #include 12 | #include 13 | #include "RtMidi.h" 14 | 15 | // Platform-dependent sleep routines. 16 | #if defined(__WINDOWS_MM__) 17 | #include 18 | #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 19 | #else // Unix variants 20 | #include 21 | #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) ) 22 | #endif 23 | 24 | bool done; 25 | static void finish( int ignore ){ done = true; } 26 | 27 | void usage( void ) { 28 | // Error function in case of incorrect command-line 29 | // argument specifications. 30 | std::cout << "\nusage: qmidiin \n"; 31 | std::cout << " where port = the device to use (default = 0).\n\n"; 32 | exit( 0 ); 33 | } 34 | 35 | int main( int argc, char *argv[] ) 36 | { 37 | RtMidiIn *midiin = 0; 38 | std::vector message; 39 | int nBytes, i; 40 | double stamp; 41 | 42 | // Minimal command-line check. 43 | if ( argc > 2 ) usage(); 44 | 45 | // RtMidiIn constructor 46 | try { 47 | midiin = new RtMidiIn(); 48 | } 49 | catch ( RtError &error ) { 50 | error.printMessage(); 51 | exit( EXIT_FAILURE ); 52 | } 53 | 54 | // Check available ports vs. specified. 55 | unsigned int port = 0; 56 | unsigned int nPorts = midiin->getPortCount(); 57 | if ( argc == 2 ) port = (unsigned int) atoi( argv[1] ); 58 | if ( port >= nPorts ) { 59 | delete midiin; 60 | std::cout << "Invalid port specifier!\n"; 61 | usage(); 62 | } 63 | 64 | try { 65 | midiin->openPort( port ); 66 | } 67 | catch ( RtError &error ) { 68 | error.printMessage(); 69 | goto cleanup; 70 | } 71 | 72 | // Don't ignore sysex, timing, or active sensing messages. 73 | midiin->ignoreTypes( false, false, false ); 74 | 75 | // Install an interrupt handler function. 76 | done = false; 77 | (void) signal(SIGINT, finish); 78 | 79 | // Periodically check input queue. 80 | std::cout << "Reading MIDI from port ... quit with Ctrl-C.\n"; 81 | while ( !done ) { 82 | stamp = midiin->getMessage( &message ); 83 | nBytes = message.size(); 84 | for ( i=0; i 0 ) 87 | std::cout << "stamp = " << stamp << std::endl; 88 | 89 | // Sleep for 10 milliseconds. 90 | SLEEP( 10 ); 91 | } 92 | 93 | // Clean up 94 | cleanup: 95 | delete midiin; 96 | 97 | return 0; 98 | } 99 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/qmidiin.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="qmidiin" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=qmidiin - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "qmidiin.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "qmidiin.mak" CFG="qmidiin - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "qmidiin - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "qmidiin - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "qmidiin - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "qmidiin___Win32_Release" 36 | # PROP BASE Intermediate_Dir "qmidiin___Win32_Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c 46 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 47 | # ADD RSC /l 0x409 /d "NDEBUG" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LINK32=link.exe 52 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386 54 | 55 | !ELSEIF "$(CFG)" == "qmidiin - Win32 Debug" 56 | 57 | # PROP BASE Use_MFC 0 58 | # PROP BASE Use_Debug_Libraries 1 59 | # PROP BASE Output_Dir "qmidiin___Win32_Debug" 60 | # PROP BASE Intermediate_Dir "qmidiin___Win32_Debug" 61 | # PROP BASE Target_Dir "" 62 | # PROP Use_MFC 0 63 | # PROP Use_Debug_Libraries 1 64 | # PROP Output_Dir "" 65 | # PROP Intermediate_Dir "Debug" 66 | # PROP Ignore_Export_Lib 0 67 | # PROP Target_Dir "" 68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 69 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c 70 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 71 | # ADD RSC /l 0x409 /d "_DEBUG" 72 | BSC32=bscmake.exe 73 | # ADD BASE BSC32 /nologo 74 | # ADD BSC32 /nologo 75 | LINK32=link.exe 76 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | 79 | !ENDIF 80 | 81 | # Begin Target 82 | 83 | # Name "qmidiin - Win32 Release" 84 | # Name "qmidiin - Win32 Debug" 85 | # Begin Group "Source Files" 86 | 87 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 88 | # Begin Source File 89 | 90 | SOURCE=.\qmidiin.cpp 91 | # End Source File 92 | # Begin Source File 93 | 94 | SOURCE=..\RtMidi.cpp 95 | # End Source File 96 | # End Group 97 | # Begin Group "Header Files" 98 | 99 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 100 | # Begin Source File 101 | 102 | SOURCE=..\RtError.h 103 | # End Source File 104 | # Begin Source File 105 | 106 | SOURCE=..\RtMidi.h 107 | # End Source File 108 | # End Group 109 | # Begin Group "Resource Files" 110 | 111 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 112 | # End Group 113 | # End Target 114 | # End Project 115 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/sysextest.cpp: -------------------------------------------------------------------------------- 1 | //*****************************************// 2 | // sysextest.cpp 3 | // by Gary Scavone, 2003-2005. 4 | // 5 | // Simple program to test MIDI sysex sending and receiving. 6 | // 7 | //*****************************************// 8 | 9 | #include 10 | #include 11 | #include 12 | #include "RtMidi.h" 13 | 14 | void usage( void ) { 15 | std::cout << "\nuseage: sysextest N\n"; 16 | std::cout << " where N = length of sysex message to send / receive.\n\n"; 17 | exit( 0 ); 18 | } 19 | 20 | // Platform-dependent sleep routines. 21 | #if defined(__WINDOWS_MM__) 22 | #include 23 | #define SLEEP( milliseconds ) Sleep( (DWORD) milliseconds ) 24 | #else // Unix variants 25 | #include 26 | #define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) ) 27 | #endif 28 | 29 | // This function should be embedded in a try/catch block in case of 30 | // an exception. It offers the user a choice of MIDI ports to open. 31 | // It returns false if there are no ports available. 32 | bool chooseMidiPort( RtMidi *rtmidi ); 33 | 34 | int main( int argc, char *argv[] ) 35 | { 36 | RtMidiOut *midiout = 0; 37 | RtMidiIn *midiin = 0; 38 | std::vector message; 39 | double stamp; 40 | unsigned int i, nBytes; 41 | 42 | // Minimal command-line check. 43 | if ( argc != 2 ) usage(); 44 | nBytes = (unsigned int) atoi( argv[1] ); 45 | 46 | // RtMidiOut and RtMidiIn constructors 47 | try { 48 | midiout = new RtMidiOut(); 49 | midiin = new RtMidiIn(); 50 | } 51 | catch ( RtError &error ) { 52 | error.printMessage(); 53 | goto cleanup; 54 | } 55 | 56 | // Don't ignore sysex, timing, or active sensing messages. 57 | midiin->ignoreTypes( false, true, true ); 58 | 59 | // Call function to select ports 60 | try { 61 | if ( chooseMidiPort( midiin ) == false ) goto cleanup; 62 | if ( chooseMidiPort( midiout ) == false ) goto cleanup; 63 | } 64 | catch ( RtError &error ) { 65 | error.printMessage(); 66 | goto cleanup; 67 | } 68 | 69 | // Create a long sysex messages of numbered bytes and send it out. 70 | message.push_back( 240 ); 71 | for ( i=0; isendMessage( &message ); 75 | 76 | SLEEP( 50 ); // pause a little 77 | 78 | // Look for one message (hopefully the previously sent sysex if the 79 | // ports were connected together) and print out the values. 80 | stamp = midiin->getMessage( &message ); 81 | nBytes = message.size(); 82 | for ( i=0; iopenVirtualPort(); 108 | return true; 109 | } 110 | 111 | std::string portName; 112 | unsigned int i = 0, nPorts = rtmidi->getPortCount(); 113 | if ( nPorts == 0 ) { 114 | if ( isInput ) 115 | std::cout << "No input ports available!" << std::endl; 116 | else 117 | std::cout << "No output ports available!" << std::endl; 118 | return false; 119 | } 120 | 121 | if ( nPorts == 1 ) { 122 | std::cout << "\nOpening " << rtmidi->getPortName() << std::endl; 123 | } 124 | else { 125 | for ( i=0; igetPortName(i); 127 | if ( isInput ) 128 | std::cout << " Input port #" << i << ": " << portName << '\n'; 129 | else 130 | std::cout << " Output port #" << i << ": " << portName << '\n'; 131 | } 132 | 133 | do { 134 | std::cout << "\nChoose a port number: "; 135 | std::cin >> i; 136 | } while ( i >= nPorts ); 137 | } 138 | 139 | std::cout << std::endl; 140 | rtmidi->openPort( i ); 141 | 142 | return true; 143 | } 144 | -------------------------------------------------------------------------------- /rtmidi-1.0.15/tests/sysextest.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="sysextest" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=sysextest - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "sysextest.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "sysextest.mak" CFG="sysextest - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "sysextest - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "sysextest - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "sysextest - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "sysextest___Win32_Release" 36 | # PROP BASE Intermediate_Dir "sysextest___Win32_Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GR /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /c 46 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 47 | # ADD RSC /l 0x409 /d "NDEBUG" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LINK32=link.exe 52 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /machine:I386 54 | 55 | !ELSEIF "$(CFG)" == "sysextest - Win32 Debug" 56 | 57 | # PROP BASE Use_MFC 0 58 | # PROP BASE Use_Debug_Libraries 1 59 | # PROP BASE Output_Dir "sysextest___Win32_Debug" 60 | # PROP BASE Intermediate_Dir "sysextest___Win32_Debug" 61 | # PROP BASE Target_Dir "" 62 | # PROP Use_MFC 0 63 | # PROP Use_Debug_Libraries 1 64 | # PROP Output_Dir "" 65 | # PROP Intermediate_Dir "Debug" 66 | # PROP Ignore_Export_Lib 0 67 | # PROP Target_Dir "" 68 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 69 | # ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "../" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__WINDOWS_MM__" /YX /FD /GZ /c 70 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 71 | # ADD RSC /l 0x409 /d "_DEBUG" 72 | BSC32=bscmake.exe 73 | # ADD BASE BSC32 /nologo 74 | # ADD BSC32 /nologo 75 | LINK32=link.exe 76 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | 79 | !ENDIF 80 | 81 | # Begin Target 82 | 83 | # Name "sysextest - Win32 Release" 84 | # Name "sysextest - Win32 Debug" 85 | # Begin Group "Source Files" 86 | 87 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 88 | # Begin Source File 89 | 90 | SOURCE=..\RtMidi.cpp 91 | # End Source File 92 | # Begin Source File 93 | 94 | SOURCE=.\sysextest.cpp 95 | # End Source File 96 | # End Group 97 | # Begin Group "Header Files" 98 | 99 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 100 | # Begin Source File 101 | 102 | SOURCE=..\RtError.h 103 | # End Source File 104 | # Begin Source File 105 | 106 | SOURCE=..\RtMidi.h 107 | # End Source File 108 | # End Group 109 | # Begin Group "Resource Files" 110 | 111 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 112 | # End Group 113 | # End Target 114 | # End Project 115 | --------------------------------------------------------------------------------