Multichannel MIDI FX - Is it possible in HISE?
-
Apologies for the ignorance in advance, I am quite inexperienced when it comes to the Message API (and scripting for MIDI in HISE/JUCE generally). I am sort of asking myself if this is even possible to do with HISE:
Lets say for example I create a MIDI FX with three tracks, each with its own sequencer. I want to be able to load the plugin in FL Studio specifically in this example. I then want to assign the sequencers to specific Channels in the FL Studio environment.
I found an example of someone using the Gbloink plugin to do this exact process:
https://www.youtube.com/watch?v=PG3UhG_PWT8Looking through the Message AP (
Message.setChannel()
andMessage.sendToMidiOut()
), is it just a matter of scripting a certain group of MIDI notes and assigning them to a specific MIDI channel?So perhaps some HISE pseudo code would look like this:
if (note >= 36 && note <= 48) { Message.setChannel(3); } else if (note >= 49 && note <= 60) { Message.setChannel(4); } else { Message.setChannel(5); } // Send the message to the DAW's MIDI output? Message.sendToMidiOut();
As a side note it looks like in FL Studio you need to use the plugin wrapper which allows you to assign plugin (audio/midi) channels to FL Tracks. I imagine this operation is going to get quite hairy when making this plugin cross-DAW compatible.
-
@HISEnberg Yes, that should work for using multiple MIDI channels. You can check the MIDI event list viewer to monitor the MIDI messages and you should see the channels assigned to each message there.
-
@VirtualVirgin Oh thank you so much for replying, I thought this was a lost cause! By any chance do you have an example/template to work from? If not no worries it would just save me a few brain cells
-
@HISEnberg I have a MIDI channel matrix router that I made a few months ago:
With it you can route any of 16 channel inputs to any of the 16 channel outputs.
Unfortunately when I opened it today I get an error that I am now trying to fix with David's help.
Otherwise, it was working when I last tested it.Hopefully I can get it running again, and if you are interested I could send you a version of it (cleaned up - there is some junk code in there at the moment).
Or, if you describe your use case context I could possibly tailor something for you. -
@VirtualVirgin That would be awesome. It looks like it would serve a very similar purpose. I want to create a MIDI drum rack and route the MIDI outputs to individual tracks in the DAW. If in a couple days you are still struggling with this I would be happy to contribute (currently working on something else), so just keep me updated and thanks for your input!