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

add support for MIDI Note Off messages #2124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

porres
Copy link
Contributor

@porres porres commented Nov 3, 2023

closes #2119

as in the above discussion, the strategy was to add a '-off' flag to force the [notein] and [noteout] objects to only receive and output Note Off messages

@porres
Copy link
Contributor Author

porres commented Nov 3, 2023

Ok, I knew I had to also update some libpd stuff, but didn't want to do it right away and test things first. I was able to compile and test, and now I see the libpd test is failng :)

I'm not comforable in messing with the libpd functions but I can try

I was gonna ask @danomatika to give me some warnings and guidance anyway

@danomatika
Copy link
Contributor

libpd relies on the outmode_noteon and inmidi_noteon functions, so changing their function arguments breaks libpd's current usage.

It essentially

  • implements outmidi_noteon here
  • allows setting a custom noteon "hook" aka user-provided function which is passed messages from libpd's outmidi_noteon
  • the libpd_noteon function passes messages into pd's inmidi_noteon function

All of these functions rely on the current number and type of arguments, hence the build errors.


Without reading in detail, do I assume the MPE protocol requires making a distinction between noteon vel 0 and noteoff? If so, and built-in support is required, then I would recommend an internal noteoff message and move the type filtering logic into the [noteon] and/or add a [noteoff] object.

@danomatika
Copy link
Contributor

danomatika commented Nov 3, 2023

Also, libpd_noteonhook and libpd_noteon have not changed since the project was originally released, circa 2010. Changing them now involves lots of pain to both projects and the various language wrappers which use them. It's not impossible technically but not a likable change a specific feature addition...

@porres
Copy link
Contributor Author

porres commented Nov 3, 2023

If so, and built-in support is required, then I would recommend an internal noteoff message and move the type filtering logic into the [noteon] and/or add a [noteoff] object.

I am doing some logic in both [noteon] and [noteoff] objects, but I guess I know what you mean, adding a new internal message, right?

And with such a new message we can prevent all the pain in the ass and issues with libpd, right? Please shed me some more light, give me some hints and clues, and I'll try to head into the right direction

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.

add support for "note off" messages
2 participants