Sensor data ramp after inactivity

tds2's icon

Howdy people,

I have a situation where I need the data being captured by a distance sensor to ramp down to a 0 value after a specified period of inactivity.

For example, In the attached patch, the slider represents the sensor data and if it was to stop at, say 68 without change for more than 10 seconds, I need it to slowly ramp back down to 0 until it collects data again.

Any ideas?

2717.SensorEmulator.maxpat
Max Patch
tds2's icon
Max Patch
Copy patch and select New From Clipboard in Max.
Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I think this does what you want.

tds2's icon

Thanks Christopher - that's exactly what I was after!