How to send command only when more than 1sec between trgrs?

bsfreque

2012-09-28 21:42:31

Hi Florian and others!

I've been able to do everything else so far by using multiple triggers, but I couldn't figure out how to do this one..

Is it possible to send out a keystroke (or any command) ONLY when the time between two incoming triggers is more than 1 second?

My APC40 sends a note on-command when pressing a button, and a note off-command (same channel and note) when releasing the button. Pressing the button already changes my APC40 mode, as it's supposed to, but when pressing it for longer than 1 second, I would like midi translator to also send a keystroke that opens my memo for all the sounds on that preset.


Is this somehow achievable by using rules, or maybe some other method? 

Thanks again for any help!

bsfreque

2012-09-28 21:49:56

Or actually.. How to not send the second command when pressing more than 1sec?
(as releasing the button now switches back to my ableton window :)

DvlsAdvct

2012-09-29 03:09:08

Hi bsfreque

This is totally possible. You'd need to use a combination of Rules and Timers. See below

Code: Select all

Translator 1: Button Press
Incoming Action: 90 00 7F
Rules: g0=1
Outgoing Action: 90 00 7F

Translator 2: Button Release
Incoming Action 90 00 00
Rules: g0=0
Outgoing Action
90 00 00

Translator 3: Timer
Incoming Action: 90 00 7F
Outgoing Action: Timer Delay 1000ms

Translator 4: Trigger
Incoming Action: Timer Delay
Rules: if g0!=1 then exit rules, skip outgoing action
Outgoing Action: Keystroke
That make sense?
Jared

bsfreque

2012-09-29 04:14:23

Got it, and seems to be working great. Thanks for the quick reply!
I'm new to using rules, but I think I'm starting figure them out.
This already opened up a lot more possibilities for my midi mappings. :)


BTW, I seem to have found a small bug in MT pro V1.7.2 (on mac os x 10.8.2)
When trying to move translators to the top, they only move one row up, but the one on the top gets selected. This was a bit confusing at first before I noticed what was going on. This wasn't happening on 10.6.8. No big deal, just saying.

Anyway, thanks again Jared! I'll be back if things get confusing again. :wink: