Forums > MaxMSP

make a bang depending on how long you press the button

April 20, 2014 | 10:54 am

Hi,

I would like my controller make a bang depending on how long you press the button.

Could anybody give me a advice ?

Thanks,

Phil



jbl
April 20, 2014 | 11:33 am

Assuming your controller sends a non-zero velocity when pressed and 0 when released, you can route these 2 values to the inlets of a timer object.

You will get, in ms, the duration for which you kept the button pressed.

If you want something to happen only after X ms while holding the button, you’re looking for the clocker object tied to a >= object.


April 30, 2014 | 3:29 pm

Hi JBL,

Thanks a lot.

It works great.

Phil


Viewing 3 posts - 1 through 3 (of 3 total)