Closed mfncooper closed 1 year ago
The first line of the documentation for each of the open_midiinput, open_midioutput, and open_midiport functions states:
open_midiinput
open_midioutput
open_midiport
Open MIDI port for input or output and return MidiIn/MidiOut instance.
(or an appropriate variation of the above). This is incorrect, or at least incorrect and misleading.
The Returns clause for open_midiport correctly states that it returns:
A two-element tuple of a new MidiIn or MidiOut instance and the name of the MIDI port which was opened.
This Returns clause is not present for open_midiinput or open_midioutput.
Someone trying to use the simpler open_midiinput or open_midioutput functions is going to be confused as to why this code:
midiout = open_midioutput(0) midiout.send_message(msg)
gives them the following error:
AttributeError: 'tuple' object has no attribute 'send_message'
The documentation for all three of the open_midi* functions should be updated to state that they return a tuple, not just the MidiIn/MidiOut instance.
open_midi*
MidiIn
MidiOut
The first line of the documentation for each of the
open_midiinput
,open_midioutput
, andopen_midiport
functions states:(or an appropriate variation of the above). This is incorrect, or at least incorrect and misleading.
The Returns clause for
open_midiport
correctly states that it returns:This Returns clause is not present for
open_midiinput
oropen_midioutput
.Someone trying to use the simpler
open_midiinput
oropen_midioutput
functions is going to be confused as to why this code:gives them the following error:
The documentation for all three of the
open_midi*
functions should be updated to state that they return a tuple, not just theMidiIn
/MidiOut
instance.