Avoid double triggering from TouchOSC

igor renzetti's icon

Hello everyone, I'm totally new to Max.
I've made a patch for a show to check incoming triggering from a Touch OSC interface during a live show. I's just for monitoring purpouse and to manage OSC control beheaviour.
I'm struggling to manage how o prevent accidentally double triggering from the controller.
I've tried with one bang that works regarding avoiding the double trigger stuff but the problem is that it outputs a bang essage and not anymore the osc message. How can I do that?
Thank you very much, any help appreciated!
Igor

Max Patch
Copy patch and select New From Clipboard in Max.

Here it is my simple patch:

John Daniel's icon

Hello Igor!
I deal in Touch OSC and Max a bit - can you post your touch OSC Project?
maybe i can be of help
cheers
jd

LSka's icon

[zl change] ?

igor renzetti's icon

Thank you very much for the replies.
I attach my touch osc layout, It's designed to give a musician on stage a way to remotely trigger some cues in Millumin media server.
In my max patch the "output ping" part gives him a feedback of working connection using a led on the layout and displays media time running in the faders.
In the "input check" part the patch gives me a feedback of his usage and a feedback from the builtin ping function of touch OSC.
The input part uses a port for udpreceive to get messages from Touch OSC and sends to localhost using another port to get the messages to Millumin.
My interest is now to avoid accidental double triggering from the touch OSC controller.
Thanks again for the reply.
Igor

millumin_ctrl_4.zip
zip
John Daniel's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hello Igor!
try this. see if this helps. I get no double triggers this way.
I do not have Millilium to test against
cheers!
jd

igor renzetti's icon

Hello John, thank you very much for the help.
The patch isn't working about the double triggering.
My goal is to avoid accidental double pressure of the buttons on the controller.
I've tried to implement your route object with the onebang system, but actually I get twice the messages sent, so actually I'm getting double triggering and it's not good. I think I didn't get well how the route object works.
Any other clues?
Thank you a lot.

Max Patch
Copy patch and select New From Clipboard in Max.

Here it is the patch how it's implemented right now.

igor renzetti's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Maybe I'm getting somewhere.
Here it is the patch and the TouchOSC layout with a little tweak for the "prev" button.
I don't understand why this is working and the previous one not, I think they are the same.
But I'm wondering if there is a better way to implement a double trigger inhibitor with OSC in max, without putting messages in max and keeping patching simpler.
Performance of this patch seems a little bit less good than my first one.
What do you think?
Thanks
Igor

millumin_ctrl_41.zip
zip
John Daniel's icon

Try this.. I thiink the onebang objects are not needed at all. (and might be part of the problem...)

Not sure of exactly the syntax millumin wants, so here are some options. (is there a complete list of the Millumin osc messages somewhere?)
There is no "double-tap" with either of these methods.
hope this helps...

ALSO - in your Touch OSC patch the "PREV" button had a send address of "/millumin/action/launchPrevColumn " <<< note the extra space after the word Column - should be "/millumin/action/launchPrevColumn"
I have fixed that in my Touch OSC patch and adjusted the Max patch to suit.

Max Patch
Copy patch and select New From Clipboard in Max.

cheers!
jd

igor renzetti's icon

Hi John, thank you very much for your efforts, I really appreciate that!
Your patch works with either of the two options but actually if I double tap i get the expected behaviour.
Maybe I can try to explain in a better way.
Assume my media to trigger are 1-2-3-4 and so on...
If I double tap is expected that I go from 1 to 3 (passing over 2), and that is the normal behaviour.
But I actually need to go from 1 and then 2 and then 3, even if I double tap because I need to prevent some one else errors during a live execution, that can accidentally skip a cue, so I have to inhibite a double tap to function, but actually I need it to work as a single tap.
For this reason Onebang seemed to me a good way, because it actually gives the possibility to send just one command and set a delay to enable a second command.
Here it is a list of all the OSC commands that Millumin can use:
https://github.com/anome/millumin-dev-kit/wiki/OSC-documentation

I'd noticed the extra space you mention and removing it gave the proper OSC message display in Max.

What do you think about?
Thank you very much again.

John Daniel's icon

Hello Igor!
I have tested the attached patch below with Millumin Demo and the fixed Touch OSC and it seems good to me... would work for me...

I think i am missing your question.
I read the question in three possible ways - which are you after?

Method #1
tap once to goto next Column (from 1 to 2 )
AND
double tap to go quickly 1- 2 -3
(this is the method used in the attached patch)

Method #2
tap once to goto next Column (from 1 to 2 )
AND
double tap to go 1 - 3

Method #3
tap once to goto next Column (from 1 to 2 )
AND
double tap just goes from 1 to 2 and does NOT "jump" to 3
PREVENTING UNINTENDED JUMP

Max Patch
Copy patch and select New From Clipboard in Max.

am i getting it?
cheers
jd

John Daniel's icon

Igor - is there any chance that you are echoing the osc out to millumin twice? confirm/check all your port and IP numbers.

As in: - could Touch OSC be triggering millumin DIRECTLY? and then Max is ALSO triggering the same message to millumin slightly later?

Since Max and Touch OSC both are sending the same exact message - it is worth checking.

i cannot get it to double tap unintentionally here.

igor renzetti's icon

Hi John, I'm after the method #3 that you described,
"Method #3
tap once to goto next Column (from 1 to 2 )
AND
double tap just goes from 1 to 2 and does NOT "jump" to 3
PREVENTING UNINTENDED JUMP"

Sorry if I was unclear.
I just want to achieve this
"double tap just goes from 1 to 2 and does NOT "jump" to 3
PREVENTING UNINTENDED JUMP"

I double checked all my settings.
Millumin sends to touchOSC only the /millumin/layer/media/time command and doesn't receive directly commands from TouchOSC.
Max is sending the /led command for the touchOSC interface and recives all the commands from TouchOSC, forwarding them to millumin

There is no echoing in messages. All is working like it should and fine.
I don't have double messages sent anyway.
I just want to avoid "intentionally" double tap on the touchOSC interface, making it behave like a single tap.

Thank you very much for your time.
Igor

John Daniel's icon

ahhhhh. kewl - that helps
try this...

set your delays to the amount of time you need.

Max Patch
Copy patch and select New From Clipboard in Max.

hope this helps
jd

igor renzetti's icon

John, thank you very much for your help.
In your patch double tapping is avoided with the delay set to a certain amount of ms .
I'll study better the logic behind it to understand how it works.
The downside of your patch is that the first command to go to next column (the first pressure of the button in TouchOSC) is delayed too but it should pass to millumin in "real time", and if I decrease the ms of the delay it's no longer useful to avoid double tap.
The concept is that the first tap as to be forwarded directly, the second (third, foruth...)tap should be blocked if it occours in a set amount of ms after the first tap.

I will study how to implement such stuff and post follow up in this post.
Thanks again for your help.
Cheers
Igor

John Daniel's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Doh! i think you are correct sir..
try this
You were on the right track originally w the onebangs... : )

igor renzetti's icon

Thank you again John, that totally works!
Really appreciated your help!
Cheers