Increasing a speed value then reset it after it reaches a value

Hello, I’m having a problem with a interactive installation I’m working on. So I’m having a count chop that counts how many times a button is pressed. This should send a single to an audio file to increase the speed and after a specific value it’s reached, it must reset. Can someone help me understand how can I make the network work?

Hello,

I’d start with a button wired to a count CHOP. Set the Limit param to Loop Min/Max on the count tab and the Limit Maximum to the number of button clicks the user should be able to input before it resets.

Then pass the output to a math CHOP and use the Range tab to map your click counts to a range of values to adjust the speed to. For my example, I’m using “0 to 10 clicks” which is mapped to “1x to 2x speed”.

I mapped this to the speed parameter on the audio file by way of a python reference.

Demo project is attached :slight_smile:
clickToSpeedUp.toe (16.9 KB)