A class implementing a MIDI input.
EXPERIMENTAL!
Due to a bug in Pygame’s midi module, closing a MidiIn (or the programme) will cause an error message. Until this is fixed in Pygame, MidiIn will stay in extras.
Methods
Create a MIDI input.
Parameters : | device : int or str
buffer_size : int, optional
|
---|
Getter for buffer_size.
Clear the input buffer.
This can take more than 1 ms!
Get a list of all MIDI input devices connected to the system.
Getter for id.
Read MIDI events from device.
Parameters : | num_events : int, optional
|
---|---|
Returns : | out : timestpamed
|
Wait for (a) certain event(s).
Events to wait for are in the form of a list with 4 elements and do not include a timestamp: [status, data1, data2, data3]
Parameters : | events : int or list
duration : int, optional
|
---|---|
Returns : | evt : int
rt : int
|