/apidocs/echonest.support.midi.MidiOutStream-pysrc.html
http://echo-nest-remix.googlecode.com/ · HTML · 595 lines · 564 code · 10 blank · 21 comment · 0 complexity · a1817943e30dc3af1258e3721aa1d645 MD5 · raw file
Large files are truncated click here to view the full file
- <?xml version="1.0" encoding="ascii"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>echonest.support.midi.MidiOutStream</title>
- <link rel="stylesheet" href="epydoc.css" type="text/css" />
- <script type="text/javascript" src="epydoc.js"></script>
- </head>
- <body bgcolor="white" text="black" link="blue" vlink="#204080"
- alink="#204080">
- <!-- ==================== NAVIGATION BAR ==================== -->
- <table class="navbar" border="0" width="100%" cellpadding="0"
- bgcolor="#a0c0ff" cellspacing="0">
- <tr valign="middle">
- <!-- Tree link -->
- <th> <a
- href="module-tree.html">Trees</a> </th>
- <!-- Index link -->
- <th> <a
- href="identifier-index.html">Indices</a> </th>
- <!-- Help link -->
- <th> <a
- href="help.html">Help</a> </th>
- <!-- Project homepage -->
- <th class="navbar" align="right" width="100%">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr><th class="navbar" align="center"
- ><a class="navbar" target="_top" href="http://code.google.com/p/echo-nest-remix/">Project Homepage</a></th>
- </tr></table></th>
- </tr>
- </table>
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr valign="top">
- <td width="100%">
- <span class="breadcrumbs">
- <a href="echonest-module.html">Package echonest</a> ::
- <a href="echonest.support-module.html">Package support</a> ::
- <a href="echonest.support.midi-module.html">Package midi</a> ::
- Module MidiOutStream
- </span>
- </td>
- <td>
- <table cellpadding="0" cellspacing="0">
- <!-- hide/show private -->
- <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
- onclick="toggle_private();">hide private</a>]</span></td></tr>
- <tr><td align="right"><span class="options"
- >[<a href="frames.html" target="_top">frames</a
- >] | <a href="echonest.support.midi.MidiOutStream-pysrc.html"
- target="_top">no frames</a>]</span></td></tr>
- </table>
- </td>
- </tr>
- </table>
- <h1 class="epydoc">Source Code for <a href="echonest.support.midi.MidiOutStream-module.html">Module echonest.support.midi.MidiOutStream</a></h1>
- <pre class="py-src">
- <a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-comment"># -*- coding: ISO-8859-1 -*-</tt>
</tt>
- <a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream"></a><div id="MidiOutStream-def"><a name="L3"></a><tt class="py-lineno"> 3</tt> <a class="py-toggle" href="#" id="MidiOutStream-toggle" onclick="return toggle('MidiOutStream');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html">MidiOutStream</a><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="MidiOutStream-expanded"><a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line">
</tt>
- <a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line">
</tt>
- <a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
- <a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> MidiOutstream is Basically an eventhandler. It is the most central
</tt> </tt>
- <a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"> class in the Midi library. You use it both for writing events to
</tt> </tt>
- <a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-docstring"> an output stream, and as an event handler for an input stream.
</tt> </tt>
- <a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
- <a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-docstring"> This makes it extremely easy to take input from one stream and
</tt> </tt>
- <a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring"> send it to another. Ie. if you want to read a Midi file, do some
</tt> </tt>
- <a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-docstring"> processing, and send it to a midiport.
</tt> </tt>
- <a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
- <a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"> All time values are in absolute values from the opening of a
</tt> </tt>
- <a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-docstring"> stream. To calculate time values, please use the MidiTime and
</tt> </tt>
- <a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-docstring"> MidiDeltaTime classes.
</tt> </tt>
- <a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
- <a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.__init__"></a><div id="MidiOutStream.__init__-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="MidiOutStream.__init__-toggle" onclick="return toggle('MidiOutStream.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.__init__-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line">
</tt>
- <a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"> <tt class="py-comment"># the time is rather global, so it needs to be stored </tt>
</tt>
- <a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"> <tt class="py-comment"># here. Otherwise there would be no really simple way to </tt>
</tt>
- <a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"> <tt class="py-comment"># calculate it. The alternative would be to have each event </tt>
</tt>
- <a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"> <tt class="py-comment"># handler do it. That sucks even worse!</tt>
</tt>
- <a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_absolute_time</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
- <a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_relative_time</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
- <a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_current_track</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
- <a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_running_status</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
- </div><a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line">
</tt>
- <a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"> <tt class="py-comment"># time handling event handlers. They should be overwritten with care</tt>
</tt>
- <a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.update_time"></a><div id="MidiOutStream.update_time-def"><a name="L35"></a><tt class="py-lineno"> 35</tt> <a class="py-toggle" href="#" id="MidiOutStream.update_time-toggle" onclick="return toggle('MidiOutStream.update_time');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#update_time">update_time</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">new_time</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-param">relative</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.update_time-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.update_time-expanded"><a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-docstring"> Updates the time, if relative is true, new_time is relative,
</tt> </tt>
- <a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-docstring"> else it's absolute.
</tt> </tt>
- <a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">relative</tt><tt class="py-op">:</tt> </tt>
- <a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_relative_time</tt> <tt class="py-op">=</tt> <tt class="py-name">new_time</tt> </tt>
- <a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_absolute_time</tt> <tt class="py-op">+=</tt> <tt class="py-name">new_time</tt> </tt>
- <a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
- <a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_relative_time</tt> <tt class="py-op">=</tt> <tt class="py-name">new_time</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_absolute_time</tt> </tt>
- <a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_absolute_time</tt> <tt class="py-op">=</tt> <tt class="py-name">new_time</tt> </tt>
- </div><a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.reset_time"></a><div id="MidiOutStream.reset_time-def"><a name="L47"></a><tt class="py-lineno"> 47</tt> <a class="py-toggle" href="#" id="MidiOutStream.reset_time-toggle" onclick="return toggle('MidiOutStream.reset_time');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#reset_time">reset_time</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.reset_time-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.reset_time-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"><tt class="py-docstring"> reset time to 0
</tt> </tt>
- <a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_relative_time</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
- <a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_absolute_time</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
- </div><a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.rel_time"></a><div id="MidiOutStream.rel_time-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="MidiOutStream.rel_time-toggle" onclick="return toggle('MidiOutStream.rel_time');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#rel_time">rel_time</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.rel_time-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.rel_time-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"> <tt class="py-docstring">"Returns the relative time"</tt> </tt>
- <a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_relative_time</tt> </tt>
- </div><a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.abs_time"></a><div id="MidiOutStream.abs_time-def"><a name="L58"></a><tt class="py-lineno"> 58</tt> <a class="py-toggle" href="#" id="MidiOutStream.abs_time-toggle" onclick="return toggle('MidiOutStream.abs_time');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#abs_time">abs_time</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.abs_time-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.abs_time-expanded"><a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt class="py-docstring">"Returns the absolute time"</tt> </tt>
- <a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_absolute_time</tt> </tt>
- </div><a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line">
</tt>
- <a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> <tt class="py-comment"># running status methods</tt>
</tt>
- <a name="L63"></a><tt class="py-lineno"> 63</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.reset_run_stat"></a><div id="MidiOutStream.reset_run_stat-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="MidiOutStream.reset_run_stat-toggle" onclick="return toggle('MidiOutStream.reset_run_stat');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#reset_run_stat">reset_run_stat</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.reset_run_stat-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.reset_run_stat-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"> <tt class="py-docstring">"Invalidates the running status"</tt> </tt>
- <a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_running_status</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
- </div><a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.set_run_stat"></a><div id="MidiOutStream.set_run_stat-def"><a name="L68"></a><tt class="py-lineno"> 68</tt> <a class="py-toggle" href="#" id="MidiOutStream.set_run_stat-toggle" onclick="return toggle('MidiOutStream.set_run_stat');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#set_run_stat">set_run_stat</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">new_status</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.set_run_stat-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.set_run_stat-expanded"><a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-docstring">"Set the new running status"</tt> </tt>
- <a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_running_status</tt> <tt class="py-op">=</tt> <tt class="py-name">new_status</tt> </tt>
- </div><a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.get_run_stat"></a><div id="MidiOutStream.get_run_stat-def"><a name="L72"></a><tt class="py-lineno"> 72</tt> <a class="py-toggle" href="#" id="MidiOutStream.get_run_stat-toggle" onclick="return toggle('MidiOutStream.get_run_stat');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#get_run_stat">get_run_stat</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.get_run_stat-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.get_run_stat-expanded"><a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> <tt class="py-docstring">"Set the new running status"</tt> </tt>
- <a name="L74"></a><tt class="py-lineno"> 74</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_running_status</tt> </tt>
- </div><a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line">
</tt>
- <a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"> <tt class="py-comment"># track handling event handlers</tt>
</tt>
- <a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.set_current_track"></a><div id="MidiOutStream.set_current_track-def"><a name="L78"></a><tt class="py-lineno"> 78</tt> <a class="py-toggle" href="#" id="MidiOutStream.set_current_track-toggle" onclick="return toggle('MidiOutStream.set_current_track');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#set_current_track">set_current_track</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">new_track</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.set_current_track-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.set_current_track-expanded"><a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"> <tt class="py-docstring">"Sets the current track number"</tt> </tt>
- <a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_current_track</tt> <tt class="py-op">=</tt> <tt class="py-name">new_track</tt> </tt>
- </div><a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.get_current_track"></a><div id="MidiOutStream.get_current_track-def"><a name="L82"></a><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="MidiOutStream.get_current_track-toggle" onclick="return toggle('MidiOutStream.get_current_track');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#get_current_track">get_current_track</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.get_current_track-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.get_current_track-expanded"><a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"> <tt class="py-docstring">"Returns the current track number"</tt> </tt>
- <a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_current_track</tt> </tt>
- </div><a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line">
</tt>
- <a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line">
</tt>
- <a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"> <tt class="py-comment">#####################</tt>
</tt>
- <a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt class="py-comment">## Midi events</tt>
</tt>
- <a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line">
</tt>
- <a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.channel_message"></a><div id="MidiOutStream.channel_message-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="MidiOutStream.channel_message-toggle" onclick="return toggle('MidiOutStream.channel_message');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#channel_message">channel_message</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">message_type</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.channel_message-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.channel_message-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-docstring">"""The default event handler for channel messages"""</tt> </tt>
- <a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line">
</tt>
- <a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.note_on"></a><div id="MidiOutStream.note_on-def"><a name="L96"></a><tt class="py-lineno"> 96</tt> <a class="py-toggle" href="#" id="MidiOutStream.note_on-toggle" onclick="return toggle('MidiOutStream.note_on');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#note_on">note_on</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-param">note</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">,</tt> <tt class="py-param">velocity</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.note_on-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.note_on-expanded"><a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line">
</tt>
- <a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"><tt class="py-docstring"> note, velocity: 0-127
</tt> </tt>
- <a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line">
</tt>
- <a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.note_off"></a><div id="MidiOutStream.note_off-def"><a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="MidiOutStream.note_off-toggle" onclick="return toggle('MidiOutStream.note_off');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#note_off">note_off</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-param">note</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">,</tt> <tt class="py-param">velocity</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.note_off-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.note_off-expanded"><a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line">
</tt>
- <a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"><tt class="py-docstring"> note, velocity: 0-127
</tt> </tt>
- <a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line">
</tt>
- <a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.aftertouch"></a><div id="MidiOutStream.aftertouch-def"><a name="L114"></a><tt class="py-lineno">114</tt> <a class="py-toggle" href="#" id="MidiOutStream.aftertouch-toggle" onclick="return toggle('MidiOutStream.aftertouch');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#aftertouch">aftertouch</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-param">note</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">,</tt> <tt class="py-param">velocity</tt><tt class="py-op">=</tt><tt class="py-number">0x40</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.aftertouch-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.aftertouch-expanded"><a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line">
</tt>
- <a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"><tt class="py-docstring"> note, velocity: 0-127
</tt> </tt>
- <a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line">
</tt>
- <a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.continuous_controller"></a><div id="MidiOutStream.continuous_controller-def"><a name="L123"></a><tt class="py-lineno">123</tt> <a class="py-toggle" href="#" id="MidiOutStream.continuous_controller-toggle" onclick="return toggle('MidiOutStream.continuous_controller');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#continuous_controller">continuous_controller</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">,</tt> <tt class="py-param">controller</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.continuous_controller-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.continuous_controller-expanded"><a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line">
</tt>
- <a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"><tt class="py-docstring"> controller, value: 0-127
</tt> </tt>
- <a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line">
</tt>
- <a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.patch_change"></a><div id="MidiOutStream.patch_change-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="MidiOutStream.patch_change-toggle" onclick="return toggle('MidiOutStream.patch_change');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#patch_change">patch_change</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">,</tt> <tt class="py-param">patch</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.patch_change-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.patch_change-expanded"><a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line">
</tt>
- <a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"><tt class="py-docstring"> patch: 0-127
</tt> </tt>
- <a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line">
</tt>
- <a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.channel_pressure"></a><div id="MidiOutStream.channel_pressure-def"><a name="L141"></a><tt class="py-lineno">141</tt> <a class="py-toggle" href="#" id="MidiOutStream.channel_pressure-toggle" onclick="return toggle('MidiOutStream.channel_pressure');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#channel_pressure">channel_pressure</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">,</tt> <tt class="py-param">pressure</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.channel_pressure-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.channel_pressure-expanded"><a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line">
</tt>
- <a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"><tt class="py-docstring"> pressure: 0-127
</tt> </tt>
- <a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line">
</tt>
- <a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.pitch_bend"></a><div id="MidiOutStream.pitch_bend-def"><a name="L150"></a><tt class="py-lineno">150</tt> <a class="py-toggle" href="#" id="MidiOutStream.pitch_bend-toggle" onclick="return toggle('MidiOutStream.pitch_bend');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#pitch_bend">pitch_bend</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">channel</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.pitch_bend-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.pitch_bend-expanded"><a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line">
</tt>
- <a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"><tt class="py-docstring"> channel: 0-15
</tt> </tt>
- <a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"><tt class="py-docstring"> value: 0-16383
</tt> </tt>
- <a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"><tt class="py-docstring">
</tt> </tt>
- <a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line">
</tt>
- <a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line">
</tt>
- <a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line">
</tt>
- <a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line">
</tt>
- <a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> <tt class="py-comment">#####################</tt>
</tt>
- <a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> <tt class="py-comment">## System Exclusive</tt>
</tt>
- <a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.system_exclusive"></a><div id="MidiOutStream.system_exclusive-def"><a name="L165"></a><tt class="py-lineno">165</tt> <a class="py-toggle" href="#" id="MidiOutStream.system_exclusive-toggle" onclick="return toggle('MidiOutStream.system_exclusive');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#system_exclusive">system_exclusive</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.system_exclusive-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.system_exclusive-expanded"><a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line">
</tt>
- <a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"><tt class="py-docstring"> data: list of values in range(128)
</tt> </tt>
- <a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line">
</tt>
- <a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line">
</tt>
- <a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> <tt class="py-comment">#####################</tt>
</tt>
- <a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-comment">## Common events</tt>
</tt>
- <a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.song_position_pointer"></a><div id="MidiOutStream.song_position_pointer-def"><a name="L176"></a><tt class="py-lineno">176</tt> <a class="py-toggle" href="#" id="MidiOutStream.song_position_pointer-toggle" onclick="return toggle('MidiOutStream.song_position_pointer');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#song_position_pointer">song_position_pointer</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.song_position_pointer-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.song_position_pointer-expanded"><a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line">
</tt>
- <a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"><tt class="py-docstring"> value: 0-16383
</tt> </tt>
- <a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line">
</tt>
- <a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.song_select"></a><div id="MidiOutStream.song_select-def"><a name="L184"></a><tt class="py-lineno">184</tt> <a class="py-toggle" href="#" id="MidiOutStream.song_select-toggle" onclick="return toggle('MidiOutStream.song_select');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#song_select">song_select</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">songNumber</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.song_select-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.song_select-expanded"><a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line">
</tt>
- <a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"><tt class="py-docstring"> songNumber: 0-127
</tt> </tt>
- <a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L190"></a><tt class="py-lineno">190</tt> <tt class="py-line">
</tt>
- <a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.tuning_request"></a><div id="MidiOutStream.tuning_request-def"><a name="L192"></a><tt class="py-lineno">192</tt> <a class="py-toggle" href="#" id="MidiOutStream.tuning_request-toggle" onclick="return toggle('MidiOutStream.tuning_request');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#tuning_request">tuning_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.tuning_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.tuning_request-expanded"><a name="L193"></a><tt class="py-lineno">193</tt> <tt class="py-line">
</tt>
- <a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"><tt class="py-docstring"> No values passed
</tt> </tt>
- <a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line">
</tt>
- <a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.midi_time_code"></a><div id="MidiOutStream.midi_time_code-def"><a name="L200"></a><tt class="py-lineno">200</tt> <a class="py-toggle" href="#" id="MidiOutStream.midi_time_code-toggle" onclick="return toggle('MidiOutStream.midi_time_code');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#midi_time_code">midi_time_code</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">msg_type</tt><tt class="py-op">,</tt> <tt class="py-param">values</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.midi_time_code-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.midi_time_code-expanded"><a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"><tt class="py-docstring"> msg_type: 0-7
</tt> </tt>
- <a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"><tt class="py-docstring"> values: 0-15
</tt> </tt>
- <a name="L204"></a><tt class="py-lineno">204</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line">
</tt>
- <a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line">
</tt>
- <a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> <tt class="py-comment">#########################</tt>
</tt>
- <a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> <tt class="py-comment"># header does not really belong here. But anyhoo!!!</tt>
</tt>
- <a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.header"></a><div id="MidiOutStream.header-def"><a name="L211"></a><tt class="py-lineno">211</tt> <a class="py-toggle" href="#" id="MidiOutStream.header-toggle" onclick="return toggle('MidiOutStream.header');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#header">header</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">format</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-param">nTracks</tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-param">division</tt><tt class="py-op">=</tt><tt class="py-number">96</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.header-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.header-expanded"><a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line">
</tt>
- <a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"><tt class="py-docstring"> format: type of midi file in [1,2]
</tt> </tt>
- <a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"><tt class="py-docstring"> nTracks: number of tracks
</tt> </tt>
- <a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"><tt class="py-docstring"> division: timing division
</tt> </tt>
- <a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line">
</tt>
- <a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.eof"></a><div id="MidiOutStream.eof-def"><a name="L221"></a><tt class="py-lineno">221</tt> <a class="py-toggle" href="#" id="MidiOutStream.eof-toggle" onclick="return toggle('MidiOutStream.eof');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#eof">eof</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.eof-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.eof-expanded"><a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line">
</tt>
- <a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"><tt class="py-docstring"> End of file. No more events to be processed.
</tt> </tt>
- <a name="L225"></a><tt class="py-lineno">225</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt>
- <a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt>
- </div><a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line">
</tt>
- <a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line">
</tt>
- <a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"> <tt class="py-comment">#####################</tt>
</tt>
- <a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"> <tt class="py-comment">## meta events</tt>
</tt>
- <a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line">
</tt>
- <a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line">
</tt>
- <a name="MidiOutStream.meta_event"></a><div id="MidiOutStream.meta_event-def"><a name="L233"></a><tt class="py-lineno">233</tt> <a class="py-toggle" href="#" id="MidiOutStream.meta_event-toggle" onclick="return toggle('MidiOutStream.meta_event');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="echonest.support.midi.MidiOutStream.MidiOutStream-class.html#meta_event">meta_event</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">meta_type</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
- </div><div id="MidiOutStream.meta_event-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="MidiOutStream.meta_event-expanded"><a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line">
</tt>
- <a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"> <tt class="py-docstring">"""
</tt> </tt>
- <a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"><tt class="py-docstring"> Handles any undefined meta events
</tt> </tt>
- <a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"><tt…