One button triggering different results?

dbkarp's icon

Hello,
I'm very new to Max. I've been trying to hack together a looper that I can use with a Roland FC200. I have it set up such that every time I hit a certain switch, it'll play the loop in reverse; a different switch, the loop at double speed; etc. (I am doing this by having each midi signal send a Bang to message containing the relevant number, which in turn sends it to a number object controlling the loop speed.) What I want it to do is make it such that if the reverse button has been pressed, and I press it again, it reverts back to regular speed, rather than having to designate a separate button for regular speed.

Thank you!

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

i am not sure if you asked this...
also i have give you and a very simple patch for double click
which was very useful for my loopers

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

It sounds like you want the behavior of toggle. Like:

dbkarp's icon

That is not what I asked, but thank you very much! That patch has given me so many ideas!

I have also figured out what I wanted to do (I just made it so that each time I hit reverse, it multiplies by -1).

tada's icon

o! if you are talking about double click patch...in my loopers i use triple and fourfold clicks(!)

dbkarp's icon

:O That sounds really cool! But I'm still trying to get down how to make my looper overdub...

Also, does anyone happen to know how to make it do something different for if I hold down the switch versus just clicking it?

Wetterberg's icon

use a timer to measure how long you've held the button down, then do [> "your threshold for when it's being held down vs tapped"]