Commits

illume committed 89a7df7

updated midi docs

  • Participants
  • Parent commits 68ca9ad

Comments (0)

Files changed (6)

docs/ref/index.html

 <ul>
 <li><a href="midi.html#pygame.midi.Input">pygame.midi.Input</a> - <font size=-1>Input is used to get midi input from midi devices.</font></li>
 <ul>
+<li><a href="midi.html#Input.close">Input.close</a> - <font size=-1> closes a midi stream, flushing any pending buffers.</font></li>
 <li><a href="midi.html#Input.poll">Input.poll</a> - <font size=-1>returns true if there's data, or false if not.</font></li>
 <li><a href="midi.html#Input.read">Input.read</a> - <font size=-1>reads num_events midi events from the buffer.</font></li>
 </ul>
 <li><a href="midi.html#pygame.midi.MidiException">pygame.midi.MidiException</a> - <font size=-1>exception that pygame.midi functions and classes can raise</font></li>
 <li><a href="midi.html#pygame.midi.Output">pygame.midi.Output</a> - <font size=-1>Output is used to send midi to an output device</font></li>
 <ul>
+<li><a href="midi.html#Output.abort">Output.abort</a> - <font size=-1> terminates outgoing messages immediately</font></li>
+<li><a href="midi.html#Output.close">Output.close</a> - <font size=-1> closes a midi stream, flushing any pending buffers.</font></li>
 <li><a href="midi.html#Output.note_off">Output.note_off</a> - <font size=-1>turns a midi note off.  Note must be on.</font></li>
 <li><a href="midi.html#Output.note_on">Output.note_on</a> - <font size=-1>turns a midi note on.  Note must be off.</font></li>
 <li><a href="midi.html#Output.set_instrument">Output.set_instrument</a> - <font size=-1>select an instrument, with a value between 0 and 127</font></li>

docs/ref/midi.html

 <p>The midi module can send output to midi devices, and get input from midi devices. It can also list midi devices on the system. </p>
 <p>Including real midi devices, and virtual ones. </p>
 <p>It uses the portmidi library. Is portable to which ever platforms portmidi supports (currently windows, <tt>OSX</tt>, and linux). </p>
-<p>This uses pyportmidi for now, but may use its own bindings at some point in the future. </p>
+<p>This uses pyportmidi for now, but may use its own bindings at some point in the future. The pyportmidi bindings are included with pygame. </p>
 <p>New in pygame <tt>1.9.0</tt>. </p>
 <!--COMMENTS:pygame.midi--> &nbsp;<br> 
 
   <tt>Input(device_id)</tt><br>
   <tt>Input(device_id, buffer_size)</tt><br>
 <ul><small><table>
+  <tr><td><a href="midi.html#Input.close">Input.close</a> - <font size=-1> closes a midi stream, flushing any pending buffers.</font></td><td> closes a midi stream, flushing any pending buffers.</td></tr>
   <tr><td><a href="midi.html#Input.poll">Input.poll</a> - <font size=-1>returns true if there's data, or false if not.</font></td><td>returns true if there's data, or false if not.</td></tr>
   <tr><td><a href="midi.html#Input.read">Input.read</a> - <font size=-1>reads num_events midi events from the buffer.</font></td><td>reads num_events midi events from the buffer.</td></tr>
 </table></small></ul>
 <!--COMMENTS:pygame.midi.Input--> &nbsp;<br> 
 
 
+<a name="Input.close">
+<big><b>Input.close</big></b><br><ul>
+  <i> closes a midi stream, flushing any pending buffers.</i><br>
+  <tt>Input.close(): return None</tt><br>
+<p>PortMidi attempts to close open streams when the application exits -- this is particularly difficult under Windows. </p>
+<!--COMMENTS:Input.close--> &nbsp;<br> 
+<br></ul>
+
+
 <a name="Input.poll">
 <big><b>Input.poll</big></b><br><ul>
   <i>returns true if there's data, or false if not.</i><br>
   <tt>Output(device_id, buffer_size = 4096)</tt><br>
   <tt>Output(device_id, latency, buffer_size)</tt><br>
 <ul><small><table>
+  <tr><td><a href="midi.html#Output.abort">Output.abort</a> - <font size=-1> terminates outgoing messages immediately</font></td><td> terminates outgoing messages immediately</td></tr>
+  <tr><td><a href="midi.html#Output.close">Output.close</a> - <font size=-1> closes a midi stream, flushing any pending buffers.</font></td><td> closes a midi stream, flushing any pending buffers.</td></tr>
   <tr><td><a href="midi.html#Output.note_off">Output.note_off</a> - <font size=-1>turns a midi note off.  Note must be on.</font></td><td>turns a midi note off.  Note must be on.</td></tr>
   <tr><td><a href="midi.html#Output.note_on">Output.note_on</a> - <font size=-1>turns a midi note on.  Note must be off.</font></td><td>turns a midi note on.  Note must be off.</td></tr>
   <tr><td><a href="midi.html#Output.set_instrument">Output.set_instrument</a> - <font size=-1>select an instrument, with a value between 0 and 127</font></td><td>select an instrument, with a value between 0 and 127</td></tr>
 <!--COMMENTS:pygame.midi.Output--> &nbsp;<br> 
 
 
+<a name="Output.abort">
+<big><b>Output.abort</big></b><br><ul>
+  <i> terminates outgoing messages immediately</i><br>
+  <tt>Output.abort(): return None</tt><br>
+<p>The caller should immediately close the output port; this call may result in transmission of a partial midi message. There is no abort for Midi input because the user can simply ignore messages in the buffer and close an input device at any time. </p>
+<!--COMMENTS:Output.abort--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="Output.close">
+<big><b>Output.close</big></b><br><ul>
+  <i> closes a midi stream, flushing any pending buffers.</i><br>
+  <tt>Output.close(): return None</tt><br>
+<p>PortMidi attempts to close open streams when the application exits -- this is particularly difficult under Windows. </p>
+<!--COMMENTS:Output.close--> &nbsp;<br> 
+<br></ul>
+
+
 <a name="Output.note_off">
 <big><b>Output.note_off</big></b><br><ul>
   <i>turns a midi note off.  Note must be on.</i><br>

docs/ref/surface.html

 <p>Return the <tt>RGBA</tt> color value at the given pixel. If the Surface has no per pixel alpha, then the alpha value will always be 255 (opaque). If the pixel position is outside the area of the Surface an IndexError exception will be raised. </p>
 <p>Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. </p>
 <p>This function will temporarily lock and unlock the Surface as needed. </p>
+<p>Returning a Color instead of tuple, New in pygame <tt>1.9.0</tt>. Use <tt>tuple(surf.get_at((x,y)))</tt> if you want a tuple, and not a Color. This should only matter if you want to use the color as a key in a dict. </p>
 <!--COMMENTS:Surface.get_at--> &nbsp;<br> 
 <br></ul>
 
   <i>get the color index palette for an 8bit Surface</i><br>
   <tt>Surface.get_palette(): return [RGB, RGB, RGB, ...]</tt><br>
 <p>Return a list of up to 256 color elements that represent the indexed colors used in an 8bit Surface. The returned list is a copy of the palette, and changes will have no effect on the Surface. </p>
+<p>Returning a list of Color instances instead of tuples, New in pygame <tt>1.9.0</tt> </p>
 <!--COMMENTS:Surface.get_palette--> &nbsp;<br> 
 <br></ul>
 
   <i>get the color for a single entry in a palette</i><br>
   <tt>Surface.get_palette_at(index): return RGB</tt><br>
 <p>Returns the red, green, and blue color values for a single index in a Surface palette. The index should be a value from 0 to 255. </p>
+<p>Returning Color instance instead of a tuple, New in pygame <tt>1.9.0</tt> </p>
 <!--COMMENTS:Surface.get_palette_at--> &nbsp;<br> 
 <br></ul>
 
 portmidi supports (currently windows, OSX, and linux).
 
 This uses pyportmidi for now, but may use its own bindings at some
-point in the future.
+point in the future.  The pyportmidi bindings are included with pygame.
 
 New in pygame 1.9.0.
 
 
 
 
+close
+ closes a midi stream, flushing any pending buffers.
+Input.close(): return None
+
+PortMidi attempts to close open streams when the application
+exits -- this is particularly difficult under Windows.
+<END>
+
+
+
 poll
 returns true if there's data, or false if not.
 Input.poll(): return Bool
 
 
 
+abort
+ terminates outgoing messages immediately
+Output.abort(): return None
+
+The caller should immediately close the output port;
+this call may result in transmission of a partial midi message.
+There is no abort for Midi input because the user can simply
+ignore messages in the buffer and close an input device at
+any time.
+<END>
+
+
+
+close
+ closes a midi stream, flushing any pending buffers.
+Output.close(): return None
+
+PortMidi attempts to close open streams when the application
+exits -- this is particularly difficult under Windows.
+<END>
+
+
+
 note_off
 turns a midi note off.  Note must be on.
 Output.note_off(note, velocity=None, channel = 0)
         self._output = None
 
     def abort(self):
-        """ terminates outgoing messages immediately
+        """terminates outgoing messages immediately
         Output.abort(): return None
 
         The caller should immediately close the output port;
 
 #define DOC_PYGAMEMIDIINPUT "Input(device_id)\nInput(device_id, buffer_size)\nInput is used to get midi input from midi devices."
 
+#define DOC_INPUTCLOSE "Input.close(): return None\n closes a midi stream, flushing any pending buffers."
+
 #define DOC_INPUTPOLL "Input.poll(): return Bool\nreturns true if there's data, or false if not."
 
 #define DOC_INPUTREAD "Input.read(num_events): return midi_event_list\nreads num_events midi events from the buffer."
 
 #define DOC_PYGAMEMIDIOUTPUT "Output(device_id)\nOutput(device_id, latency = 0)\nOutput(device_id, buffer_size = 4096)\nOutput(device_id, latency, buffer_size)\nOutput is used to send midi to an output device"
 
+#define DOC_OUTPUTABORT "Output.abort(): return None\n terminates outgoing messages immediately"
+
+#define DOC_OUTPUTCLOSE "Output.close(): return None\n closes a midi stream, flushing any pending buffers."
+
 #define DOC_OUTPUTNOTEOFF "Output.note_off(note, velocity=None, channel = 0)\nturns a midi note off.  Note must be on."
 
 #define DOC_OUTPUTNOTEON "Output.note_on(note, velocity=None, channel = 0)\nturns a midi note on.  Note must be off."
 
 
 
+Input.close
+ Input.close(): return None
+ closes a midi stream, flushing any pending buffers.
+
+
+
 Input.poll
  Input.poll(): return Bool
 returns true if there's data, or false if not.
 
 
 
+Output.abort
+ Output.abort(): return None
+ terminates outgoing messages immediately
+
+
+
+Output.close
+ Output.close(): return None
+ closes a midi stream, flushing any pending buffers.
+
+
+
 Output.note_off
  Output.note_off(note, velocity=None, channel = 0)
 turns a midi note off.  Note must be on.