From be1e94218f62c558f8610d1531b25ef9dee55441 Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Fri, 11 Oct 2013 15:35:51 +0200 Subject: Release 1.0.11 tarball --- doc/html/RtError_8h_source.html | 65 +++++ doc/html/RtMidi_8h-source.html | 2 +- doc/html/RtMidi_8h_source.html | 179 ++++++++++++++ doc/html/annotated.html | 6 +- doc/html/classRtError-members.html | 42 ++-- doc/html/classRtError.html | 181 +++++++------- doc/html/classRtMidi-members.html | 16 +- doc/html/classRtMidi.gif | Bin 0 -> 764 bytes doc/html/classRtMidi.html | 90 ++++--- doc/html/classRtMidi.png | Bin 412 -> 439 bytes doc/html/classRtMidiIn-members.html | 32 +-- doc/html/classRtMidiIn.gif | Bin 0 -> 459 bytes doc/html/classRtMidiIn.html | 267 ++++++++++----------- doc/html/classRtMidiIn.png | Bin 300 -> 317 bytes doc/html/classRtMidiOut-members.html | 22 +- doc/html/classRtMidiOut.gif | Bin 0 -> 496 bytes doc/html/classRtMidiOut.html | 172 ++++++------- doc/html/classRtMidiOut.png | Bin 317 -> 345 bytes doc/html/classes.html | 11 +- doc/html/doxygen.css | 91 +++++++ doc/html/files.html | 8 +- doc/html/functions.html | 181 +++++++++----- doc/html/functions_enum.html | 11 +- doc/html/functions_eval.html | 41 ++-- doc/html/functions_func.html | 118 +++++---- doc/html/functions_type.html | 11 +- doc/html/hierarchy.html | 16 +- doc/html/index.html | 200 ++++++++------- .../structRtMidiIn_1_1MidiMessage-members.html | 22 ++ doc/html/structRtMidiIn_1_1MidiMessage.html | 30 +++ .../structRtMidiIn_1_1RtMidiInData-members.html | 22 ++ doc/html/structRtMidiIn_1_1RtMidiInData.html | 30 +++ doc/html/tabs.css | 2 +- 33 files changed, 1196 insertions(+), 672 deletions(-) create mode 100644 doc/html/RtError_8h_source.html create mode 100644 doc/html/RtMidi_8h_source.html create mode 100644 doc/html/classRtMidi.gif create mode 100644 doc/html/classRtMidiIn.gif create mode 100644 doc/html/classRtMidiOut.gif create mode 100644 doc/html/structRtMidiIn_1_1MidiMessage-members.html create mode 100644 doc/html/structRtMidiIn_1_1MidiMessage.html create mode 100644 doc/html/structRtMidiIn_1_1RtMidiInData-members.html create mode 100644 doc/html/structRtMidiIn_1_1RtMidiInData.html diff --git a/doc/html/RtError_8h_source.html b/doc/html/RtError_8h_source.html new file mode 100644 index 0000000..726697f --- /dev/null +++ b/doc/html/RtError_8h_source.html @@ -0,0 +1,65 @@ + + +The RtMidi Tutorial + + + +
+Tutorial   Class/Enum List   File List   Compound Members  
+
+ +

RtError.h

00001 /************************************************************************/
+00010 /************************************************************************/
+00011 
+00012 #ifndef RTERROR_H
+00013 #define RTERROR_H
+00014 
+00015 #include <iostream>
+00016 #include <string>
+00017 
+00018 class RtError
+00019 {
+00020 public:
+00022   enum Type {
+00023     WARNING,           
+00024     DEBUG_WARNING,     
+00025     UNSPECIFIED,       
+00026     NO_DEVICES_FOUND,  
+00027     INVALID_DEVICE,    
+00028     INVALID_STREAM,    
+00029     MEMORY_ERROR,      
+00030     INVALID_PARAMETER, 
+00031     DRIVER_ERROR,      
+00032     SYSTEM_ERROR,      
+00033     THREAD_ERROR       
+00034   };
+00035 
+00036 protected:
+00037   std::string message_;
+00038   Type type_;
+00039 
+00040 public:
+00042   RtError(const std::string& message, Type type = RtError::UNSPECIFIED) : message_(message), type_(type) {}
+00043 
+00045   virtual ~RtError(void) {};
+00046 
+00048   virtual void printMessage(void) { std::cerr << '\n' << message_ << "\n\n"; }
+00049 
+00051   virtual const Type& getType(void) { return type_; }
+00052 
+00054   virtual const std::string& getMessage(void) { return message_; }
+00055 
+00057   virtual const char *getMessageString(void) { return message_.c_str(); }
+00058 };
+00059 
+00060 #endif
+
+
+ + + +
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary at music.mcgill.ca
+ + + diff --git a/doc/html/RtMidi_8h-source.html b/doc/html/RtMidi_8h-source.html index d94ab87..b970ec7 100644 --- a/doc/html/RtMidi_8h-source.html +++ b/doc/html/RtMidi_8h-source.html @@ -11,7 +11,7 @@

RtMidi.h

00001 /**********************************************************************/
 00036 /**********************************************************************/
 00037 
-00038 // RtMidi: Version 1.0.10
+00038 // RtMidi: Version 1.0.11
 00039 
 00040 #ifndef RTMIDI_H
 00041 #define RTMIDI_H
diff --git a/doc/html/RtMidi_8h_source.html b/doc/html/RtMidi_8h_source.html
new file mode 100644
index 0000000..7e9234f
--- /dev/null
+++ b/doc/html/RtMidi_8h_source.html
@@ -0,0 +1,179 @@
+
+
+The RtMidi Tutorial
+
+
+
+
+Tutorial   Class/Enum List   File List   Compound Members  
+
+ +

RtMidi.h

00001 /**********************************************************************/
+00036 /**********************************************************************/
+00037 
+00038 // RtMidi: Version 1.0.11
+00039 
+00040 #ifndef RTMIDI_H
+00041 #define RTMIDI_H
+00042 
+00043 #include "RtError.h"
+00044 #include <string>
+00045 
+00046 class RtMidi
+00047 {
+00048  public:
+00049 
+00051   virtual void openPort( unsigned int portNumber = 0, const std::string portName = std::string( "RtMidi" ) ) = 0;
+00052 
+00054   virtual void openVirtualPort( const std::string portName = std::string( "RtMidi" ) ) = 0;
+00055 
+00057   virtual unsigned int getPortCount() = 0;
+00058 
+00060   virtual std::string getPortName( unsigned int portNumber = 0 ) = 0;
+00061 
+00063   virtual void closePort( void ) = 0;
+00064 
+00065  protected:
+00066 
+00067   RtMidi();
+00068   virtual ~RtMidi() {};
+00069 
+00070   // A basic error reporting function for internal use in the RtMidi
+00071   // subclasses.  The behavior of this function can be modified to
+00072   // suit specific needs.
+00073   void error( RtError::Type type );
+00074 
+00075   void *apiData_;
+00076   bool connected_;
+00077   std::string errorString_;
+00078 };
+00079 
+00080 /**********************************************************************/
+00096 /**********************************************************************/
+00097 
+00098 #include <vector>
+00099 #include <queue>
+00100 
+00101 class RtMidiIn : public RtMidi
+00102 {
+00103  public:
+00104 
+00106   typedef void (*RtMidiCallback)( double timeStamp, std::vector<unsigned char> *message, void *userData);
+00107 
+00109 
+00112   RtMidiIn( const std::string clientName = std::string( "RtMidi Input Client") );
+00113 
+00115   ~RtMidiIn();
+00116 
+00118 
+00122   void openPort( unsigned int portNumber = 0, const std::string Portname = std::string( "RtMidi Input" ) );
+00123 
+00125 
+00131   void openVirtualPort( const std::string portName = std::string( "RtMidi Input" ) );
+00132 
+00134 
+00140   void setCallback( RtMidiCallback callback, void *userData = 0 );
+00141 
+00143 
+00147   void cancelCallback();
+00148 
+00150   void closePort( void );
+00151 
+00153   unsigned int getPortCount();
+00154 
+00156 
+00159   std::string getPortName( unsigned int portNumber = 0 );
+00160 
+00162 
+00166   void setQueueSizeLimit( unsigned int queueSize );
+00167 
+00169 
+00176   void ignoreTypes( bool midiSysex = true, bool midiTime = true, bool midiSense = true );
+00177 
+00179 
+00186   double getMessage( std::vector<unsigned char> *message );
+00187 
+00188   // A MIDI structure used internally by the class to store incoming
+00189   // messages.  Each message represents one and only one MIDI message.
+00190   struct MidiMessage { 
+00191     std::vector<unsigned char> bytes; 
+00192     double timeStamp;
+00193 
+00194     // Default constructor.
+00195     MidiMessage()
+00196       :bytes(3), timeStamp(0.0) {}
+00197   };
+00198 
+00199   // The RtMidiInData structure is used to pass private class data to
+00200   // the MIDI input handling function or thread.
+00201   struct RtMidiInData {
+00202     std::queue<MidiMessage> queue;
+00203     MidiMessage message;
+00204     unsigned int queueLimit;
+00205     unsigned char ignoreFlags;
+00206     bool doInput;
+00207     bool firstMessage;
+00208     void *apiData;
+00209     bool usingCallback;
+00210     void *userCallback;
+00211     void *userData;
+00212     bool continueSysex;
+00213 
+00214     // Default constructor.
+00215     RtMidiInData()
+00216       : queueLimit(1024), ignoreFlags(7), doInput(false), firstMessage(true),
+00217         apiData(0), usingCallback(false), userCallback(0), userData(0),
+00218         continueSysex(false) {}
+00219   };
+00220 
+00221  private:
+00222 
+00223   void initialize( const std::string& clientName );
+00224   RtMidiInData inputData_;
+00225 
+00226 };
+00227 
+00228 /**********************************************************************/
+00240 /**********************************************************************/
+00241 
+00242 class RtMidiOut : public RtMidi
+00243 {
+00244  public:
+00245 
+00247 
+00250   RtMidiOut( const std::string clientName = std::string( "RtMidi Output Client" ) );
+00251 
+00253   ~RtMidiOut();
+00254 
+00256 
+00262   void openPort( unsigned int portNumber = 0, const std::string portName = std::string( "RtMidi Output" ) );
+00263 
+00265   void closePort();
+00266 
+00268 
+00276   void openVirtualPort( const std::string portName = std::string( "RtMidi Output" ) );
+00277 
+00279   unsigned int getPortCount();
+00280 
+00282 
+00285   std::string getPortName( unsigned int portNumber = 0 );
+00286 
+00288 
+00292   void sendMessage( std::vector<unsigned char> *message );
+00293 
+00294  private:
+00295 
+00296   void initialize( const std::string& clientName );
+00297 };
+00298 
+00299 #endif
+
+
+ + + +
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary at music.mcgill.ca
+ + + diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 6511830..a054251 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -7,19 +7,21 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +

Class List

Here are the classes, structs, unions and interfaces with brief descriptions: + +
RtMidiIn::MidiMessage
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

-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtError-members.html b/doc/html/classRtError-members.html index f8b272d..6e58a11 100644 --- a/doc/html/classRtError-members.html +++ b/doc/html/classRtError-members.html @@ -7,32 +7,32 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtError Member List

This is the complete list of members for RtError, including all inherited members.

- - - - - - - - - - - - - - - - - - +

RtError Member List

This is the complete list of members for RtError, including all inherited members.
DEBUG_WARNING enum valueRtError
DRIVER_ERROR enum valueRtError
getMessage(void)RtError [inline, virtual]
getMessageString(void)RtError [inline, virtual]
getType(void)RtError [inline, virtual]
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_STREAM enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void)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
~RtError(void)RtError [inline, virtual]
+ + + + + + + + + + + + + + + + + +
DEBUG_WARNING enum valueRtError
DRIVER_ERROR enum valueRtError
getMessage(void)RtError [inline, virtual]
getMessageString(void)RtError [inline, virtual]
getType(void)RtError [inline, virtual]
INVALID_DEVICE enum valueRtError
INVALID_PARAMETER enum valueRtError
INVALID_STREAM enum valueRtError
MEMORY_ERROR enum valueRtError
NO_DEVICES_FOUND enum valueRtError
printMessage(void)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
~RtError(void)RtError [inline, virtual]


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtError.html b/doc/html/classRtError.html index ba79c73..68e9d78 100644 --- a/doc/html/classRtError.html +++ b/doc/html/classRtError.html @@ -7,116 +7,119 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtError Class Reference

Exception handling class for RtAudio & RtMidi. -More... -

-#include <RtError.h> -

+

RtError Class Reference

+

Exception handling class for RtAudio & RtMidi. +More...

-

-List of all members. - - - - - - - - - - - - - - - - +

#include <RtError.h>

- - - - - - - +

List of all members.

+

Public Types

enum  Type {
-  WARNING, -DEBUG_WARNING, -UNSPECIFIED, -NO_DEVICES_FOUND, -
-  INVALID_DEVICE, -INVALID_STREAM, -MEMORY_ERROR, -INVALID_PARAMETER, -
-  DRIVER_ERROR, -SYSTEM_ERROR, -THREAD_ERROR -
- }
 Defined RtError types. More...

Public Member Functions

RtError (const std::string &message, Type type=RtError::UNSPECIFIED)
 The constructor.
-virtual ~RtError (void)
 The destructor.
-virtual void printMessage (void)
 Prints thrown error message to stderr.
-virtual const TypegetType (void)
 Returns the thrown error message type.
-virtual const std::string & getMessage (void)
 Returns the thrown error message string.
-virtual const char * getMessageString (void)
 Returns the thrown error message as a C string.
+ + + + + + + + + + + + + + + +

Public Types

enum  Type {
+  WARNING, +DEBUG_WARNING, +UNSPECIFIED, +NO_DEVICES_FOUND, +
+  INVALID_DEVICE, +INVALID_STREAM, +MEMORY_ERROR, +INVALID_PARAMETER, +
+  DRIVER_ERROR, +SYSTEM_ERROR, +THREAD_ERROR +
+ }
 

Defined RtError types.

+ More...

Public Member Functions

RtError (const std::string &message, Type type=RtError::UNSPECIFIED)
 The constructor.
+virtual ~RtError (void)
 The destructor.
+virtual void printMessage (void)
 Prints thrown error message to stderr.
+virtual const TypegetType (void)
 Returns the thrown error message type.
+virtual const std::string & getMessage (void)
 Returns the thrown error message string.
+virtual const char * getMessageString (void)
 Returns the thrown error message as a C string.
-


Detailed Description

-Exception handling class for RtAudio & RtMidi. -

-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.


Member Enumeration Documentation

- +

Detailed Description

+

Exception handling class for RtAudio & RtMidi.

+

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.

+

Member Enumeration Documentation

+
-

-Defined RtError types. -

-

Enumerator:
- - - - - - - - - - - - +

Defined RtError types.

+
Enumerator:
WARNING  -A non-critical error.
DEBUG_WARNING  -A non-critical error which might be useful for debugging.
UNSPECIFIED  -The default, unspecified error type.
NO_DEVICES_FOUND  -No devices found on system.
INVALID_DEVICE  -An invalid device ID was specified.
INVALID_STREAM  -An invalid stream ID was specified.
MEMORY_ERROR  -An error occured during memory allocation.
INVALID_PARAMETER  -An invalid parameter was specified to a function.
DRIVER_ERROR  -A system driver error occured.
SYSTEM_ERROR  -A system error occured.
THREAD_ERROR  -A thread error occured.
+ + + + + + + + + + +
WARNING  +

A non-critical error.

+
DEBUG_WARNING  +

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

+
UNSPECIFIED  +

The default, unspecified error type.

+
NO_DEVICES_FOUND  +

No devices found on system.

+
INVALID_DEVICE  +

An invalid device ID was specified.

+
INVALID_STREAM  +

An invalid stream ID was specified.

+
MEMORY_ERROR  +

An error occured during memory allocation.

+
INVALID_PARAMETER  +

An invalid parameter was specified to a function.

+
DRIVER_ERROR  +

A system driver error occured.

+
SYSTEM_ERROR  +

A system error occured.

+
THREAD_ERROR  +

A thread error occured.

+
+
-

-


The documentation for this class was generated from the following file: +
+
The documentation for this class was generated from the following file:
-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidi-members.html b/doc/html/classRtMidi-members.html index 5736312..d52cd7f 100644 --- a/doc/html/classRtMidi-members.html +++ b/doc/html/classRtMidi-members.html @@ -7,19 +7,19 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtMidi Member List

This is the complete list of members for RtMidi, including all inherited members.

- - - - - +

RtMidi Member List

This is the complete list of members for RtMidi, including all inherited members.
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]
+ + + + +
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]


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidi.gif b/doc/html/classRtMidi.gif new file mode 100644 index 0000000..7caa12b Binary files /dev/null and b/doc/html/classRtMidi.gif differ diff --git a/doc/html/classRtMidi.html b/doc/html/classRtMidi.html index d8fb41f..b7f2247 100644 --- a/doc/html/classRtMidi.html +++ b/doc/html/classRtMidi.html @@ -7,65 +7,61 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtMidi Class Reference

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

-#include <RtMidi.h> -

+

RtMidi Class Reference

+

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

+ +

#include <RtMidi.h>

Inheritance diagram for RtMidi:
- -

- -RtMidiIn -RtMidiOut +
+ + +RtMidiIn +RtMidiOut +
-

-List of all members. - - - - - - - - - - - - - - - - - +

List of all members.

+

Public Member Functions

-virtual void openPort (unsigned int portNumber=0, const std::string portName=std::string("RtMidi"))=0
 Pure virtual openPort() function.
-virtual void openVirtualPort (const std::string portName=std::string("RtMidi"))=0
 Pure virtual openVirtualPort() function.
-virtual unsigned int getPortCount ()=0
 Pure virtual getPortCount() function.
-virtual std::string getPortName (unsigned int portNumber=0)=0
 Pure virtual getPortName() function.
-virtual void closePort (void)=0
 Pure virtual closePort() function.
+ + + + + + + + + + +

Public Member Functions

+virtual void openPort (unsigned int portNumber=0, const std::string portName=std::string("RtMidi"))=0
 Pure virtual openPort() function.
+virtual void openVirtualPort (const std::string portName=std::string("RtMidi"))=0
 Pure virtual openVirtualPort() function.
+virtual unsigned int getPortCount ()=0
 Pure virtual getPortCount() function.
+virtual std::string getPortName (unsigned int portNumber=0)=0
 Pure virtual getPortName() function.
+virtual void closePort (void)=0
 Pure virtual closePort() function.
-


Detailed Description

-An abstract base class for realtime MIDI input/output. -

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

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

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

-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:

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

-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.

-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.


The documentation for this class was generated from the following file: +

Detailed Description

+

An abstract base class for realtime MIDI input/output.

+

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

+

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

+

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

+

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:

+

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

+

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.

+

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.

+
The documentation for this class was generated from the following file:

-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidi.png b/doc/html/classRtMidi.png index 8b42720..0922029 100644 Binary files a/doc/html/classRtMidi.png and b/doc/html/classRtMidi.png differ diff --git a/doc/html/classRtMidiIn-members.html b/doc/html/classRtMidiIn-members.html index fc73e7d..f83f120 100644 --- a/doc/html/classRtMidiIn-members.html +++ b/doc/html/classRtMidiIn-members.html @@ -7,27 +7,27 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtMidiIn Member List

This is the complete list of members for RtMidiIn, including all inherited members.

- - - - - - - - - - - - - +

RtMidiIn Member List

This is the complete list of members for RtMidiIn, including all inherited members.
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"))RtMidiIn
setCallback(RtMidiCallback callback, void *userData=0)RtMidiIn
setQueueSizeLimit(unsigned int queueSize)RtMidiIn
~RtMidiIn()RtMidiIn
+ + + + + + + + + + + + +
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"))RtMidiIn
setCallback(RtMidiCallback callback, void *userData=0)RtMidiIn
setQueueSizeLimit(unsigned int queueSize)RtMidiIn
~RtMidiIn()RtMidiIn


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidiIn.gif b/doc/html/classRtMidiIn.gif new file mode 100644 index 0000000..f4c5298 Binary files /dev/null and b/doc/html/classRtMidiIn.gif differ diff --git a/doc/html/classRtMidiIn.html b/doc/html/classRtMidiIn.html index f533ac7..a02046d 100644 --- a/doc/html/classRtMidiIn.html +++ b/doc/html/classRtMidiIn.html @@ -7,91 +7,76 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtMidiIn Class Reference

A realtime MIDI input class. -More... -

-#include <RtMidi.h> -

+

RtMidiIn Class Reference

+

A realtime MIDI input class. +More...

+ +

#include <RtMidi.h>

Inheritance diagram for RtMidiIn:
- -

- -RtMidi +
+ + +RtMidi +
-

-List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

List of all members.

+

Classes

struct  MidiMessage
struct  RtMidiInData

Public Types

-typedef void(* RtMidiCallback )(double timeStamp, std::vector< unsigned char > *message, void *userData)
 User callback function type definition.

Public Member Functions

 RtMidiIn (const std::string clientName=std::string("RtMidi Input Client"))
 Default constructor that allows an optional client name.
~RtMidiIn ()
 If a MIDI connection is still open, it will be closed by the destructor.
void openPort (unsigned int portNumber=0, const std::string Portname=std::string("RtMidi Input"))
 Open a MIDI input connection.
void openVirtualPort (const std::string portName=std::string("RtMidi Input"))
 Create a virtual input port, with optional name, to allow software connections (OS X and ALSA only).
void setCallback (RtMidiCallback callback, void *userData=0)
 Set a callback function to be invoked for incoming MIDI messages.
void cancelCallback ()
 Cancel use of the current callback function (if one exists).
-void closePort (void)
 Close an open MIDI connection (if one exists).
-unsigned int getPortCount ()
 Return the number of available MIDI input ports.
std::string getPortName (unsigned int portNumber=0)
 Return a string identifier for the specified MIDI input port number.
void setQueueSizeLimit (unsigned int queueSize)
 Set the maximum number of MIDI messages to be saved in the queue.
void ignoreTypes (bool midiSysex=true, bool midiTime=true, bool midiSense=true)
 Specify whether certain MIDI message types should be queued or ignored during input.
double getMessage (std::vector< unsigned char > *message)
 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.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

struct  MidiMessage
struct  RtMidiInData

Public Types

+typedef void(* RtMidiCallback )(double timeStamp, std::vector< unsigned char > *message, void *userData)
 User callback function type definition.

Public Member Functions

 RtMidiIn (const std::string clientName=std::string("RtMidi Input Client"))
 Default constructor that allows an optional client name.
~RtMidiIn ()
 If a MIDI connection is still open, it will be closed by the destructor.
void openPort (unsigned int portNumber=0, const std::string Portname=std::string("RtMidi Input"))
 Open a MIDI input connection.
void openVirtualPort (const std::string portName=std::string("RtMidi Input"))
 Create a virtual input port, with optional name, to allow software connections (OS X and ALSA only).
void setCallback (RtMidiCallback callback, void *userData=0)
 Set a callback function to be invoked for incoming MIDI messages.
void cancelCallback ()
 Cancel use of the current callback function (if one exists).
+void closePort (void)
 Close an open MIDI connection (if one exists).
+unsigned int getPortCount ()
 Return the number of available MIDI input ports.
std::string getPortName (unsigned int portNumber=0)
 Return a string identifier for the specified MIDI input port number.
void setQueueSizeLimit (unsigned int queueSize)
 Set the maximum number of MIDI messages to be saved in the queue.
void ignoreTypes (bool midiSysex=true, bool midiTime=true, bool midiSense=true)
 Specify whether certain MIDI message types should be queued or ignored during input.
double getMessage (std::vector< unsigned char > *message)
 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.
-


Detailed Description

-A realtime MIDI input class. -

-This class provides a common, platform-independent API for realtime MIDI input. It allows access to a single MIDI input port. Incoming MIDI messages are either saved to a queue for retrieval using the getMessage() function or immediately passed to a user-specified callback function. Create multiple instances of this class to connect to more than one MIDI device at the same time. With the OS-X and Linux ALSA MIDI APIs, it is also possible to open a virtual input port to which other MIDI software clients can connect.

-by Gary P. Scavone, 2003-2008.


Constructor & Destructor Documentation

- +

Detailed Description

+

A realtime MIDI input class.

+

This class provides a common, platform-independent API for realtime MIDI input. It allows access to a single MIDI input port. Incoming MIDI messages are either saved to a queue for retrieval using the getMessage() function or immediately passed to a user-specified callback function. Create multiple instances of this class to connect to more than one MIDI device at the same time. With the OS-X and Linux ALSA MIDI APIs, it is also possible to open a virtual input port to which other MIDI software clients can connect.

+

by Gary P. Scavone, 2003-2008.

+

Constructor & Destructor Documentation

+
- + - + @@ -99,19 +84,18 @@ by Gary P. Scavone, 2003-2008.

Constructor & Destructor Documentatio
-

-Default constructor that allows an optional client name. -

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

Default constructor that allows an optional client name.

+

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

+
-

-


Member Function Documentation

- + +

Member Function Documentation

+
RtMidiIn::RtMidiIn RtMidiIn::RtMidiIn ( const std::string  clientName = std::string("RtMidi Input Client") clientName = std::string("RtMidi Input Client")  ) 
- + @@ -131,23 +115,22 @@ An exception will be thrown if a MIDI system initialization error occurs.
-

-Open a MIDI input connection. -

-An optional port number greater than 0 can be specified. Otherwise, the default or first port found is opened. -

Implements RtMidi.

+

Open a MIDI input connection.

+

An optional port number greater than 0 can be specified. Otherwise, the default or first port found is opened.

+ +

Implements RtMidi.

-

- + +

void RtMidiIn::openPort void RtMidiIn::openPort ( unsigned int  portNumber = 0,
- + - + @@ -155,22 +138,21 @@ An optional port number greater than 0 can be specified. Otherwise, the default
-

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

-This function creates a virtual MIDI input 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 for the other APIs). -

Implements RtMidi.

+

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

+

This function creates a virtual MIDI input 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 for the other APIs).

+

Implements RtMidi.

+ +
-

- +

void RtMidiIn::openVirtualPort void RtMidiIn::openVirtualPort ( const std::string  portName = std::string("RtMidi Input") portName = std::string("RtMidi Input")  )  [virtual]
- + - + @@ -188,20 +170,19 @@ This function creates a virtual MIDI input port to which other software applicat
-

-Set a callback function to be invoked for incoming MIDI messages. -

-The callback function will be called whenever an incoming MIDI message is received. While not absolutely necessary, it is best to set the callback function before opening a MIDI port to avoid leaving some messages in the queue. +

Set a callback function to be invoked for incoming MIDI messages.

+

The callback function will be called whenever an incoming MIDI message is received. While not absolutely necessary, it is best to set the callback function before opening a MIDI port to avoid leaving some messages in the queue.

+ +
-

- +

void RtMidiIn::setCallback void RtMidiIn::setCallback (RtMidiCallback RtMidiCallback  callback,
- + - + @@ -209,21 +190,20 @@ The callback function will be called whenever an incoming MIDI message is receiv
-

-Cancel use of the current callback function (if one exists). -

-Subsequent incoming MIDI messages will be written to the queue and can be retrieved with the getMessage function. +

Cancel use of the current callback function (if one exists).

+

Subsequent incoming MIDI messages will be written to the queue and can be retrieved with the getMessage function.

+ +
-

- +

void RtMidiIn::cancelCallback void RtMidiIn::cancelCallback (  ) 
- + - + @@ -231,23 +211,22 @@ Subsequent incoming MIDI messages will be written to the queue and can be retrie
-

-Return a string identifier for the specified MIDI input port number. -

-An exception is thrown if an invalid port specifier is provided. -

Implements RtMidi.

+

Return a string identifier for the specified MIDI input port number.

+

An exception is thrown if an invalid port specifier is provided.

+

Implements RtMidi.

+ +
-

- +

std::string RtMidiIn::getPortName std::string RtMidiIn::getPortName ( unsigned int  portNumber = 0 portNumber = 0  )  [virtual]
- + - + @@ -255,18 +234,17 @@ An exception is thrown if an invalid port specifier is provided.
-

-Set the maximum number of MIDI messages to be saved in the queue. -

-If the queue size limit is reached, incoming messages will be ignored. The default limit is 1024. +

Set the maximum number of MIDI messages to be saved in the queue.

+

If the queue size limit is reached, incoming messages will be ignored. The default limit is 1024.

+ +
-

- +

void RtMidiIn::setQueueSizeLimit void RtMidiIn::setQueueSizeLimit ( unsigned int  queueSize queueSize  ) 
- + @@ -292,21 +270,20 @@ If the queue size limit is reached, incoming messages will be ignored. The defau
-

-Specify whether certain MIDI message types should be queued or ignored during input. -

-By default, MIDI timing and active sensing messages are ignored during message input because of their relative high data rates. MIDI sysex messages are ignored by default as well. Variable values of "true" imply that the respective message type will be ignored. +

Specify whether certain MIDI message types should be queued or ignored during input.

+

By default, MIDI timing and active sensing messages are ignored during message input because of their relative high data rates. MIDI sysex messages are ignored by default as well. Variable values of "true" imply that the respective message type will be ignored.

+ +
-

- +

void RtMidiIn::ignoreTypes void RtMidiIn::ignoreTypes ( bool  midiSysex = true,
- + - + @@ -314,19 +291,19 @@ By default, MIDI timing and active sensing messages are ignored during message i
-

-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. -

-This function returns immediately whether a new message is available or not. A valid message is indicated by a non-zero vector size. An exception is thrown if an error occurs during message retrieval or an input connection was not previously established. +

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.

+

This function returns immediately whether a new message is available or not. A valid message is indicated by a non-zero vector size. An exception is thrown if an error occurs during message retrieval or an input connection was not previously established.

+ +
-

-


The documentation for this class was generated from the following file: +
The documentation for this class was generated from the following file:
double RtMidiIn::getMessage double RtMidiIn::getMessage ( std::vector< unsigned char > *  message message  ) 
-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidiIn.png b/doc/html/classRtMidiIn.png index 6e595ec..11c8316 100644 Binary files a/doc/html/classRtMidiIn.png and b/doc/html/classRtMidiIn.png differ diff --git a/doc/html/classRtMidiOut-members.html b/doc/html/classRtMidiOut-members.html index 0d78ff4..2f1b5d5 100644 --- a/doc/html/classRtMidiOut-members.html +++ b/doc/html/classRtMidiOut-members.html @@ -7,22 +7,22 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtMidiOut Member List

This is the complete list of members for RtMidiOut, including all inherited members.

- - - - - - - - +

RtMidiOut Member List

This is the complete list of members for RtMidiOut, including all inherited members.
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
+ + + + + + + +
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


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidiOut.gif b/doc/html/classRtMidiOut.gif new file mode 100644 index 0000000..5041efa Binary files /dev/null and b/doc/html/classRtMidiOut.gif differ diff --git a/doc/html/classRtMidiOut.html b/doc/html/classRtMidiOut.html index 7470d4f..e4d3579 100644 --- a/doc/html/classRtMidiOut.html +++ b/doc/html/classRtMidiOut.html @@ -7,69 +7,61 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

RtMidiOut Class Reference

A realtime MIDI output class. -More... -

-#include <RtMidi.h> -

+

RtMidiOut Class Reference

+

A realtime MIDI output class. +More...

+ +

#include <RtMidi.h>

Inheritance diagram for RtMidiOut:
- -

- -RtMidi +
+ + +RtMidi +
-

-List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - +

List of all members.

+

Public Member Functions

 RtMidiOut (const std::string clientName=std::string("RtMidi Output Client"))
 Default constructor that allows an optional client name.
~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.
-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).
-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.
+ + + + + + + + + + + + + + + + +

Public Member Functions

 RtMidiOut (const std::string clientName=std::string("RtMidi Output Client"))
 Default constructor that allows an optional client name.
~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.
+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).
+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.
-


Detailed Description

-A realtime MIDI output class. -

-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.

-by Gary P. Scavone, 2003-2008.


Constructor & Destructor Documentation

- +

Detailed Description

+

A realtime MIDI output class.

+

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.

+

by Gary P. Scavone, 2003-2008.

+

Constructor & Destructor Documentation

+
- + - + @@ -77,19 +69,18 @@ by Gary P. Scavone, 2003-2008.

Constructor & Destructor Documentatio
-

-Default constructor that allows an optional client name. -

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

Default constructor that allows an optional client name.

+

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

+ +
-

-


Member Function Documentation

- +

Member Function Documentation

+
RtMidiOut::RtMidiOut RtMidiOut::RtMidiOut ( const std::string  clientName = std::string("RtMidi Output Client") clientName = std::string("RtMidi Output Client")  ) 
- + @@ -109,23 +100,22 @@ An exception will be thrown if a MIDI system initialization error occurs.
-

-Open a MIDI output connection. -

-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. -

Implements RtMidi.

+

Open a MIDI output connection.

+

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.

+ +

Implements RtMidi.

-

- + +

void RtMidiOut::openPort void RtMidiOut::openPort ( unsigned int  portNumber = 0,
- + - + @@ -133,23 +123,22 @@ An optional port number greater than 0 can be specified. Otherwise, the default
-

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

-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. -

Implements RtMidi.

+

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

+

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.

+ +

Implements RtMidi.

-

- + +

void RtMidiOut::openVirtualPort void RtMidiOut::openVirtualPort ( const std::string  portName = std::string("RtMidi Output") portName = std::string("RtMidi Output")  )  [virtual]
- + - + @@ -157,23 +146,22 @@ This function creates a virtual MIDI output port to which other software applica
-

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

-An exception is thrown if an invalid port specifier is provided. -

Implements RtMidi.

+

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

+

An exception is thrown if an invalid port specifier is provided.

+ +

Implements RtMidi.

-

- + +

std::string RtMidiOut::getPortName std::string RtMidiOut::getPortName ( unsigned int  portNumber = 0 portNumber = 0  )  [virtual]
- + - + @@ -181,19 +169,19 @@ An exception is thrown if an invalid port specifier is provided.
-

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

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

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

+

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

+ +
-

-


The documentation for this class was generated from the following file: +
The documentation for this class was generated from the following file:
void RtMidiOut::sendMessage void RtMidiOut::sendMessage ( std::vector< unsigned char > *  message message  ) 
-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/classRtMidiOut.png b/doc/html/classRtMidiOut.png index 9b2dadb..ae613f8 100644 Binary files a/doc/html/classRtMidiOut.png and b/doc/html/classRtMidiOut.png differ diff --git a/doc/html/classes.html b/doc/html/classes.html index d3a35fb..cd6b05c 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -7,17 +7,18 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

Class Index

+

Class Index

M | R
-
  R  
-
RtError   RtMidi   RtMidiIn   RtMidiOut   

+
  M  
+
  R  
+RtMidi   RtMidiIn::RtMidiInData   RtMidiOut   RtMidiIn::MidiMessage   RtError   RtMidiIn   

M | R

-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css index 3767dc9..b057a92 100644 --- a/doc/html/doxygen.css +++ b/doc/html/doxygen.css @@ -1,3 +1,5 @@ +/* The standard CSS for doxygen */ + body, table, div, p, dl { font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; font-size: 12px; @@ -18,12 +20,49 @@ h3 { font-size: 100%; } +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + /* @end */ caption { font-weight: bold; } +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + div.qindex, div.navtab{ background-color: #e8eef2; border: 1px solid #84b0c7; @@ -80,9 +119,11 @@ a.elRef { } a.code { + color: #3030f0; } a.codeRef { + color: #3030f0; } /* @end */ @@ -101,6 +142,10 @@ pre.fragment { background-color: #f5f5f5; padding: 4px 6px; margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; } div.ah { @@ -161,6 +206,22 @@ img.formulaInl { vertical-align: middle; } +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + /* @group Code Colorization */ span.keyword { @@ -267,8 +328,13 @@ hr { border-top: 1px solid #ccc; } +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + .memTemplParams { color: #606060; + white-space: nowrap; } /* @end */ @@ -295,6 +361,7 @@ hr { .memitem { padding: 0; + margin-bottom: 10px; } .memname { @@ -312,8 +379,11 @@ hr { font-weight: bold; -webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -moz-border-radius-topleft: 8px; -moz-border-radius-topright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + } .memdoc { @@ -322,8 +392,10 @@ hr { border-top-width: 0; -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; } .paramkey { @@ -439,3 +511,22 @@ address { font-style: normal; color: #333; } + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #153788; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #254798; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + diff --git a/doc/html/files.html b/doc/html/files.html index 9c96640..2bcaa54 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -7,17 +7,17 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +

File List

Here is a list of all documented files with brief descriptions: - - + +
RtError.h [code]
RtMidi.h [code]
RtError.h [code]
RtMidi.h [code]

-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/functions.html b/doc/html/functions.html index 931205d..ef6b7fa 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -7,7 +7,7 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
  • All
  • @@ -37,117 +37,176 @@
Here is a list of all documented class members with links to the class documentation for each member: -

-

- c -


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html index 13b06d6..8bc8c9c 100644 --- a/doc/html/functions_enum.html +++ b/doc/html/functions_enum.html @@ -7,7 +7,7 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
  • All
  • @@ -18,17 +18,16 @@
-  -

-


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html index 376905b..f07b0d1 100644 --- a/doc/html/functions_eval.html +++ b/doc/html/functions_eval.html @@ -7,7 +7,7 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
  • All
  • @@ -18,37 +18,46 @@
-  -

-


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html index 0d9c86b..a12db12 100644 --- a/doc/html/functions_func.html +++ b/doc/html/functions_func.html @@ -7,7 +7,7 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
  • All
  • @@ -31,79 +31,113 @@
  -

-

- c -


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/functions_type.html b/doc/html/functions_type.html index 51d2e0e..1f9c1c2 100644 --- a/doc/html/functions_type.html +++ b/doc/html/functions_type.html @@ -7,7 +7,7 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
  • All
  • @@ -18,17 +18,16 @@
-  -

-


-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html index 4dfdebe..dc3b992 100644 --- a/doc/html/hierarchy.html +++ b/doc/html/hierarchy.html @@ -7,21 +7,23 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +

Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/index.html b/doc/html/index.html index 930853e..01e41b0 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -7,13 +7,11 @@
Tutorial   Class/Enum List   File List   Compound Members  

- +
-

The RtMidi Tutorial

-

-

1.0.10

Introduction    Download    Getting Started    Error Handling    Probing Ports    MIDI Output    MIDI Input    Virtual Ports    Compiling    Debugging    API Notes    Acknowledgements    License

+

The RtMidi Tutorial

1.0.11

Introduction    Download    Getting Started    Error Handling    Probing Ports    MIDI Output    MIDI Input    Virtual Ports    Compiling    Debugging    API Notes    Acknowledgements    License

Introduction

-RtMidi is a set of C++ classes (RtMidiIn and RtMidiOut) that provides 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:

+

RtMidi is a set of C++ classes (RtMidiIn and RtMidiOut) that provides 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:

  • object oriented C++ design
  • @@ -24,13 +22,14 @@ only two header files and one source file for easy inclusion in programming proj
  • MIDI device enumeration
-

-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<unsigned char>.

+

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<unsigned char>.

+

Download

-Latest Release (3 June 2009): Version 1.0.10

+

Latest Release (29 January 2010): Version 1.0.11

+

Getting Started

-The first thing that must be done when using RtMidi is to create an instance of the RtMidiIn or RtMidiOut subclasses. RtMidi is an abstract base class, which itself cannot be instantiated. Each default constructor attempts to establish any necessary "connections" with the underlying MIDI system. RtMidi uses C++ exceptions to report errors, necessitating try/catch blocks around many member functions. An RtError can be thrown during instantiation in some circumstances. A warning message may also be reported if no MIDI devices are found during instantiation. The RtMidi classes have been designed to work with "hot pluggable" or virtual (software) MIDI devices, making it possible to connect to MIDI devices that may not have been present when the classes were instantiated. The following code example demonstrates default object construction and destruction:

-

#include "RtMidi.h"
+

The first thing that must be done when using RtMidi is to create an instance of the RtMidiIn or RtMidiOut subclasses. RtMidi is an abstract base class, which itself cannot be instantiated. Each default constructor attempts to establish any necessary "connections" with the underlying MIDI system. RtMidi uses C++ exceptions to report errors, necessitating try/catch blocks around many member functions. An RtError can be thrown during instantiation in some circumstances. A warning message may also be reported if no MIDI devices are found during instantiation. The RtMidi classes have been designed to work with "hot pluggable" or virtual (software) MIDI devices, making it possible to connect to MIDI devices that may not have been present when the classes were instantiated. The following code example demonstrates default object construction and destruction:

+
#include "RtMidi.h"
 
 int main()
 {
@@ -42,23 +41,24 @@ The first thing that must be done when using catch (RtError &error) {
     // Handle the exception here
-    error.printMessage();
+    error.printMessage();
   }
 
   // Clean up
   delete midiin;
 }
-

-Obviously, this example doesn't demonstrate any of the real functionality of RtMidi. However, all uses of RtMidi must begin with construction and must end with class destruction. Further, it is necessary that all class methods that can throw a C++ exception be called within a try/catch block.

+

Obviously, this example doesn't demonstrate any of the real functionality of RtMidi. However, all uses of RtMidi must begin with construction and must end with class destruction. Further, it is necessary that all class methods that can throw a C++ exception be called within a try/catch block.

+

Error Handling

-RtMidi uses a C++ exception handler called RtError, which is declared and defined in RtError.h. The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. Many RtMidi methods can "throw" an RtError, most typically if a driver error occurs or an invalid function argument is specified. There are a number of cases within RtMidi where warning messages may be displayed but an exception is not thrown. There is a protected RtMidi method, error(), that can be modified to globally control how these messages are handled and reported. By default, error messages are not automatically displayed in RtMidi unless the preprocessor definition __RTMIDI_DEBUG__ is defined during compilation. Messages associated with caught exceptions can be displayed with, for example, the RtError::printMessage() function.

+

RtMidi uses a C++ exception handler called RtError, which is declared and defined in RtError.h. The RtError class is quite simple but it does allow errors to be "caught" by RtError::Type. Many RtMidi methods can "throw" an RtError, most typically if a driver error occurs or an invalid function argument is specified. There are a number of cases within RtMidi where warning messages may be displayed but an exception is not thrown. There is a protected RtMidi method, error(), that can be modified to globally control how these messages are handled and reported. By default, error messages are not automatically displayed in RtMidi unless the preprocessor definition __RTMIDI_DEBUG__ is defined during compilation. Messages associated with caught exceptions can be displayed with, for example, the RtError::printMessage() function.

+

Probing Ports

-A programmer may wish to query the available MIDI ports before deciding which to use. The following example outlines how this can be done.

+

A programmer may wish to query the available MIDI ports before deciding which to use. The following example outlines how this can be done.

// midiprobe.cpp
 
 #include <iostream>
 #include <cstdlib>
-#include "RtMidi.h"
+#include "RtMidi.h"
 
 int main()
 {
@@ -70,23 +70,23 @@ A programmer may wish to query the available MIDI ports before deciding which to
     midiin = new RtMidiIn();
   }
   catch ( RtError &error ) {
-    error.printMessage();
+    error.printMessage();
     exit( EXIT_FAILURE );
   }
 
   // Check inputs.
-  unsigned int nPorts = midiin->getPortCount();
-  std::cout << "\nThere are " << nPorts << " MIDI input sources available.\n";
+  unsigned int nPorts = midiin->getPortCount();
+  std::cout << "\nThere are " << nPorts << " MIDI input sources available.\n";
   std::string portName;
   for ( unsigned int i=0; i<nPorts; i++ ) {
     try {
-      portName = midiin->getPortName(i);
+      portName = midiin->getPortName(i);
     }
     catch ( RtError &error ) {
-      error.printMessage();
+      error.printMessage();
       goto cleanup;
     }
-    std::cout << "  Input Port #" << i+1 << ": " << portName << '\n';
+    std::cout << "  Input Port #" << i+1 << ": " << portName << '\n';
   }
 
   // RtMidiOut constructor
@@ -94,24 +94,24 @@ A programmer may wish to query the available MIDI ports before deciding which to
     midiout = new RtMidiOut();
   }
   catch ( RtError &error ) {
-    error.printMessage();
+    error.printMessage();
     exit( EXIT_FAILURE );
   }
 
   // Check outputs.
-  nPorts = midiout->getPortCount();
-  std::cout << "\nThere are " << nPorts << " MIDI output ports available.\n";
+  nPorts = midiout->getPortCount();
+  std::cout << "\nThere are " << nPorts << " MIDI output ports available.\n";
   for ( unsigned int i=0; i<nPorts; i++ ) {
     try {
-      portName = midiout->getPortName(i);
+      portName = midiout->getPortName(i);
     }
     catch (RtError &error) {
-      error.printMessage();
+      error.printMessage();
       goto cleanup;
     }
-    std::cout << "  Output Port #" << i+1 << ": " << portName << '\n';
+    std::cout << "  Output Port #" << i+1 << ": " << portName << '\n';
   }
-  std::cout << '\n';
+  std::cout << '\n';
 
   // Clean up
  cleanup:
@@ -120,15 +120,15 @@ A programmer may wish to query the available MIDI ports before deciding which to
 
   return 0;
 }
-

+

MIDI Output

-The RtMidiOut class provides simple functionality to immediately send messages over a MIDI connection. No timing functionality is provided.

-In the following example, we omit necessary error checking and details regarding OS-dependent sleep functions. For a complete example, see the midiout.cpp program in the tests directory.

+

The RtMidiOut class provides simple functionality to immediately send messages over a MIDI connection. No timing functionality is provided.

+

In the following example, we omit necessary error checking and details regarding OS-dependent sleep functions. For a complete example, see the midiout.cpp program in the tests directory.

// midiout.cpp
 
 #include <iostream>
 #include <cstdlib>
-#include "RtMidi.h"
+#include "RtMidi.h"
 
 int main()
 {
@@ -136,33 +136,33 @@ In the following example, we omit necessary error checking and details regarding
   std::vector<unsigned char> message;
 
   // Check available ports.
-  unsigned int nPorts = midiout->getPortCount();
+  unsigned int nPorts = midiout->getPortCount();
   if ( nPorts == 0 ) {
-    std::cout << "No ports available!\n";
+    std::cout << "No ports available!\n";
     goto cleanup;
   }
 
   // Open first available port.
-  midiout->openPort( 0 );
+  midiout->openPort( 0 );
 
   // Send out a series of MIDI messages.
 
   // Program change: 192, 5
   message.push_back( 192 );
   message.push_back( 5 );
-  midiout->sendMessage( &message );
+  midiout->sendMessage( &message );
 
   // Control Change: 176, 7, 100 (volume)
   message[0] = 176;
   message[1] = 7;
   message.push_back( 100 );
-  midiout->sendMessage( &message );
+  midiout->sendMessage( &message );
 
   // Note On: 144, 64, 90
   message[0] = 144;
   message[1] = 64;
   message[2] = 90;
-  midiout->sendMessage( &message );
+  midiout->sendMessage( &message );
 
   SLEEP( 500 ); // Platform-dependent ... see example in tests directory.
 
@@ -170,7 +170,7 @@ In the following example, we omit necessary error checking and details regarding
   message[0] = 128;
   message[1] = 64;
   message[2] = 40;
-  midiout->sendMessage( &message );
+  midiout->sendMessage( &message );
 
   // Clean up
  cleanup:
@@ -178,19 +178,20 @@ In the following example, we omit necessary error checking and details regarding
 
   return 0;
 }
-

+

MIDI Input

-The RtMidiIn class uses an internal callback function or thread to receive incoming MIDI messages from a port or device. These messages are then either queued and read by the user via calls to the RtMidiIn::getMessage() function or immediately passed to a user-specified callback function (which must be "registered" using the RtMidiIn::setCallback() function). We'll provide examples of both usages.

-The RtMidiIn class provides the RtMidiIn::ignoreTypes() function to specify that certain MIDI message types be ignored. By default, sysem exclusive, timing, and active sensing messages are ignored.

+

The RtMidiIn class uses an internal callback function or thread to receive incoming MIDI messages from a port or device. These messages are then either queued and read by the user via calls to the RtMidiIn::getMessage() function or immediately passed to a user-specified callback function (which must be "registered" using the RtMidiIn::setCallback() function). We'll provide examples of both usages.

+

The RtMidiIn class provides the RtMidiIn::ignoreTypes() function to specify that certain MIDI message types be ignored. By default, sysem exclusive, timing, and active sensing messages are ignored.

+

Queued MIDI Input

-The RtMidiIn::getMessage() function does not block. If a MIDI message is available in the queue, it is copied to the user-provided std::vector<unsigned char> container. When no MIDI message is available, the function returns an empty container. The default maximum MIDI queue size is 1024 messages. This value may be modified with the RtMidiIn::setQueueSizeLimit() function. If the maximum queue size limit is reached, subsequent incoming MIDI messages are discarded until the queue size is reduced.

-In the following example, we omit some necessary error checking and details regarding OS-dependent sleep functions. For a more complete example, see the qmidiin.cpp program in the tests directory.

+

The RtMidiIn::getMessage() function does not block. If a MIDI message is available in the queue, it is copied to the user-provided std::vector<unsigned char> container. When no MIDI message is available, the function returns an empty container. The default maximum MIDI queue size is 1024 messages. This value may be modified with the RtMidiIn::setQueueSizeLimit() function. If the maximum queue size limit is reached, subsequent incoming MIDI messages are discarded until the queue size is reduced.

+

In the following example, we omit some necessary error checking and details regarding OS-dependent sleep functions. For a more complete example, see the qmidiin.cpp program in the tests directory.

// qmidiin.cpp
 
 #include <iostream>
 #include <cstdlib>
 #include <signal.h>
-#include "RtMidi.h"
+#include "RtMidi.h"
 
 bool done;
 static void finish(int ignore){ done = true; }
@@ -203,29 +204,29 @@ In the following example, we omit some necessary error checking and details rega
   double stamp;
 
   // Check available ports.
-  unsigned int nPorts = midiin->getPortCount();
+  unsigned int nPorts = midiin->getPortCount();
   if ( nPorts == 0 ) {
-    std::cout << "No ports available!\n";
+    std::cout << "No ports available!\n";
     goto cleanup;
   }
-  midiin->openPort( 0 );
+  midiin->openPort( 0 );
 
-  // Don't ignore sysex, timing, or active sensing messages.
-  midiin->ignoreTypes( false, false, false );
+  // Don't ignore sysex, timing, or active sensing messages.
+  midiin->ignoreTypes( false, false, false );
 
   // Install an interrupt handler function.
   done = false;
   (void) signal(SIGINT, finish);
 
   // Periodically check input queue.
-  std::cout << "Reading MIDI from port ... quit with Ctrl-C.\n";
+  std::cout << "Reading MIDI from port ... quit with Ctrl-C.\n";
   while ( !done ) {
-    stamp = midiin->getMessage( &message );
+    stamp = midiin->getMessage( &message );
     nBytes = message.size();
     for ( i=0; i<nBytes; i++ )
-      std::cout << "Byte " << i << " = " << (int)message[i] << ", ";
+      std::cout << "Byte " << i << " = " << (int)message[i] << ", ";
     if ( nBytes > 0 )
-      std::cout << "stamp = " << stamp << std::endl;
+      std::cout << "stamp = " << stamp << std::endl;
 
     // Sleep for 10 milliseconds ... platform-dependent.
     SLEEP( 10 );
@@ -237,23 +238,23 @@ In the following example, we omit some necessary error checking and details rega
 
   return 0;
 }
-

+

MIDI Input with User Callback

-When set, a user-provided callback function will be invoked after the input of a complete MIDI message. It is possible to provide a pointer to user data that can be accessed in the callback function (not shown here). It is necessary to set the callback function immediately after opening the port to avoid having incoming messages written to the queue (which is not emptied when a callback function is set). If you are worried about this happening, you can check the queue using the RtMidi::getMessage() function to verify it is empty (after the callback function is set).

-In the following example, we omit some necessary error checking. For a more complete example, see the cmidiin.cpp program in the tests directory.

+

When set, a user-provided callback function will be invoked after the input of a complete MIDI message. It is possible to provide a pointer to user data that can be accessed in the callback function (not shown here). It is necessary to set the callback function immediately after opening the port to avoid having incoming messages written to the queue (which is not emptied when a callback function is set). If you are worried about this happening, you can check the queue using the RtMidi::getMessage() function to verify it is empty (after the callback function is set).

+

In the following example, we omit some necessary error checking. For a more complete example, see the cmidiin.cpp program in the tests directory.

// cmidiin.cpp
 
 #include <iostream>
 #include <cstdlib>
-#include "RtMidi.h"
+#include "RtMidi.h"
 
 void mycallback( double deltatime, std::vector< unsigned char > *message, void *userData )
 {
   unsigned int nBytes = message->size();
   for ( unsigned int i=0; i<nBytes; i++ )
-    std::cout << "Byte " << i << " = " << (int)message->at(i) << ", ";
+    std::cout << "Byte " << i << " = " << (int)message->at(i) << ", ";
   if ( nBytes > 0 )
-    std::cout << "stamp = " << deltatime << std::endl;
+    std::cout << "stamp = " << deltatime << std::endl;
 }
 
 int main()
@@ -261,23 +262,23 @@ In the following example, we omit some necessary error checking. For a more comp
   RtMidiIn *midiin = new RtMidiIn();
 
   // Check available ports.
-  unsigned int nPorts = midiin->getPortCount();
+  unsigned int nPorts = midiin->getPortCount();
   if ( nPorts == 0 ) {
-    std::cout << "No ports available!\n";
+    std::cout << "No ports available!\n";
     goto cleanup;
   }
 
-  midiin->openPort( 0 );
+  midiin->openPort( 0 );
 
   // Set our callback function.  This should be done immediately after
   // opening the port to avoid having incoming messages written to the
   // queue.
-  midiin->setCallback( &mycallback );
+  midiin->setCallback( &mycallback );
 
-  // Don't ignore sysex, timing, or active sensing messages.
-  midiin->ignoreTypes( false, false, false );
+  // Don't ignore sysex, timing, or active sensing messages.
+  midiin->ignoreTypes( false, false, false );
 
-  std::cout << "\nReading MIDI input ... press <enter> to quit.\n";
+  std::cout << "\nReading MIDI input ... press <enter> to quit.\n";
   char input;
   std::cin.get(input);
 
@@ -287,12 +288,13 @@ In the following example, we omit some necessary error checking. For a more comp
 
   return 0;
 }
-

+

Virtual Ports

-The Linux ALSA and Macintosh CoreMIDI APIs allow for the establishment of virtual input and output MIDI ports to which other software clients can connect. RtMidi incorporates this functionality with the RtMidiIn::openVirtualPort() and RtMidiOut::openVirtualPort() functions. Any messages sent with the RtMidiOut::sendMessage() function will also be transmitted through an open virtual output port. If a virtual input port is open and a user callback function is set, the callback function will be invoked when messages arrive via that port. If a callback function is not set, the user must poll the input queue to check whether messages have arrived. No notification is provided for the establishment of a client connection via a virtual port.

+

The Linux ALSA and Macintosh CoreMIDI APIs allow for the establishment of virtual input and output MIDI ports to which other software clients can connect. RtMidi incorporates this functionality with the RtMidiIn::openVirtualPort() and RtMidiOut::openVirtualPort() functions. Any messages sent with the RtMidiOut::sendMessage() function will also be transmitted through an open virtual output port. If a virtual input port is open and a user callback function is set, the callback function will be invoked when messages arrive via that port. If a callback function is not set, the user must poll the input queue to check whether messages have arrived. No notification is provided for the establishment of a client connection via a virtual port.

+

Compiling

-In order to compile RtMidi for a specific OS and API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:

- +

In order to compile RtMidi for a specific OS and API, it is necessary to supply the appropriate preprocessor definition and library within the compiler statement:

+
@@ -304,25 +306,32 @@ In order to compile RtMidi.h, RtError.h, and RtMidi.cpp all exist in the same directory.

+

The example compiler statements above could be used to compile the midiprobe.cpp example file, assuming that midiprobe.cpp, RtMidi.h, RtError.h, and RtMidi.cpp all exist in the same directory.

+

Debugging

-If you are having problems getting RtMidi to run on your system, try passing the preprocessor definition __RTMIDI_DEBUG__ to the compiler (or define it in RtMidi.h). A variety of warning messages will be displayed that may help in determining the problem. Also try using the programs included in the test directory. The program midiprobe displays the queried capabilities of all MIDI ports found.

+

If you are having problems getting RtMidi to run on your system, try passing the preprocessor definition __RTMIDI_DEBUG__ to the compiler (or define it in RtMidi.h). A variety of warning messages will be displayed that may help in determining the problem. Also try using the programs included in the test directory. The program midiprobe displays the queried capabilities of all MIDI ports found.

+

API Notes

-RtMidi is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each.

+

RtMidi is designed to provide a common API across the various supported operating systems and audio libraries. Despite that, some issues should be mentioned with regard to each.

+

Linux:

-RtMidi for Linux was developed using the Fedora distribution. A decision was made to not include support for the OSS API because the OSS API provides such limited functionality and because ALSA support is now incorporated in the Linux kernel. RtMidi uses the ALSA sequencer API, which allows for virtual software input and output ports.

+

RtMidi for Linux was developed using the Fedora distribution. A decision was made to not include support for the OSS API because the OSS API provides such limited functionality and because ALSA support is now incorporated in the Linux kernel. RtMidi uses the ALSA sequencer API, which allows for virtual software input and output ports.

+

Macintosh OS X (CoreAudio):

-The Apple CoreMidi API allows for the establishment of virtual input and output ports to which other software applications can connect.

+

The Apple CoreMidi API allows for the establishment of virtual input and output ports to which other software applications can connect.

+

Irix (SGI):

-The Irix version of RtMidi was written and tested on an SGI Indy running Irix version 6.5.4 and the MD audio library.

+

The Irix version of RtMidi was written and tested on an SGI Indy running Irix version 6.5.4 and the MD audio library.

+

Windows (Multimedia Library):

-The configure script provides support for the MinGW compiler.

-The Windows Multimedia library MIDI calls used in RtMidi do not make use of streaming functionality. Incoming system exclusive messages read by RtMidiIn are limited to a length as defined by the preprocessor definition RT_SYSEX_BUFFER_SIZE (set in RtMidi.cpp). The default value is 1024. There is no such limit for outgoing sysex messages via RtMidiOut.

-RtMidi was originally developed with Visual C++ version 6.0.

-The configure script provides support for the MinGW compiler.

+

The configure script provides support for the MinGW compiler.

+

The Windows Multimedia library MIDI calls used in RtMidi do not make use of streaming functionality. Incoming system exclusive messages read by RtMidiIn are limited to a length as defined by the preprocessor definition RT_SYSEX_BUFFER_SIZE (set in RtMidi.cpp). The default value is 1024. There is no such limit for outgoing sysex messages via RtMidiOut.

+

RtMidi was originally developed with Visual C++ version 6.0.

+

The configure script provides support for the MinGW compiler.

+

Acknowledgements

-Many thanks to the following people for providing bug fixes and improvements:
    +

    Many thanks to the following people for providing bug fixes and improvements:

    +
    • John Dey (OS-X timestamps)
    • @@ -339,19 +348,26 @@ Christoph Eckert (ALSA sysex fixes)
    • Immanuel Litzroth (OS-X sysex fix)
    • Axel Schmidt (client naming)
    • +
    • +Bastiaan Verreijt (Windows sysex multi-buffer code)
    • +
    • +Jon McCormack (Snow Leopard updates)
    • +
    • +Paul Dean (increment optimization)
    -

    +

    License

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

    -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:

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

    -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.

    -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. +

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

    +

    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:

    +

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

    +

    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.

    +

    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.

    +

OS: MIDI API: Preprocessor Definition: Library or Framework: Example Compiler Statement:
-
©2003-2009 Gary P. Scavone, McGill University. All Rights Reserved.
+
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
Maintained by Gary P. Scavone, gary at music.mcgill.ca
diff --git a/doc/html/structRtMidiIn_1_1MidiMessage-members.html b/doc/html/structRtMidiIn_1_1MidiMessage-members.html new file mode 100644 index 0000000..960f99e --- /dev/null +++ b/doc/html/structRtMidiIn_1_1MidiMessage-members.html @@ -0,0 +1,22 @@ + + +The RtMidi Tutorial + + + +

+Tutorial   Class/Enum List   File List   Compound Members  
+
+ +
+

RtMidiIn::MidiMessage Member List

This is the complete list of members for RtMidiIn::MidiMessage, including all inherited members. +
+
+ + + +
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary at music.mcgill.ca
+ + + diff --git a/doc/html/structRtMidiIn_1_1MidiMessage.html b/doc/html/structRtMidiIn_1_1MidiMessage.html new file mode 100644 index 0000000..e20ea5b --- /dev/null +++ b/doc/html/structRtMidiIn_1_1MidiMessage.html @@ -0,0 +1,30 @@ + + +The RtMidi Tutorial + + + +
+Tutorial   Class/Enum List   File List   Compound Members  
+
+ + +
+

RtMidiIn::MidiMessage Struct Reference

+

List of all members.

+ +
+
The documentation for this struct was generated from the following file: +
+
+ + + +
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary at music.mcgill.ca
+ + + diff --git a/doc/html/structRtMidiIn_1_1RtMidiInData-members.html b/doc/html/structRtMidiIn_1_1RtMidiInData-members.html new file mode 100644 index 0000000..aa0d9fc --- /dev/null +++ b/doc/html/structRtMidiIn_1_1RtMidiInData-members.html @@ -0,0 +1,22 @@ + + +The RtMidi Tutorial + + + +
+Tutorial   Class/Enum List   File List   Compound Members  
+
+ +
+

RtMidiIn::RtMidiInData Member List

This is the complete list of members for RtMidiIn::RtMidiInData, including all inherited members. +
+
+ + + +
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary at music.mcgill.ca
+ + + diff --git a/doc/html/structRtMidiIn_1_1RtMidiInData.html b/doc/html/structRtMidiIn_1_1RtMidiInData.html new file mode 100644 index 0000000..769ca0c --- /dev/null +++ b/doc/html/structRtMidiIn_1_1RtMidiInData.html @@ -0,0 +1,30 @@ + + +The RtMidi Tutorial + + + +
+Tutorial   Class/Enum List   File List   Compound Members  
+
+ + +
+

RtMidiIn::RtMidiInData Struct Reference

+

List of all members.

+ +
+
The documentation for this struct was generated from the following file: +
+
+ + + +
©2003-2010 Gary P. Scavone, McGill University. All Rights Reserved.
+ Maintained by Gary P. Scavone, gary at music.mcgill.ca
+ + + diff --git a/doc/html/tabs.css b/doc/html/tabs.css index ab02c62..a444163 100644 --- a/doc/html/tabs.css +++ b/doc/html/tabs.css @@ -57,7 +57,7 @@ DIV.tabs SPAN white-space : nowrap; } -DIV.tabs INPUT +DIV.tabs #MSearchBox { float : right; display : inline; -- cgit v1.2.3