-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
synthio: Add Synthesizer.note_state #8186
Conversation
This enables the specific use case of checking whether a note's release phase has ended, but is also potentially useful to implement a sort of "voice stealing" algorithm in Python code, which can take account of the note's envelope state as well as other factors specific to the program.
... by the disassembly just below This was tripped up because in exactly the right conditions some qstr could be of the form 'xx 63' and make the expression `\.\+63` match something other than what was intended. This test was re-worked upstream for mpy version 6 so it'll be a conflict to resolve when we get to that. :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you for the size fix too.
This addition is really neat! Both items returned in Am I correct that:
A few things I noticed:
|
The Each Bulk printing of data can cause glitches, because during USB CDC console writes the background tasks can't run. (and with a displayio display it's even worse because the whole time a display is being background-updated, the audiobackground task is also blocked) However, I don't know why this would lead to a hardfault. If you have a hardfault please try to minimize the test case and file an issue. |
This enables the specific use case of checking whether a note's release phase has ended, but is also potentially useful to implement a sort of "voice stealing" algorithm in Python code, which can take account of the note's envelope state as well as other factors specific to the program.
@todbot your comment on this would be appreciated