Release 4.2.1 tarball

This commit is contained in:
Gary Scavone
2013-09-29 23:40:35 +02:00
committed by Stephen Sinclair
parent 11cf5faa0a
commit 21b93795e7
1041 changed files with 23984 additions and 16348 deletions

View File

@@ -8,8 +8,8 @@
<img src="princeton.gif"> &nbsp; <img src="ccrma.gif"> &nbsp; <img src="mcgill.gif"><P>
<a class="qindex" href="index.html">Home</a> &nbsp; <a class="qindex" href="information.html">Information</a> &nbsp; <a class="qindex" href="classes.html">Classes</a> &nbsp; <a class="qindex" href="download.html">Download</a> &nbsp; <a class="qindex" href="usage.html">Usage</a> &nbsp; <a class="qindex" href="maillist.html">Mail List</a> &nbsp; <a class="qindex" href="system.html">Requirements</a> &nbsp; <a class="qindex" href="links.html">Links</a> &nbsp; <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
<HR>
<!-- Generated by Doxygen 1.3.4 -->
<h1>MidiFileIn Class Reference</h1><code>#include &lt;<a class="el" href="MidiFileIn_8h-source.html">MidiFileIn.h</a>&gt;</code>
<!-- Generated by Doxygen 1.4.4 -->
<h1>MidiFileIn Class Reference</h1><!-- doxytag: class="MidiFileIn" --><!-- doxytag: inherits="Stk" --><code>#include &lt;<a class="el" href="MidiFileIn_8h-source.html">MidiFileIn.h</a>&gt;</code>
<p>
<p>Inheritance diagram for MidiFileIn:
<p><center><img src="classMidiFileIn.png" usemap="#MidiFileIn_map" border="0" alt=""></center>
@@ -20,64 +20,61 @@
A standard MIDI file reading/parsing class.
<p>
This class can be used to read events from a standard MIDI file. Event bytes are copied to a C++ vector and must be subsequently interpreted by the user. The function <a class="el" href="classMidiFileIn.html#a8">getNextMidiEvent()</a> skips meta and sysex events, returning only MIDI channel messages. Event delta-times are returned in the form of "ticks" and a function is provided to determine the current "seconds per tick". Tempo changes are internally tracked by the class and reflected in the values returned by the function <a class="el" href="classMidiFileIn.html#a6">getTickSeconds()</a>.<p>
by Gary P. Scavone, 2003.
by Gary P. Scavone, 2003.
<p>
<p>
Definition at line <a class="el" href="MidiFileIn_8h-source.html#l00027">27</a> of file <a class="el" href="MidiFileIn_8h-source.html">MidiFileIn.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a0">MidiFileIn</a> (std::string fileName)</td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a0">MidiFileIn</a> (std::string fileName)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. </em> <a href="#a0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a1" doxytag="MidiFileIn::~MidiFileIn" ></a>
&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a1">~MidiFileIn</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor. <a href="#a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="MidiFileIn::~MidiFileIn" ref="a1" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a1">~MidiFileIn</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class destructor. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a2" doxytag="MidiFileIn::getFileFormat" ></a>
int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a2">getFileFormat</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="MidiFileIn::getFileFormat" ref="a2" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a2">getFileFormat</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the MIDI file format (0, 1, or 2). <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a3" doxytag="MidiFileIn::getNumberOfTracks" ></a>
unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a3">getNumberOfTracks</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the MIDI file format (0, 1, or 2). <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="MidiFileIn::getNumberOfTracks" ref="a3" args="() const " -->
unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a3">getNumberOfTracks</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of tracks in the MIDI file. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a4">getDivision</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of tracks in the MIDI file. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a4">getDivision</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the MIDI file division value from the file header. </em> <a href="#a4"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a5">rewindTrack</a> (unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the MIDI file division value from the file header. <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a5">rewindTrack</a> (unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the specified track event reader to the beginning of its track. </em> <a href="#a5"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>double&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a6">getTickSeconds</a> (unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Move the specified track event reader to the beginning of its track. <a href="#a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a6">getTickSeconds</a> (unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current value, in seconds, of delta-time ticks for the specified track. </em> <a href="#a6"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a7">getNextEvent</a> (std::vector&lt; unsigned char &gt; *event, unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current value, in seconds, of delta-time ticks for the specified track. <a href="#a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a7">getNextEvent</a> (std::vector&lt; unsigned char &gt; *event, unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill the user-provided vector with the next event in the specified track and return the event delta-time in ticks. </em> <a href="#a7"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned long&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classMidiFileIn.html#a8">getNextMidiEvent</a> (std::vector&lt; unsigned char &gt; *midiEvent, unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill the user-provided vector with the next event in the specified track and return the event delta-time in ticks. <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMidiFileIn.html#a8">getNextMidiEvent</a> (std::vector&lt; unsigned char &gt; *midiEvent, unsigned int track=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill the user-provided vector with the next MIDI channel event in the specified track and return the event delta time in ticks. </em> <a href="#a8"></a><em><br><br></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill the user-provided vector with the next MIDI channel event in the specified track and return the event delta time in ticks. <a href="#a8"></a><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="MidiFileIn::MidiFileIn" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<a class="anchor" name="a0"></a><!-- doxytag: member="MidiFileIn::MidiFileIn" ref="a0" args="(std::string fileName)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> MidiFileIn::MidiFileIn </td>
<td class="md" nowrap valign="top">MidiFileIn::MidiFileIn </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">std::string&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>fileName</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
@@ -87,28 +84,27 @@ unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href
<p>
Default constructor.
<p>
If an error occurs while opening or parsing the file header, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
If an error occurs while opening or parsing the file header, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a4" doxytag="MidiFileIn::getDivision" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<a class="anchor" name="a4"></a><!-- doxytag: member="MidiFileIn::getDivision" ref="a4" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> int MidiFileIn::getDivision </td>
<td class="md" nowrap valign="top">int MidiFileIn::getDivision </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
@@ -118,28 +114,27 @@ If an error occurs while opening or parsing the file header, an <a class="el" hr
<p>
Return the MIDI file division value from the file header.
<p>
Note that this value must be "parsed" in accordance with the MIDI File Specification. In particular, if the MSB is set, the file uses time-code representations for delta-time values. </td>
Note that this value must be "parsed" in accordance with the MIDI File Specification. In particular, if the MSB is set, the file uses time-code representations for delta-time values. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="MidiFileIn::rewindTrack" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<a class="anchor" name="a5"></a><!-- doxytag: member="MidiFileIn::rewindTrack" ref="a5" args="(unsigned int track=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void MidiFileIn::rewindTrack </td>
<td class="md" nowrap valign="top">void MidiFileIn::rewindTrack </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">unsigned int&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>track</em> = 0 </td>
<td class="mdname1" valign="top" nowrap> <em>track</em> = <code>0</code> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
@@ -149,28 +144,27 @@ Note that this value must be "parsed" in accordance with the MIDI File Specifica
<p>
Move the specified track event reader to the beginning of its track.
<p>
The relevant track tempo value is reset as well. If an invalid track number is specified, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
The relevant track tempo value is reset as well. If an invalid track number is specified, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="MidiFileIn::getTickSeconds" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<a class="anchor" name="a6"></a><!-- doxytag: member="MidiFileIn::getTickSeconds" ref="a6" args="(unsigned int track=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> double MidiFileIn::getTickSeconds </td>
<td class="md" nowrap valign="top">double MidiFileIn::getTickSeconds </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">unsigned int&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>track</em> = 0 </td>
<td class="mdname1" valign="top" nowrap> <em>track</em> = <code>0</code> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
@@ -180,37 +174,36 @@ The relevant track tempo value is reset as well. If an invalid track number is s
<p>
Get the current value, in seconds, of delta-time ticks for the specified track.
<p>
This value can change as events are read (via "Set Tempo" Meta-Events). Therefore, one should call this function after every call to <a class="el" href="classMidiFileIn.html#a7">getNextEvent()</a> or <a class="el" href="classMidiFileIn.html#a8">getNextMidiEvent()</a>. If an invalid track number is specified, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
This value can change as events are read (via "Set Tempo" Meta-Events). Therefore, one should call this function after every call to <a class="el" href="classMidiFileIn.html#a7">getNextEvent()</a> or <a class="el" href="classMidiFileIn.html#a8">getNextMidiEvent()</a>. If an invalid track number is specified, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="MidiFileIn::getNextEvent" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<a class="anchor" name="a7"></a><!-- doxytag: member="MidiFileIn::getNextEvent" ref="a7" args="(std::vector&lt; unsigned char &gt; *event, unsigned int track=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned long MidiFileIn::getNextEvent </td>
<td class="md" nowrap valign="top">unsigned long MidiFileIn::getNextEvent </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">std::vector&lt; unsigned char &gt; *&nbsp;</td>
<td class="mdname" nowrap> <em>event</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>track</em> = 0</td>
<td class="mdname" nowrap> <em>track</em> = <code>0</code></td>
</tr>
<tr>
<td></td>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
@@ -220,37 +213,36 @@ This value can change as events are read (via "Set Tempo" Meta-Events). Therefor
<p>
Fill the user-provided vector with the next event in the specified track and return the event delta-time in ticks.
<p>
MIDI File events consist of a delta time and a sequence of event bytes. This function returns the delta-time value and writes the subsequent event bytes directly to the event vector. The user must parse the event bytes in accordance with the MIDI File Specification. All returned MIDI channel events are complete ... a status byte is provided even when running status is used in the file. If the track has reached its end, no bytes will be written and the event vector size will be zero. If an invalid track number is specified or an error occurs while reading the file, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
MIDI File events consist of a delta time and a sequence of event bytes. This function returns the delta-time value and writes the subsequent event bytes directly to the event vector. The user must parse the event bytes in accordance with the MIDI File Specification. All returned MIDI channel events are complete ... a status byte is provided even when running status is used in the file. If the track has reached its end, no bytes will be written and the event vector size will be zero. If an invalid track number is specified or an error occurs while reading the file, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
</tr>
</table>
<a class="anchor" name="a8" doxytag="MidiFileIn::getNextMidiEvent" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<a class="anchor" name="a8"></a><!-- doxytag: member="MidiFileIn::getNextMidiEvent" ref="a8" args="(std::vector&lt; unsigned char &gt; *midiEvent, unsigned int track=0)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> unsigned long MidiFileIn::getNextMidiEvent </td>
<td class="md" nowrap valign="top">unsigned long MidiFileIn::getNextMidiEvent </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">std::vector&lt; unsigned char &gt; *&nbsp;</td>
<td class="mdname" nowrap> <em>midiEvent</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int&nbsp;</td>
<td class="mdname" nowrap> <em>track</em> = 0</td>
<td class="mdname" nowrap> <em>track</em> = <code>0</code></td>
</tr>
<tr>
<td></td>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
@@ -260,7 +252,7 @@ MIDI File events consist of a delta time and a sequence of event bytes. This fun
<p>
Fill the user-provided vector with the next MIDI channel event in the specified track and return the event delta time in ticks.
<p>
All returned MIDI events are complete ... a status byte is provided even when running status is used in the file. Meta and sysex events in the track are skipped though "Set Tempo" events are properly parsed for use by the <a class="el" href="classMidiFileIn.html#a6">getTickSeconds()</a> function. If the track has reached its end, no bytes will be written and the event vector size will be zero. If an invalid track number is specified or an error occurs while reading the file, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
All returned MIDI events are complete ... a status byte is provided even when running status is used in the file. Meta and sysex events in the track are skipped though "Set Tempo" events are properly parsed for use by the <a class="el" href="classMidiFileIn.html#a6">getTickSeconds()</a> function. If the track has reached its end, no bytes will be written and the event vector size will be zero. If an invalid track number is specified or an error occurs while reading the file, an <a class="el" href="classStkError.html">StkError</a> exception will be thrown. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
@@ -269,7 +261,7 @@ All returned MIDI events are complete ... a status byte is provided even when ru
<table>
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
<tr><td>&copy;1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
<tr><td>&copy;1995-2005 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
</table>
</BODY>