Description
A discussion has come up due to recent coding (in #3) and unintentional highlighting by sphinx-build
-isms about the defaults for the midi_in
and midi_out
named parameters for the MIDI
constructor. These two defaults have not changed (#9 does not change these values) and are present in the current library:
def __init__(self, midi_in=usb_midi.ports[0], midi_out=usb_midi.ports[1], *,
in_channel=None, out_channel=0, in_buf_size=30, debug=False):
There's also the question about wasting memory if the user is not using usb_midi
as it will always be imported. Is usb_midi
frozen in?
@sommersoft has queried what the best practice is here.
This was partly noticed because sphinx-build
has started choking on this and that error is picked up by Travis. This appears to be due to a sphinx-build
change/issue as this code has not changed since it last passed. Other code may be subject to this bug. Discussion on this: #9 (comment) and #9 (comment)
Reminder:
- fix up any example code to ensure they still work if this is changed,
- update any learn guides in conjunction with changes here, see below.
TODOs:
- Update guide: Grand Central USB MIDI Controller in CircuitPython - this is probably best done in conjuction with updates required by Remove method based API for sending MIDI messages #12