Package midi :: Package sequencer_pygame
[hide private]
[frames] | no frames]

Package sequencer_pygame

source code

Interface to the PyGame mixer module, which is able to play fully formed midi files using Timidity. We play midi streams simply by outputing to a temporary midi file and playing that.

The alternative approach explored in sequencer_portmidi is much nicer in principle, but doesn't work.


Notes:
Classes [hide private]
  Sequencer
Midi sequencer that outputs midi to a temporary file and plays it using PyGame's interface to the SDL mixer.
  MusicEndWaiter
Sets an endevent on the PyGame mixer so that it gets notified when the music comes to an end.
  RealtimeSequencer
Sends realtime midi events to midi devices through Pygame.
Functions [hide private]
 
on_music_end(callback, event=None) source code
 
get_midi_devices()
Returns a list of tuples with information about available midi devices, as returned by PyGame's get_device_info() function.
source code
Variables [hide private]
  __package__ = 'midi.sequencer_pygame'
Function Details [hide private]

get_midi_devices()

source code 

Returns a list of tuples with information about available midi devices, as returned by PyGame's get_device_info() function.

The list indices correspond to pygame's device ids.