Scripting Momentary inputs to Plugins

We are generally familiar with the concept of momentary switches, vs switches that have state and send their state over MIDI. Gig Performer supports this well with Widgets. Using GPScript, we can get the MIDI messages from the various controls and handle things as best we can.

But what about plugins that design their Parameters and MIDI responses based on what they expect from hardware? If we use Gig Performer to connect Pedal A to a Parameter in Plugin B, things work as the plugin designer intended. But what about when we want to use GPScript to control that Plugin?

Today, we can send a Note On event at some point in time, followed by a Note Off event at some later point in time. This emulates a person playing a key. Unless I’m mistaken, we don’t have a similar function for emulating a temporary button (CC) press.

Note that if we send a value of 1.0, immediately followed by a value of 0.0, these plugins are unlikely to respond, since they’ve likely included a de-bounce feature for handling noisy physical inputs.

Here’s a simple example with MSuperLooper. It has a Reset All function. Ideally, I would send 1.0, it would do its reset and return 0.0 when completed. Nah. It expects that you pressed a physical pedal, then took your foot off the pedal, sending the 0.0 yourself. So the parameter and Widget stay stuck On. Send 1.0 a bit later to the Plugin and it doesn’t do the reset. It’s internal state is already at 1.0, so there’s no change to respond to. It’s still waiting for you to release the “pedal” from the first time you pressed it.

One workaround might be for me to send some random MIDI Note On message from my script, with a following Note Off message. I could have a pair of radio buttons respond to Note On and Off, and one would be tied to the Plugin parameter. It’s a kludge, but it should work.

Any other solutions with the current feature set?

A feature that allows CC values to be sent later would do the trick, but that feature doesn’t appear to exist today. I could set a timer and get a callback, but I don’t see that either. I’m not running the play head, but there might be something there.

Any suggestions for immediate workarounds are appreciated!

Perfect! I had searched the callbacks for “timer” and somehow missed that.

I will be using this feature for a number of things. :+1::+1::+1:

BTW, regarding looping, there’s always the challenge of starting and ending the loop at exactly the right moment.

Gig Performer to the rescue…

Using a Zendrum, I have a beat that starts with a specific crash cymbal. At the end of the groove, I hit a different crash cymbal. Using GPScript for this Song, I start and end the main loop on these MIDI notes. While it’s up to me to hold a steady tempo and create a compelling groove in the middle of the loop, the loop points align perfectly EVERY SINGLE TIME.

In general, one can script the loop to start on any MIDI note, and to end on any other MIDI note, or after the Nth instance of a note, depending on the song.

I’m using Song Parts/Variations to sequence the various states. In a given variation, it can configure whatever track/loop/playback situation I want. I could noodle or banter, if I feel like taking my time. As soon as I play the “magic note” or sequence of notes, Gig Performer jumps to the next Song Part, where I can record the next loop, play the next sound, or whatever. Or I can press the Soft Pedal (or whatever) to go to the next Song Part, as needed.

Overall, I can hide the details of the looper, and set a general sequence for a song. At the same time, I can jam freely with a given sound, and transition to the next part when it feels right. The balance of freedom and control is just right.

Getting the loop point right every time, based on MIDI notes. Makes it perfectly seamless.

1 Like