Closed dpwe closed 3 weeks ago
This adds a couple of cleanups to the music.md tutorial, with associated code changes.
midi.config.get_synth() replaces direct access of midi.config.synth_per_channel which was seemingly endorsing direct access of internal data.
midi.config.get_synth()
midi.config.synth_per_channel
midi.config.add_synth() gains defaults for all args, and polyphony becomes num_voices for consistency with lower levels.
midi.config.add_synth()
num_voices
Use of synth.program_change() is replaced by patch_number=X in the Synth constructor.
synth.program_change()
patch_number=X
Synth
Python style guide spaces around args.
https://media2.giphy.com/media/R9wlZIvzUrtrdFYhZV/200w.gif?cid=6c09b9525fip3nkrf3pt8kgeum8aewd8sd8xel4q480zbeqd&ep=v1_gifs_search&rid=200w.gif&ct=g
This adds a couple of cleanups to the music.md tutorial, with associated code changes.
midi.config.get_synth()
replaces direct access ofmidi.config.synth_per_channel
which was seemingly endorsing direct access of internal data.midi.config.add_synth()
gains defaults for all args, and polyphony becomesnum_voices
for consistency with lower levels.Use of
synth.program_change()
is replaced bypatch_number=X
in theSynth
constructor.Python style guide spaces around args.