Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

midi.py, music.md, ..: Add midi.config.get_synth(), rename polyphony #382

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

dpwe
Copy link
Collaborator

@dpwe dpwe commented Sep 12, 2024

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.add_synth() gains defaults for all args, and polyphony becomes num_voices for consistency with lower levels.

Use of synth.program_change() is replaced by patch_number=X in the Synth constructor.

Python style guide spaces around args.

@bwhitman bwhitman merged commit 89fc29f into main Sep 12, 2024
1 check passed
@bwhitman bwhitman deleted the dont_touch_my_synths branch September 12, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants