Translate a long press from FCB1010

Hello, I tried really hard to google a solution for this, but was not lucky at all. I just need to “learn” a widget long (2,5 sec for example) press from FCB1010 Behringer foot midi controller. I suppose that it is doable pretty easily by asigning a note on / note off command to the switch - and if the noteOff is not coming sooner than in 2,5 second, there will be different midi command. I am pretty sure someone has to deal with it, if so, please give me some directions :slight_smile:

From what I understand, it is not your controller which is able to produce a particular MIDI message when you press longer. So, in this case, you can do it with GPScript exactly as you suppose it could be done. Do you have some programming skills ?

As @David-san mentioned, long press is normally a function of the midi controller (which the FCB1010 can’t do). But this is a great example where GPScript could help you achieve this. I can’t believe I hadn’t tried this out already with my FCB1010, so thanks for the idea!

This was my attempt (which is working well for me). It toggles two separate switch widgets, depending on whether you have short or long pressed.

The length I set for the long press was 1 second, as 2.5 seemed way too long. You will need to edit the script to change the Note to the one being sent by the FCB1010 (I have used A0). You do not use the standard midi learn for the widgets - they are controlled via the script and the note you specify.

Controller Short and Long Press.gig (6.8 KB)

// Script to determine if a received Note message is a short or long press, and then 
// toggle the value of two widgets linked to either the long or short press.

   FCB1010 : MidiInBlock
   SHORT_PRESS : Widget
   LONG_PRESS : Widget
   time : Double
   press_length : Integer

   time = 0.0
   press_length = 1000 // Time in milliseconds for when a press becomes a long press.

// Change A0 to the note being sent by your midi controller.
On NoteEvent(m : NoteMessage) Matching A0 from FCB1010
    if IsNoteOn(m) Then 
        time = ClockTime () // Record the time the Note On message is received.
        // Compare the time of the Note Off message with the Note On, to determine if it is a long or short press.
        if ClockTime () - time > press_length then
            // Toggle the value of the Long Press widget
            SetWidgetValue(LONG_PRESS, 1.0 - (GetWidgetValue(LONG_PRESS)))
            // Toggle the value of the Short Press widget
            SetWidgetValue(SHORT_PRESS, 1.0 - (GetWidgetValue(SHORT_PRESS)))

Oh, you’re awesome. Let me try this one and let you know. Thank you a lot!

That is the problem… I have some programming skills, but it is not enough. I just have no programming brain at all :slight_smile:

It is working! Thank you once more, rank13!

Now the tricky part :slight_smile: Even this will help a lot, I would like to trigger built-in (or VST) tuner by that command. Is there a solution for that? I feel in my bones that there is one, but it looks like I need one more kick to do that :slight_smile:

I think it should be done by sending yet another midi message after long press trigger, then learn this one in general midi settings?

The scripts can generate a midi message, but in order for it to be registered by GP you would need to use a virtual midi port e.g. the script sends it out via the virtual port and then it’s received back into GP.

Otherwise, if you were using a tuner plugin, then it’s possible for the scripts to open and close a plugin window.

This attached gig file uses the free Melda MTuner. A long press will open/close the plugin window.

Controller Short and Long Press with Tuner.gig (8.4 KB)

1 Like

You are really helping here! Awesome! Thank you!

1 Like

@DavidStypka What chip do yu have in your FCB1010? I have the UNO chip in mine specifically for the long press such as a sustain pedal. The stock chip will not do this.

Actually, it is working right now with stock chip. In my opinion the scripting in GP allows you to do almost everything the UNO chip does on ROM basis. Because even with basic chip, FCB1010 can still send CC and notes.

Yes, but the advantage of doing it with the ROM adviced by @jpt, is probably that you can use regular GP possibilities rather than scripting.

Are you sure I will teach GP a long press, even with UNO chip? What will be the written value in global MIDI settings?

@jpt could confirm this, but I guess the controller send another CC message for a long press, such that you can probably learn it directly using the regular GP procedure.

Yes…with the Un0 chip in the FCB1010 you can choose between “Stompbox” mode on or off. In “ON” the switch acts normally…on when you press it and off when pressed again. With “Stompbox” mode turned off the switch goes into a “momentary effect”…the switch stays on as long as you keep it pressed. When released the switch is now off.


In the above MIDI Monitor screen shot the first entry is the switch held down. The second entry is when the switch is released.

I have one switch set up as a sustain pedal and it works quite well. There’s no variance as in a normal sustain pedal (such as half pedal, etc.) but one doesn’t really notice this in most pop music. My other switches do all the other chores such as Rackspace up & down, Next & Prior Songs, Next & Prior Song Parts. Then, I have 2 expression pedals which work quite nicely for volume and wah, etc.

The Un0 comes with it’s own programming software that is fairly easy to use.


That’s the same behaviour you can get with the standard FCB1010 chip if you use Notes. What @DavidStypka was needing was the one button to send 1 CC or note with a quick press, and a different CC or note with a long press. The controller would send the ‘quick press’ CC based on how quickly the release was detected, or would send the ‘long press’ CC if the time between press and release was over a threshold. I don’t think this is possible with the UNO chip (at least I haven’t seen it).

Whoops…I guess I completely misunderstood his initial comments. Yes…that would have to be up to some scripting, etc.

So scripting is definitely mandatory for what @DavidStypka wants to do.

Yes to @David-san. There is no big deal to write it down in code (with a little help of my friends) :). There is something I am thinking about for last few weeks. With your UnO chip, @jpt, you are able to do almost the exact setup I have now with my stock ROM (yet without scripts). Because here you can choose from the exact same parameters, as I can see in your screenshot. 5xPC, 2xCC, note value and switches, expressions. The only difference is the very right side, when you can select stomps, which I am doing just by selecting CC instead of PC.

But… Even if I can send long press from there, I am afraid the GP global MIDI learn will not recognize it. Actually, you can try it.