Howdy all. After working through some tutorials, I’m giving my first project a shot. My JUCE (and C++) knowledge is pretty limited though, so please forgive any blatant misunderstandings on my part. (There are probably many.)
To create a plugin that remaps midi data received from a controller to MPE data.
The input midi data is really just arbitrary controller information (the key I’m hitting on this device: http://www.c-thru-music.com/cgi/?page=spec_49-selfless), which I use to determine the pitch of the note I actually want to be sounded. I need to use MPE because the output will be microtonal.
(I’m actually doing a little more than that: depending on some user selections, the midi will either be converted to MPE midi, or to a DynamicTonality specific scheme for mapping midi notes and channels to “period and generator coordinates”. http://dynamictonality.com/about.htm But that’s relatively straightforward. It’s the MPE part I’m not sure about.)
What I’ve done so far:
I’ve followed along with this video from the Audio Programmer on YouTube with Eyal Amir:
And it seems like a good template for what I’m trying to do. I’ve also walked myself through the 2 MPE tutorials here:
Those tutorials seem focussed on receiving MPE data that has already been generated (by a hardware device) though, and that’s where I’m realizing I don’t have a clue what to do.
In the Midi Effect video, the midi buffer is passed by reference into a process method. Each midi message in the buffer is iterated over, being modified somehow, passed into a new buffer, and then the original buffer is replaced by the new one.
But if I want to use MPE for the output… I assume need to create an MPEInstrument to keep track of all the MPE things, like currently used channels, right? If so, is the above method (Input midi buffer --> iterate --> replace) still viable? Am I able to just give the MPEInstrument the information about the notes I want to play, and ask it for the appropriate midiMessage to be put into the new buffer? If so, how would I go about doing that? It doesn’t look like the MPEInstrument class has functions for something like “addNoteAndReturnCorrespondingMidiMessage” and, given that that’s the case, I’m guessing I’m fundamentally misunderstanding how the class might be used in this situation, or whether it should be used at all.
Thanks for any help here. At least to show I value people’s time and expertise, I’d be happy to tip a couple dollars worth of Bitcoin Cash (BCH) to whoever can help me sort this out.