Double Press For New Action

Hi, I’m trying to single press a button to open the browser (Alt + F8), but if I double press the same button within 2 seconds, it will trigger a series of actions instead, that collapse the browser for me. If I don’t hit the button within 2 seconds, it reverts to Alt + F8 again.

This is similar to the earlier ‘watchdog timer’ style sequences. I saw your one-shot timers tutorial on YouTube (the link from here is broken, btw), but I can’t set an incoming keystroke to a variable. So I’ve been trying with timers in two different ways with no success.

The gz variable I’m using keeps resorting to being sticky to either a 1 or 0 value, but isn’t doing what I’m trying to. Help plz. :persevere:
Timer Problem.bmtp (4.2 KB)

Hi,

Try this. I added a new preset. We count keystrokes. We have to wait a bit to make a count. If the count is 1 after 250 milliseconds Timer “AltF8” trips. If it is greater than 1, then timer “Sequence” triggers.
Sequence will trigger your current timer “Browser”.

Whatever triggers sets the count (ga) back to zero.
After 2000 ms then the watchdog timer will also set ga back to 0.

Timer Problem-sjc.bmtp (5.2 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Ok that worked.
It was acting funny. Log was showing weird things. Couldn’t figure it out. Already had a timer named watchdog. Oh no :joy:.
There was a duplicate ga=0, which was blocking it, so that had to go. And had to get rid of all the blocking rules in my sequence. Then it’s working nice. You adding on to the variable instead of add/take away (bipolar) is clever.
I don’t know how you do it. Genius.
But I have another problem, I have to find that other thread.

Well this one working anyway.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

A post was split to a new topic: Tempo Envelope Switch

Hi, I decided to change this from a double click to a hold down to trigger the sequence.
I’ve been at this for four hours and I can’t get it. It does everything else except for what I’m trying to do.

I’m trying to press the F16 keystroke to execute Alt F8, but holding down the keystroke for more than 300ms will run the sequence instead.
I thought to use ‘keystroke up’ to trigger Alt F8, to make it easy (and to not have a delay in the shortcut), but apparently its friggin impossible.

A secondary problem is the sequence cycles continually if I hold the button down, but that activity isn’t supposed to happen and doesn’t show up in the log window. It doesn’t log that anything happens after the first cycle.
‘Stop processing after executing this translator’ doesn’t seem to do anything.

I don’t know how you do this job, I really don’t. I’m about to chuck my computer out my window.
Hold Down Browser Click.bmtp (2.1 KB)

Hi,

Give this a try.

I actually had to create two more translators since my keyboard doesn’t have an F16 key but I disabled them so you don’t need them.
The F16 on translator 0.5 will trip a timer called "Watchdog after 300 ms. The value of pa=1 in the rules, there.
Translator 0.7 will determine if the key is still held down by looking at the value of pa.
If you release the keystroke before 300ms translator 0.6 will set pa to 0.
Translator 0.7 will only generate the Alt-F8 if the pa=1 (or the keystroke is still being held after 300ms.

All other translators I left disabled.

IMPORTANT - BOME MIDI TRANSLATOR WILL NOT SUPPRESS ANY INCOMING KEYSTROKES, SO IT IS IMPORTANT THAT F16 DOES NOT DO ANYTHING ELSE.

Hold Down Browser Click-sjc.bmtp (2.7 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Oddly that works because the last part of the Key Down sequence is the same thing as the Key Up (Alt + F8). So somehow you got it to piggyback each other, and the pa flag didn’t have to reset after the Key Up is done. And the Key Down didn’t have to stop the Key Up from executing.

This particular set is for using a button on my mouse to open/close the browser any time I want. But the browser refuses to collapse its folders, like ever. So if I hold down the button it will collapse them for me, then close the browser. Thank you very much. :hugs:

Sadly I was going to have this formula also somewhere nearby (literally right behind the browser), but this time the outputs can’t share the same sequence. The channel rack doesn’t have an ‘Enter’ key fullscreen hotkey. But you can double click the header to fullscreen it. So F5 is open/close the channel rack, and the hold down sequence is a double click. So click the button open/close channel rack, and hold down: fullscreen channel rack. But sadly what I have here won’t work because I know when the double click sequence is done, it’s going to trigger F5 as well.

This is what I’ve been fighting with it all day about. The pa flags cancel each other out no matter how I set up this logic puzzle. Either they both trigger, or neither trigger, or one triggers and the other never does, or vice versa. I tried having two variables, one variable, one set of evaluators, two sets and on and on. I’ve been back to the drawing board, starting from scratch about a dozen times now. Started this about ten hours ago.

It’s infuriating for something so simple to be such a puzzle. That’s what makes me so mad; I’m not curing cancer here, I’m just trying to flick a switch.

Hi,

As of version 1.9.0 there is an incoming trigger called “On Application Focus”. Maybe you should switch presets when moving between the browser application and FL Studio. Use different logic for each within that preset.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Ya, I have probably four things using that already.
I’m not even sure my puzzle is solvable. Probably is, was just wondering if there is a trick or something that I’m missing. To be honest I should have got it by now.

Ok I was able to get it. Sadly I’m not sure why it worked this time when it didn’t a hundred times before.
Guess I just tried every config until one of them stuck. Drawing pictures wasn’t working. I had to verbally speak out what was happening repeatedly while hitting my leg in frustration, to get it through my thick skull.

Click executes F5. Hold the same button down executes a double click and return mouse position.
150ms hold down time seems to be the shortest delay possible before input overlap breaks it.
Anyone can use this and change the inputs, outputs and delay time to their situation.

Hold Down Channel Rack.bmtp (1.8 KB)

I guess you need MIDIBuddy to know where the mouse is for return (ga and gb). I’m glad you got it all sorted out!

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like