Package midi :: Package sequencer_portmidi :: Class Sequencer
[hide private]
[frames] | no frames]

Class Sequencer

source code

object --+
         |
        Sequencer

Midi sequencer that sends midi events to system midi devices using PyGame's interface to Portmidi.

Instance Methods [hide private]
 
__init__(self, output_device=None, latency=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
write(self, events, time_offset=0)
Plays a list of events through the output device.
source code
 
queue_event(self, midi_event, time) source code
 
play_stream(self, stream)
Sends the whole of an EventStream to the sequencer output.
source code
 
stop(self) source code
 
play(self, latency=0) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
get_devices(inputs=True, outputs=True)
Queries available devices.
source code
Properties [hide private]
  playing

Inherited from object: __class__

Method Details [hide private]

__init__(self, output_device=None, latency=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • output_device (int) - Portmidi device number to use for output. Will use the reported default if not given.
  • latency (int) - latency value to use PortMidi output with. 0 is not permitted, as it prevents us doing timestamped events.
Overrides: object.__init__

get_devices(inputs=True, outputs=True)
Static Method

source code 

Queries available devices. Returns list of pairs (index,device_info). index is the device number by which it can be accessed. device_info is a tuple in the same format as pygame.midi.get_device_info(): (interf, name, input, output, opened)

write(self, events, time_offset=0)

source code 

Plays a list of events through the output device. Delta times between the events are preserved, but the first event is played immediately, or after the given offset (in miliseconds)


Property Details [hide private]

playing

Get Method:
unreachable.playing(self)