Three button footswitch

I’ve bought the DigiTech FS3X 3-button footswitch in the hope it will work alongside the Audiofront pedal to MIDI interface.

The first two buttons work fine and are detected as CC1 and CC2 respectively.
However the third switch is a combination of both.


Is there any way to get GP to detect this?
I suspect it would require a little scripting, but my knowledge of programming is about as much as Queen Elizabeth II and arc welding. :slight_smile:

What exact message are sent by the 3 buttons?

Button #1:
MIDI Expression BLACK CC 2 Breath Controller (coarse) 127 Channel 1
MIDI Expression BLACK CC 2 Breath Controller (coarse) 0 Channel 1

Button #2
MIDI Expression BLACK CC 2 Modulation Wheel (coarse) 127 Channel 1
MIDI Expression BLACK CC 2 Modulation Wheel (coarse) 0 Channel 1

Button #3 Switches simultaneous events of 1 & 2
The interface plugin allows change of MIDI CC and channel as per the screengrab above.

I’m pretty sure you could do a simple
#3 EQUALS 127

So Button #3 (when pressed) sends Breath Controller and Modulation Wheel with very short time in between?


Ah I see
Button 3 sends CC1 and CC2 with value = 127 when pressed with very short time in between
and it sends CC1 and CC2 with value = 0 when release ( or pressed again ? ) with very short time in between.

Now you want assign 3 widgets in Gig Performer to your 3 Buttons, right?

I have already made a test setup, and button #1 fires widget #1, button #2 fires widget #2
But button #3 is currently lighting up both widgets #1 and #2 and I need it to ONLY activate widget #3

Also, all physical switches are momentary.

Hope that makes sense.

OK, I try to make a script to handle this special case and come back to you later.

Unfortunately that device seems to be an expansion device only - it was not meant to be used standalone.

It is not a USB or standard MIDI device. It has a 1/4" stereo connector which enables it to send exactly two different messages.

Still - seems you can use the two buttons at least.

@djogon Yes, but no. :slight_smile:
I am using the Audiofront interface to read the switches.
I cannot see any reason why a script could not detect both switches down if they fall within a short space of time, and assign it to a third function.

Regardless of the device you plug this into - you only get two values out of this thing and the third one is the combination of the two.

You certainly can do that - there are several ways in fact.

For example - take advantage of “ClockTime()” function in GP Script to get the current time in miliseconds. You can then react to your MIDI messages in that script and measure the time passed between messages.

I made a small gig with a script to simulate the incoming cc messages.
But this only works right now on Mac.
The first 2 LED buttons simulate the incoming CC Messages.

The time slice is set to 1000 ms.
So when you press the 1st Led and then the 2nd within less than 1000 ms the 3rd widget should be activated.
The difficult thing is the 1st LED because it has wait 1000 ms to decide wether the 1st Button should be activated or the 3rd.

3Buttons.gig (12.3 KB)

@djogon That’s precisely what I am attempting, but I am no programmer and it doesn’t help having an incomplete manual. :frowning:

So far I have managed to get widgets to switch other widgets, but I can’t seem to be able to pull the MIDI CC data from the input plugin. (It sees the device, I just can’t read any data)

The manual is fairly complete. You can find a full scripting reference here

If there’s something missing - let us know - we’ll work on it.

Thanks @pianopaul
I changed the Omni In to my interface and wired the two switches to the LEDs, but button1 (and LED1) don’t appear to work.

@djogon There are a few large areas marked “Todo - Offer explanations for the presented types”
It’s not a criticism, and it’s a complicated thing that I am barely scratching the surface with.
@pianopaul has kindly helped me out and with a bit of tweaking I should have my problem fixed.

Are you on Mac?

No, PC.

Also, is it also necessary to have two inputs and a MIDI output?

As I said LED1 works with a trick using virtual Midi.
I will try to rewrite the script this way that no virtual midi is necessary - stay tuned.

1 Like

@pianopaul You’re a star!
Also, could you make the time delay a variable at the top as I want to try and get it as short as usably possible :slight_smile: