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.
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?
@pianopaul
Exactly.
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
@djogon Yes, but no.
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.
@djogon That’s precisely what I am attempting, but I am no programmer and it doesn’t help having an incomplete manual.
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)
@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.