MidiIn/OutBlock

Maybe I’m just misunderstanding something basic. I always found it confusing with MIDI as to what is in and what is out (because the in on one end is the out on the other and vice versa). So… in GP devices that issue midi messages are MidiIn. Makes sense. Midi input comes from them and likewise, devices that receive are MidiOut as they receive output.

Ok, no probs, why am I writing this.

In GPScript you send messages to MidiInBlock. This makes no sense to me and seems to contradict the above convention.
Then when I want to send a midi message to a device, I have to send it to a MidiInBlock. If I attach that to a device that has a midi input (a MidiOut device) then GPScript (understandably) complains that “MIDI Out is not a MidiIn Block”. And if I send it so a MidiIn device then it doesn’t seem to work (unsurprisingly since the device has no midi input).
Am I doing or misunderstanding something very basic?

This should be simple enough. The device/software/anything that you are currently looking at is your reference point. If you are working in GP - anything coming INTO GP is an IN and anything going OUT of GP is an OUT

Scripting can add/send things to a MIDI Input block for further processing by plugins connected to that block.

If you are doing this for a hardware device that’s connected to your system - use the MIDI OUT block unless you want to do some plugin processing beforehand. Then use SendNowExternal… and other “External” variants to send stuff out through a MIDI Out block.

SendNowExternal(out, m)

You could send it to a MIDI In block, then connect the midi in block to a midi out block to go out, but in that case, you could be doing some internal GP processing so you are really not sending things out as far as your script is concerned.

Gotcha. Thx

Yes, that’s the key point — if you want to inject extra MIDI messages into a plugin (for example, a script that supports transpose), the only way you can do it is by injecting them into the MIDI In Block that’s connected to the plugin.

1 Like

Ok, got it, too.

But it would be nice to program MIDI filtering on the input of any plugin. See also my comment here:

https://community.gigperformer.com/t/some-ideas-on-midi-in/3647/21?u=angel

MIDI Filtering, you know the MIDI Filter Plugin?


You can filter out Midi Events like Pitch Bend, Aftertouch, NoteOn etc.

Yes, I’d like more of this … such a MIDI processor block with GUI for many split zones, layers, channel remapping and so on.

However, I realize how to make most, if not all, MIDI routings I require with adding many MIDI-in blocks with different settings, per plug-in, and with some programming within the plugins. And if all fails there is GPScript :slight_smile:

Using several MIDI in blocks will do the job, but you are right, for difficult situations we have GPScript :hammer_and_wrench: :nerd_face: