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

Support MIDI CC 64 Sustain. #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nwhitehead
Copy link

This change adds support for MIDI CC 64, sustain pedal.

This is a commonly used MIDI CC message and not too much work to support at the channel level in TinySoundFont. It requires adding a bit of state to every playing voice to remember which voices are playing because sustain is on. Every channel also gets a field to record whether sustain is on or off.

@BLumia
Copy link

BLumia commented May 4, 2024

I would just like to say thanks for this patch! After play with some MIDI files collection of my own, it works quite good and perfectly addressed the CC64 issue mentioned in #86. It would be even better if this change could be merged. Anyway, thanks again!

@nwhitehead
Copy link
Author

nwhitehead commented May 5, 2024

@BLumia Glad it works! Thanks for the test. If you have a project that uses TinySoundFont and you need the change before it's officially merged, you can point the project to the repo git@github.com:nwhitehead/TinySoundFont.git and the sustain branch, or just copy the file https://github.com/nwhitehead/TinySoundFont/blob/sustain/tsf.h

@nwhitehead nwhitehead force-pushed the sustain branch 2 times, most recently from 3304b7f to e520bdc Compare December 17, 2024 18:11
@firodj
Copy link

firodj commented Dec 18, 2024

hi @schellingb , do you have any concerns on this PR?

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.

3 participants