CC7 before SysEx

Here a situation where I need some help:

I’ve put my S90ES on local off and send all midi through GigPerformer > S90ES midi out block. I’d like to control the volume through a slider widget connect to CC7.
This works fine, except when I switch a sound through Sysex in setlist mode.
It seems the CC7 message widget comes BEFORE the SysEx Sound switch message, therefor doesn’t receive the CC7 message on the correct sound. (I hope I explain this right).

When I switch a sound on my S90ES (through SysEx) from song part INTRO:

To VERSE:

This happens also with xC0 PC messages in the advanced extra midi message to send out.
Is there a way to “delay” the widget midi messages?

Hope you can help!

Can you upload a small gig so I could check the issue and timing?

Here you go!

CC7 test.gig (11.2 KB)

Found a workaround, but this is a total hack !

CC7 test.gig (12.0 KB)

The trick is to use 2 variations and in each song part use a different variation.
This way the callback on Variation() is triggered.
In scripting the cc7 is sent out 100ms delayed.

var cc : ControlChangeMessage
    SVOL : Widget
    MVOL : MidiInBlock
    
on Variation (old : integer, new : integer)
 cc = MakeControlChangeMessage(7, ParamToMidi(GetWidgetValue(SVOL)))
 SendLater(MVOL, cc, 100)
end 


on Activate 
 cc = MakeControlChangeMessage(7, ParamToMidi(GetWidgetValue(SVOL)))
 SendLater(MVOL, cc, 100)
end

And in the back view you have to include a placeholder MIDI In Plugin

1 Like

Thanx, it works. But the scripting is way over my head :slight_smile:
Is there a chance that this will be fixed in an upcoming update?

How do I copy this script on another laptop in a different gig file?
And I have to do this for my Motif XS as well. I’ve tried to copy the code and made a similar midi in block for the xs7, but it doesn’t work :frowning:

Open the script editor via the Menu

Each rackspace can have its own script.

Just copy the code, open the rackspace in another gig and paste the code.
But you have to make sure that the referenced objects like Widgets and Midi In Block have the correct script handle assigned.

And here is a link to the scripting documenation (a good entry point)
https://gigperformer.com/docs/GPScript36/

1 Like

Is it possible to make 2 scripts to 1 rack panel (1 script for S90, 1 script for XS7)?

Sorry, I did not get it

1 rackspace has 1 script
In scripting you decide what to do.
In a rackspace you are using MIDI Out Plugins, scripting just uses this logica name you give as a handle.
In the Song Part properties you decide what to send out to the MIDI Out Block (scripting is not involved).
The script I made (with the trick to switch variaions - because of the call back On Variation) only sends out CC7 delayed.

So why use 2 scripts?

I’ve entered this issue into our tracking system

4 Likes

Just to check: is this issue solved in the recent update 3.8.1?

Just tested, CC7 is sent before SysEx

Not yet – and it is not something that can be trivially “fixed” — there are reasons for why the ordering could be either way. For example, what happens if you have a widget that sends out a program change and you put a CC7 message in the “Extra MIDI messages” section. Now you need the widget to be triggered before those other MIDI messages to go out — the exact reverse situation.

1 Like

I see. So the only common ground both situations have, is that CC7 should always be sent last.

How does gig performer behave If you have 2 widgets sending information on patch change: 1 PC, 1 CC7. Which one is send first?

Is there a way to give every widget an option: send delayed?

Scripting is your friend

1 Like

Your script above is still my friend :slight_smile:

Not necessarily — you might want to lower the volume of the current patch before you switch to another one. Or you might want to send a CC64 OFF message.

As things get more complex, GP Script is available for much finer control - it’s pretty much impossible to cover every possibility through the UI.

The notion of prioritizing widgets (i.e, controlling the order in which they get sent) is on our list for a future version