Safety 3 clicks in a second Timer Button Debouncer

pianomangigs

2015-01-28 06:23:19

Hi

I need help building a or a series of translators to do the following...


I am using a midi controller to launch clips and do stuff in ableton.

I want to make translators that will ONLY pass midi (channel 5) note on/off data from my controller to ableton
IF a button ( i.e. note) is pressed 3 times quickly within a second

This will ensure that if I accidently bump or press a button when I am playing it will not mess up the show.

I sure hope this can be done


If possible I would like it simple but if I have too I could make translators for each button which is 48 buttons to debounce


Thank you so much

Jeff

DvlsAdvct

2015-01-30 18:17:35

Hi Jeff

I just want to be sure, you are only worried about messages coming through on Channel 5? What you want to do is possible, and if it's just every note on/off that comes through then we should be able to route it with a general set of translators.

Jared

pianomangigs

2015-01-30 20:20:28

Hi

Thank you so much for getting back to me!

Correction.. it is actually ch 13 that needs debounced, not ch 5 sorry my bad... and if it works I will be doing the same thing on ch 14 note on/off events.

But, Yes, I am only concerned about debouncing channel 13, 14 note on/off events

I am using the same controller for other channels i.e. ch 1 ch 2 ch 10 ch 5 ch 16 and of course ch 13, 14 but I have already written simple translators to pass and route only the data I need on those other channels. Works Perfectly!! very awesome and stable.

It is only ch 13, 14 note on/off data that needs debounced. keep in mind that same controller is sending other ch 13, 14 data ie cc controllers but they do not and can not be debounced.

Ch 13, 14 is the channels I use to launch whole song mp4 video backing tracks from a max4Live video suite called vizzable 2.1 that runs inside ableton

So It is really important and necessary to have the safety debouncer on ch 13, 14 which I use to launch the songs from the vizzable video player.
It would be a disaster if I would bump a controller button and stop the current song and start another in the middle of the current performance.


Thank you very very much

Jeff

pianomangigs

2015-02-01 07:29:48

Is there anyone else that can help with writing this translators?

I can handle writing simple translators but I am not clear on timer and if then codes


I Really need this debouncer to "Save The Show".


Thank you

DvlsAdvct

2015-02-01 23:08:52

Hi Jeff, sorry for the delay.

This is definitely doable using timers. What we will do is set a timer on your first press of the button, and if you do not press it three times by the time the timer goes off nothing will happen. I am going to specify 9C for the incoming message, so only on channel 13, and only on a button press so 7F for velocity, but any button on that channel will trigger. Try this out and let me know if it works.

I'm going to modify the entry from here to handle three button presses instead of 2.

Code: Select all

Translator 1: Channel 13 Press
Incoming Message: 9C n0 7F
g0=g0+1
Outgoing Action: Channel 13 Delay 300ms delay

Translator 2: Channel 13 Timer
Incoming Message: Channel 13 Delay Timer 
Rules: if g0!=3 then exit rules, skip outgoing action
g0=0
Outgoing Action: 90 n0 7F

Translator 3: Channel 13 Timer End
Incoming Message: Channel 13 Delay Timer
Rules: g0=0
Outgoing Action: None
Let me know if that works.
Jared

pianomangigs

2015-02-02 22:53:12

Hi

I am not sure how to implement the the outgoing box delays in mt

Not working I think I may not have implemented something right,

This is what happens... when I press a button I get that notes output imediatley only once no matter how many times I press it and the channel output is on ch1 instead of ch13 also turning translator 3 on and off does nothing


I need it to only pass note after 3 button clicks in a second,
If pressed once or twice no note should pass.


Not sure what I am doing wrong I suspect the outgoing timer delay outgoing action is not set properly in 1 or 2

This is what I have done.




Translator 1

Incoming: midi message 9C n0 7F port is my midi controller
Rules: g0=g0+1 "expression" this generates pp=0+0
Outgoing: "Timer" timer name "3 click" "once" initial delay "300"ms Delay Outgoing Action "no delay" OR "g0"ms does not matter


Translator 2
Incomming: "Timer" Timer Name "3 click"
Rules: "if g0!=3 then exit rules, skip outgoing action g0=0" "conditional" this generates "if 0==0 then pp=0+0"
Outgoing: "midi message" 90 n0 7F port is set to ableton port to launch songs Delay Outgiong Action "no delay" OR "g0"ms does not matter



Translator 3
Incoming: "Timer" Timer name "3 click"
Rules: g0=0 "expression" this generates pp=0+0
Outgoing: "none" Delay Outgoing Action "no delay"



I am not sure what I am doing wrong

where did I mess up?

Please advise

Thanks

DvlsAdvct

2015-02-03 17:45:17

Can you attach your project here so I can take a look?

Thanks
Jared

pianomangigs

2015-02-03 20:06:23

Hi


Here you go


The safety debouncers are 1 2 3 they will replace "Pass ch13 note on AND Pass ch13 note off" translators

Thanks
Attachments
GIG SetUP - TRaNsLatoR.bmtp
Number 1 2 3 are the safety debouncers they will replace "Pass ch13 note on AND Pass ch13 note off" translators
(4.12 KiB) Downloaded 147 times

DvlsAdvct

2015-02-04 19:25:30

Hi

Alright, so there are a number of things happening here. I am only going to focus on the 9C messages for now, since I can see a bunch of problems with what you have set up, so we are going to go step by step.

First, you have a passthrough for channel 13 on translators 4 and 5. This will conflict with your delay timers as the first translators in the list as already sending the messages out before you can hit the button. Those will need to be disabled. You also have a passthrough for channel 13 on translators 6 and 7, which is doing the exact same thing translators 4 and 5 are doing.

Second, your rules are entered incorrectly. You have the rules I gave you entered in the description, but not the actual Rules box. For example, in translator 11 you have the description as g0=g0+1, but the rule in the Editor is pp=0+0. This will do absolutely nothing. You need to put g0=g0+1 in the Rules Editor window, where you currently have pp=0+0. And please remove pp=0+0.

If you deactivate translators above and change those rules, what happens?

Jared

pianomangigs

2015-02-05 00:10:42

Hi


WOW AweSOME!!!!!!!!!!!!!!



Got it working!


Just was not sure how to enter rule data

As for the pass thru's as I had said they are to make my rig work until I got this working. then I disable them


If you have time can you explain more in details how the translators work?



If not I understand it would be nice to understand this


Thanks SO MUCH

Jeff

DvlsAdvct

2015-02-05 01:31:31

Hi Jeff

Alright, so what's happening is pretty simple.

When you first press a button on channel 13 a timer begins. It waits 300ms before it triggers again. Every time you press the button it counts a global variable, in the example g0. When the timer goes off, after 300ms, if you haven't pressed the button 3 times it won't do anything. If you have, the signal goes off. If not, it resets the variable in case of an accidental push. That way, after the 300ms goes by, if you didn't want to send the message you can start over.

There are more advanced things we can do, but if this works for you, then it works for me. :)

Hope that helps.
Jared