Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

classRtMidi.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <HTML>
  2. <HEAD>
  3. <TITLE>The RtMidi Tutorial</TITLE>
  4. <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
  5. </HEAD>
  6. <BODY BGCOLOR="#FFFFFF">
  7. <CENTER>
  8. <a class="qindex" href="index.html">Tutorial</a> &nbsp; <a class="qindex" href="annotated.html">Class/Enum List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </CENTER>
  9. <HR>
  10. <!-- Generated by Doxygen 1.6.2 -->
  11. <div class="contents">
  12. <h1>RtMidi Class Reference</h1><!-- doxytag: class="RtMidi" -->
  13. <p>An abstract base class for realtime MIDI input/output.
  14. <a href="#_details">More...</a></p>
  15. <p><code>#include &lt;<a class="el" href="RtMidi_8h_source.html">RtMidi.h</a>&gt;</code></p>
  16. <div class="dynheader">
  17. Inheritance diagram for RtMidi:</div>
  18. <div class="dynsection">
  19. <div class="center">
  20. <img src="classRtMidi.png" usemap="#RtMidi_map" alt=""/>
  21. <map id="RtMidi_map" name="RtMidi_map">
  22. <area href="classRtMidiIn.html" alt="RtMidiIn" shape="rect" coords="0,56,67,80"/>
  23. <area href="classRtMidiOut.html" alt="RtMidiOut" shape="rect" coords="77,56,144,80"/>
  24. </map>
  25. </div>
  26. </div>
  27. <p><a href="classRtMidi-members.html">List of all members.</a></p>
  28. <table border="0" cellpadding="0" cellspacing="0">
  29. <tr><td colspan="2"><h2>Public Types</h2></td></tr>
  30. <tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406">Api</a> { <br/>
  31. &nbsp;&nbsp;<a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9">UNSPECIFIED</a>,
  32. <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a3f41293f89467641484fbd54c4530908">MACOSX_CORE</a>,
  33. <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2">LINUX_ALSA</a>,
  34. <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa">UNIX_JACK</a>,
  35. <br/>
  36. &nbsp;&nbsp;<a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f">WINDOWS_MM</a>,
  37. <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756">WINDOWS_KS</a>,
  38. <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959">RTMIDI_DUMMY</a>
  39. <br/>
  40. }</td></tr>
  41. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>MIDI API specifier arguments. </p>
  42. <a href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406">More...</a><br/></td></tr>
  43. <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
  44. <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9e30a89638f93193cb40edebaa536f5"></a><!-- doxytag: member="RtMidi::openPort" ref="ad9e30a89638f93193cb40edebaa536f5" args="(unsigned int portNumber=0, const std::string portName=std::string(&quot;RtMidi&quot;))=0" -->
  45. virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#ad9e30a89638f93193cb40edebaa536f5">openPort</a> (unsigned int portNumber=0, const std::string portName=std::string(&quot;RtMidi&quot;))=0</td></tr>
  46. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual <a class="el" href="classRtMidi.html#ad9e30a89638f93193cb40edebaa536f5" title="Pure virtual openPort() function.">openPort()</a> function. <br/></td></tr>
  47. <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9200cde4f5337c0bc421d20bd4fcf654"></a><!-- doxytag: member="RtMidi::openVirtualPort" ref="a9200cde4f5337c0bc421d20bd4fcf654" args="(const std::string portName=std::string(&quot;RtMidi&quot;))=0" -->
  48. virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#a9200cde4f5337c0bc421d20bd4fcf654">openVirtualPort</a> (const std::string portName=std::string(&quot;RtMidi&quot;))=0</td></tr>
  49. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual <a class="el" href="classRtMidi.html#a9200cde4f5337c0bc421d20bd4fcf654" title="Pure virtual openVirtualPort() function.">openVirtualPort()</a> function. <br/></td></tr>
  50. <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a49ef73a1e6007444019a7ae095e195"></a><!-- doxytag: member="RtMidi::getPortCount" ref="a9a49ef73a1e6007444019a7ae095e195" args="()=0" -->
  51. virtual unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#a9a49ef73a1e6007444019a7ae095e195">getPortCount</a> ()=0</td></tr>
  52. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual <a class="el" href="classRtMidi.html#a9a49ef73a1e6007444019a7ae095e195" title="Pure virtual getPortCount() function.">getPortCount()</a> function. <br/></td></tr>
  53. <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a799e2b9f4df39b298518f2b394db3391"></a><!-- doxytag: member="RtMidi::getPortName" ref="a799e2b9f4df39b298518f2b394db3391" args="(unsigned int portNumber=0)=0" -->
  54. virtual std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#a799e2b9f4df39b298518f2b394db3391">getPortName</a> (unsigned int portNumber=0)=0</td></tr>
  55. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual <a class="el" href="classRtMidi.html#a799e2b9f4df39b298518f2b394db3391" title="Pure virtual getPortName() function.">getPortName()</a> function. <br/></td></tr>
  56. <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a36125c4fa16550345b57f4a4927f5b4a"></a><!-- doxytag: member="RtMidi::closePort" ref="a36125c4fa16550345b57f4a4927f5b4a" args="(void)=0" -->
  57. virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#a36125c4fa16550345b57f4a4927f5b4a">closePort</a> (void)=0</td></tr>
  58. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pure virtual <a class="el" href="classRtMidi.html#a36125c4fa16550345b57f4a4927f5b4a" title="Pure virtual closePort() function.">closePort()</a> function. <br/></td></tr>
  59. <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
  60. <tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#a025fa339486c9a34b26ec707aa2944ce">getCompiledApi</a> (std::vector&lt; <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406">RtMidi::Api</a> &gt; &amp;apis) throw ()</td></tr>
  61. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A static function to determine the available compiled MIDI APIs. <a href="#a025fa339486c9a34b26ec707aa2944ce"></a><br/></td></tr>
  62. <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae1a810e84c57b2eb4989056cb384a04c"></a><!-- doxytag: member="RtMidi::error" ref="ae1a810e84c57b2eb4989056cb384a04c" args="(RtError::Type type, std::string errorString)" -->
  63. static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRtMidi.html#ae1a810e84c57b2eb4989056cb384a04c">error</a> (<a class="el" href="classRtError.html#ab04667aae01bffc354a9ac6bda6903ac">RtError::Type</a> type, std::string errorString)</td></tr>
  64. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A basic error reporting function for <a class="el" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a> classes. <br/></td></tr>
  65. </table>
  66. <hr/><a name="_details"></a><h2>Detailed Description</h2>
  67. <p>An abstract base class for realtime MIDI input/output. </p>
  68. <p>This class implements some common functionality for the realtime MIDI input/output subclasses <a class="el" href="classRtMidiIn.html" title="A realtime MIDI input class.">RtMidiIn</a> and <a class="el" href="classRtMidiOut.html" title="A realtime MIDI output class.">RtMidiOut</a>.</p>
  69. <p><a class="el" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a> WWW site: <a href="http://music.mcgill.ca/~gary/rtmidi/">http://music.mcgill.ca/~gary/rtmidi/</a></p>
  70. <p><a class="el" href="classRtMidi.html" title="An abstract base class for realtime MIDI input/output.">RtMidi</a>: realtime MIDI i/o C++ classes Copyright (c) 2003-2012 Gary P. Scavone</p>
  71. <p>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:</p>
  72. <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
  73. <p>Any person wishing to distribute modifications to the Software is asked to send the modifications to the original developer so that they can be incorporated into the canonical version. This is, however, not a binding provision of this license.</p>
  74. <p>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. </p>
  75. <hr/><h2>Member Enumeration Documentation</h2>
  76. <a class="anchor" id="aac66af04a85fe5c5f07c360574a19406"></a><!-- doxytag: member="RtMidi::Api" ref="aac66af04a85fe5c5f07c360574a19406" args="" -->
  77. <div class="memitem">
  78. <div class="memproto">
  79. <table class="memname">
  80. <tr>
  81. <td class="memname">enum <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406">RtMidi::Api</a></td>
  82. </tr>
  83. </table>
  84. </div>
  85. <div class="memdoc">
  86. <p>MIDI API specifier arguments. </p>
  87. <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
  88. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9"></a><!-- doxytag: member="UNSPECIFIED" ref="aac66af04a85fe5c5f07c360574a19406a4a4d9f7a38a082d6b0d5dd2b5de94ab9" args="" -->UNSPECIFIED</em>&nbsp;</td><td>
  89. <p>Search for a working compiled API. </p>
  90. </td></tr>
  91. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a3f41293f89467641484fbd54c4530908"></a><!-- doxytag: member="MACOSX_CORE" ref="aac66af04a85fe5c5f07c360574a19406a3f41293f89467641484fbd54c4530908" args="" -->MACOSX_CORE</em>&nbsp;</td><td>
  92. <p>Macintosh OS-X Core Midi API. </p>
  93. </td></tr>
  94. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2"></a><!-- doxytag: member="LINUX_ALSA" ref="aac66af04a85fe5c5f07c360574a19406a20c691b24844d3ab5dbf882123235df2" args="" -->LINUX_ALSA</em>&nbsp;</td><td>
  95. <p>The Advanced Linux Sound Architecture API. </p>
  96. </td></tr>
  97. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa"></a><!-- doxytag: member="UNIX_JACK" ref="aac66af04a85fe5c5f07c360574a19406a1f59daf3120f47c0ae3891773112ddfa" args="" -->UNIX_JACK</em>&nbsp;</td><td>
  98. <p>The Jack Low-Latency MIDI Server API. </p>
  99. </td></tr>
  100. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f"></a><!-- doxytag: member="WINDOWS_MM" ref="aac66af04a85fe5c5f07c360574a19406a647868cb4ed37f517bf185a7f41cb70f" args="" -->WINDOWS_MM</em>&nbsp;</td><td>
  101. <p>The Microsoft Multimedia MIDI API. </p>
  102. </td></tr>
  103. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756"></a><!-- doxytag: member="WINDOWS_KS" ref="aac66af04a85fe5c5f07c360574a19406a246ae76adf088dd4d359bbac3d605756" args="" -->WINDOWS_KS</em>&nbsp;</td><td>
  104. <p>The Microsoft Kernel Streaming MIDI API. </p>
  105. </td></tr>
  106. <tr><td valign="top"><em><a class="anchor" id="aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959"></a><!-- doxytag: member="RTMIDI_DUMMY" ref="aac66af04a85fe5c5f07c360574a19406a54dba406ab358492005ce2b966a2d959" args="" -->RTMIDI_DUMMY</em>&nbsp;</td><td>
  107. <p>A compilable but non-functional API. </p>
  108. </td></tr>
  109. </table>
  110. </dd>
  111. </dl>
  112. </div>
  113. </div>
  114. <hr/><h2>Member Function Documentation</h2>
  115. <a class="anchor" id="a025fa339486c9a34b26ec707aa2944ce"></a><!-- doxytag: member="RtMidi::getCompiledApi" ref="a025fa339486c9a34b26ec707aa2944ce" args="(std::vector&lt; RtMidi::Api &gt; &amp;apis)" -->
  116. <div class="memitem">
  117. <div class="memproto">
  118. <table class="memname">
  119. <tr>
  120. <td class="memname">static void RtMidi::getCompiledApi </td>
  121. <td>(</td>
  122. <td class="paramtype">std::vector&lt; <a class="el" href="classRtMidi.html#aac66af04a85fe5c5f07c360574a19406">RtMidi::Api</a> &gt; &amp;&nbsp;</td>
  123. <td class="paramname"> <em>apis</em></td>
  124. <td>&nbsp;)&nbsp;</td>
  125. <td> throw ()<code> [static]</code></td>
  126. </tr>
  127. </table>
  128. </div>
  129. <div class="memdoc">
  130. <p>A static function to determine the available compiled MIDI APIs. </p>
  131. <p>The values returned in the std::vector can be compared against the enumerated list values. Note that there can be more than one API compiled for certain operating systems. </p>
  132. </div>
  133. </div>
  134. <hr/>The documentation for this class was generated from the following file:<ul>
  135. <li><a class="el" href="RtMidi_8h_source.html">RtMidi.h</a></li>
  136. </ul>
  137. </div>
  138. <HR>
  139. <table><tr><td><img src="../images/mcgill.gif" width=165></td>
  140. <td>&copy;2003-2012 Gary P. Scavone, McGill University. All Rights Reserved.<br>
  141. Maintained by Gary P. Scavone, gary at music.mcgill.ca</td></tr>
  142. </table>
  143. </BODY>
  144. </HTML>