Prevent multiple translators within a given time period

I am sending out a MIDI note with a delay (30 seconds), from an input MIDI note. This works correctly, however I want to prevent the output from happening again if the input MIDI note is pressed within the same time period (30 seconds). Is there a way to filter out multiple inputs within that given time period?

For context - the input MIDI note is tied with a start button to start a backing track. The BOME output note then queues the next track, ready to play when the start button is pressed again. However if I stop and start the same track again in quick succession then the output command is obviously sent twice, meaning that the queue command is sent twice (which results in a skipped track).

Thanks

Hi @stevekempin and welcome back.

The following example should help. In this case I set the delay to 3 seconds as I didn’t want to wait too long in debugging the project :wink: .

The first translator will send out the delayed note only if ga!=1 Zero is
the default value for all global variables when a project is started.
The second translator sets ga to 1 and the triggers a watchdog timer that will set ga back to 0 in 3 seconds. The third translator sets ga back to 0 when the watchdog timer trips.

In doing this only the first trigger will fire the delayed output. All other triggers will not fire an output because ga=1.

I hope this makes sense.
delay-with-suppress.bmtp (1.4 KB)

Steve Caldwell
Bome Customer Care


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

@SteveC Thanks for this, that’s excellent :smiley: Exactly what I needed.

Glad to help!

Steve Caldwell
Bome Customer Care


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

Hi @SteveC , just wondered - is there a way to extend this functionality to cancel the delayed MIDI note completely if another MIDI note (tied to a stop button) is pressed within that given time period.

This would give an advantage as it means if I need to stop the track playback and then start it again after a minute or two, the delayed MIDI note (which queues the next track) won’t have been sent. With the current set up the next track will have already been queued and I will need to go back on my track selection first before hitting play.

Thanks again.

Yes, please see the attached.

In this case the initial trigger sets both a watchdog timer and a delayed note timer.
The watchdog timer triggers as it did before.
The delayed note timer is set for 3 seconds, and sends the note message (translatore 0.3) however if the cancellation message is sent (translator 0.4), then the timer is killed and the note is never sent.

delay-with-suppress-and cancel.bmtp (1.7 KB)

Steve Caldwell
Bome Customer Care


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

@SteveC Thanks again, that’s brilliant!

@SteveC Sorry can I request one final variation of this (for a different function I’ve found). Is there a way to simply suppress/filter out repeat CC’s in a given time period? For example I have an issue with a button that I want to fire a CC immediately on press, but not fire again if that button is pressed again within the next 2 seconds. Is that possible? Many thanks again.

Sure,

See the attached. The first and second translators have the same incoming trigger.

  • The first translator sets a “watchdog” timer that trips in one second.
  • The second translator sends the CC value but only if ga!=1 then sets ga to 1 so it doesn’t fire again until the watchdog timer trips
  • The third translator then sets ga back to 0 enabling the CC to pass again.
    CC-Once-in-2-seconds.bmtp (1.4 KB)

If you are already using ga for something else, use a different global variable.

Steve Caldwell
Bome Customer Care


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

Cheers Steve!

1 Like

I noticed that repeated events will extend the watchdog timer. To avoid this, I’ve added a rule (my first rule!!) to the first translator:

if ta==1 then exit rules, skip Outgoing Action

Yes, if you do not want to extend the watchdog. However make sure you set it back to 0 or it will never trigger again.

Right. Didn’t consider that.

However … I am adding this test only on the initial setting of the Watchdog timer, not on the Translator that ends the timer and resets the variable to 0. So, I am thinking that the variable should always be reset in any case. All I am doing is preventing the extension of the timer if the trigger re-occurs before the timeout period.

< Details >
I use this for Ableton Track-Left and Track-Right actions fired from a rotary encoder set to Relative 2’s complement output (from an MPD-218). The speed was way too fast to make it useful, so I implemented your Watchdog technique on both the Left and Right actions. However, I did notice that, when turning continuously, the motion of Ableton was slower than if I turned the knob slowly. This issue turned out to be the culprit … constantly resetting the Timer. This was my fix.
< End Details>

And, by the way, I’ve been using BMT less than 48 hours and already love it. I’ve transitioned a chunk of Binding from Cantabile into BMT and this is definitely the tool for doing this kind of work!

1 Like