Contents . 2. Midithing Objects |
Next 2.1.1. IO.Clock |
returns a new IO object which is a list of Port objects and can be used for output with a song.
The IO object basically is a list that you should fill with your system's MIDI Ports. It provides a multiplexer that is used by the Song objects to deliver their Events to the appropriate ports.
In addition, the sync and clock subobjects expose the functionality needed to play back and record MIDI data with accurate timing.
See also IO.Clock Port IO.Sync
adds a Port to the list of Ports and returns the index at which it was inserted.
clear()removes all Ports from the IO object.
index (port)returns the index of Port or raises an error.
remove (port)removes a Port from the list of Ports.
write (event)writes an Event to the port that is specified by the Event.
Type: Clock
Type: function
If you want to record MIDI data, set this to your input function. The function will be called with the Event that the IO object received. If a Song is currently played by the IO's sync, the Event's tick attribute will reflect the current time.
sync
Type: Sync
midithing 0.3.22 documentation | © Tim Goetze | Nov. 06 2001 |