Contents . 2. Midithing Objects |
Previous 2.1. IO |
Next 2.3. Song |
opens a MIDI port that is represented by the specified file. The file is opened read/write if the mode is omitted. It can subsequently be used by an IO object.
ALSAPort ('ALSA port name')opens a connection to an ALSA MIDI port and returns a Port object. The read/write mode is determined automatically. Alternatively, you can call ALSAPort (client, port) where client and port are the numerical address instead of the name as printed by aconnect(1).
ALSAPort ()ALSAPort (client, port)
RawALSAPort (card = 0, port = 0)
Opens an ALSA MIDI port in raw midi mode and returns a Port object.
OSSPort (port = 0)Opens an OSS MIDI port and returns a Port object.
ASCIIPort ('/path/to/file')opens a port using the file you pass it. This Port writes only Text Meta events. The file is opened write-only, in append mode. Other than this, the ASCIIPort can be used like any other Port.
See also IO MIDI Events Text
resets the port state: silences all notes on this port and pulls pitch back to 0.0.
state()returns a list of 16 dictionaries describing for each channel: the current pitchbend value, which (and how many) notes are sounding, the last controller values and the last NoteTouch values.
write (event)write an Event to this port.
Type: string
Default: 'rw'
midithing 0.3.22 documentation | © Tim Goetze | Nov. 06 2001 |