Open spDuchamp opened 1 month ago
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
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.
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.
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.
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.