Need help with scripting in a rackspace with Midi Divisi

I need some help with a rackspace. I hope what I want to do can be done with some scripting. I’ll start by uploading a picture of the rackspace.

  • The lower part of my keyboard are used for layered grand and strings.
  • The upper part is used for Alto Sax, where I have used Midi Divisi to be able to use more than one note for the sax.

My problem is:

  • The sax articulations are not exposed to GP, they have to be changed via pressing keys. As it is now, these keys are in the area of the keyboard which is set up to play grand/strings. Maybe the placement can be changed, but that will not help with my real problem.
  • The problem is the plugin starting out with the sax breathing sound as the standard articulation, not legato which I want to use. As it is now, after loading the gig file, I have to enter this rackspace, open each of the Alto Sax instances and press the key on the plugin display that changes the articulation to legato.

I want this to be handeled automatically when the rackspace is activated.

I have thought of using the rackspace script, but don’t know if this script can send a message directly to a plugin?

I have also thought about enhancing the Midi Divisi scriptlet, adding an event at the top of it sending the necessary message directly to the different midi channels using a For loop. But; How do I then avoid that this interfers with the rest of the script. Also; Can I use the “on activate” callback in a scriptlet?

Lots of questions.

Hoping for some answers :slight_smile:

I’m assuming you mean your desired articulation is set with key switches when you say “by pressing keys”

Just off the top of my cranium, a script-free solution might be to just record the key switches you need into a MIDI file and use a MIDI player instance to just shoot that into the VST when you activate the rackspace.

If you don’t mind mallet sizes you could also add an instance of a MIDI sequencer like maybe Stochas, that would make it easy to change the keyswitch notes you need, and the performance hit would be as close to 0 as a MIDI-only instance can get. There’s probably all kinds of other MIDI outputting VSTs you could use as well.

Bit of a Fred Flintstone grade bigger mallet and not pretty or elegant but fast and easy and reliable and probably your audience won’t be looking at your wiring view?

You could try it real quick at least.

Key switches is the right terminology.

Thx for the ideas! I will need to shoot it directly into 5 VSTs though, and would have to go directly to them, otherwise the notes will end up in the grand/strings region of the keyboard :slight_smile:

Non-issue for you I’d say from your wiring view. Just route/remap the MIDI from your magic keyswitch MIDI source just the way you already have. Walk in the park through a piece of cake as an old friend of mine used to say. Now, I’m not talking about scripting, which you could also do, and I’m about ready to bet somebody pops a little scriptlet in here that will shoot your keyswitches as needed.

Not so sure. That scriptlet distributes the notes to different midi channels as you use more and more notes simultanously, so a note will not pass through to all instances unless you can play the same note 5 times simultanously.

That would all come under the heading of what I mentioned. I suspect a separate scriptlet that has only one job to fire your keyswitches correctly on rack activation is probably the most elegant solution. But you can also climb in with Fred and Barney and me if you want. :upside_down_face:

1 Like

I’ll think about it :slight_smile:

Found out how to fix this, so I thought it would be the right thing to come back and tell.

I started out with an extra scriptlet sending a NoteOn then a NoteOff for the key I wanted pressed to all 5 instances of my plugin when the rackspace was activated, like this;

on activate
SendNow(MakeNoteMessageEx(C1,50,1))
SendNow(MakeNoteMessageEx(C1,0,1)
end

This did work in a way, but the keystrokes didn’t seem to reach all the 5 instances of my plugin. It might do the job for 3 or 4 of them.

I then moved my code lines to the end of the scriptlet already there doing the Midi Divisi. I changed the code, so the code was executed 5 times, one for each midi channel. (The MIDI channel constrainers taking care of what MIDI channel comes through to each instance). The code now looked like this;

on activate
SendNow(MakeNoteMessageEx(C1,50,1))
SendNow(MakeNoteMessageEx(C1,0,1))
SendNow(MakeNoteMessageEx(C1,50,2))
SendNow(MakeNoteMessageEx(C1,0,2))
SendNow(MakeNoteMessageEx(C1,50,3))
SendNow(MakeNoteMessageEx(C1,0,3))
SendNow(MakeNoteMessageEx(C1,50,4))
SendNow(MakeNoteMessageEx(C1,0,4))
SendNow(MakeNoteMessageEx(C1,50,5))
SendNow(MakeNoteMessageEx(C1,0,5))
end

Still didn’t work. At least one instance was left unchanged by the keystrokes.

I then started to think; Could the plugin need the key to be pressed for a little longer to see the keystroke?

I found the SendLater function, and changed my code to this;

on activate
SendNow(MakeNoteMessageEx(C1,50,1))
SendLater(MakeNoteMessageEx(C1,0,1), 3000)
SendNow(MakeNoteMessageEx(C1,50,2))
SendLater(MakeNoteMessageEx(C1,0,2), 3000)
SendNow(MakeNoteMessageEx(C1,50,3))
SendLater(MakeNoteMessageEx(C1,0,3), 3000)
SendNow(MakeNoteMessageEx(C1,50,4))
SendLater(MakeNoteMessageEx(C1,0,4), 3000)
SendNow(MakeNoteMessageEx(C1,50,5))
SendLater(MakeNoteMessageEx(C1,0,5), 3000)
end

And; Voila! It worked :slight_smile:

1 Like