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

MPE output gets mangled #1916

Open
spDuchamp opened this issue Oct 24, 2024 · 3 comments
Open

MPE output gets mangled #1916

spDuchamp opened this issue Oct 24, 2024 · 3 comments

Comments

@spDuchamp
Copy link

If you wire raw [midiin] to raw [midiout] and stream MPE data through, it will work in Puredata, but the MPE output is mangled when attempting this with Plugdata. demo: https://www.youtube.com/watch?v=E-ccaMuc68k

The MidiDeviceManager uses sendMessageNow, but I think that sendBlockOfMessagesNow might be required to handle MPE data.

@timothyschoen
Copy link
Collaborator

I'm now using sendBlockOfMessagesNow, along with a few other fixes that I think might help.

Could you try out this build when it's done compiling?

https://github.com/plugdata-team/plugdata/actions/runs/11639118413

@spDuchamp
Copy link
Author

I had a little trouble testing that version. When I go into Settings->MIDI and try to enable the "from plugdata" output, that setting doesn't seem to work, and is disabled when I reopen those settings. That output is what I'm able to monitor using the ShowMIDI tool. (https://github.com/gbevin/ShowMIDI)

So for these tests I used MidiView (https://hautetechnique.com/midi/midiview/) and was able to specify MidiView as an output, and it appears that data is being dropped. Here is a screenshot from MidiView, and you can see white log lines from the iPad (MusiKraken doing a one note bend), and you can see grey lines that are being sent from Plugdata direct into MidiView.

Screenshot 2024-11-05 at 3 22 13 PM

Pitch wheel and Channel pressure come through, but are detached from notes. This is pretty consistent with the problems I've been seeing.

To compare, here is the MidiView log with the same pass through [midiin] wired to [midiout] patch running in vanilla Pd.

Screenshot 2024-11-05 at 3 35 52 PM

@spDuchamp
Copy link
Author

I've been looking around trying to find an example of JUCE code doing MPE output and not finding a lot.

Here is one example I can find on sending MPE output. https://github.com/gbevin/SendMIDI/blob/master/Source/MpeTestScenario.cpp
and in that example data is sent ultimately using sendMessageNow.

I may have lead you in the wrong direction with that sendBlockOfMessagesNow suggestion.

I'm just really not sure what exactly Geert's code is doing that makes the MPE work.

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

No branches or pull requests

2 participants