Turn off a gate~ exactly when rate~ reaches 1.

Florent Ghys's icon

Hi there,
I guess I'm missing something super simple here but I can't make this work.
I would love to turn off a gate~ exactly when rate~ reaches its higher value, i.e. 1.
I've tried with [delta~] [
But when I leave the signal domain with edge~ I loose the sample accuracy I need.
What is the best way to do that in signal?
Merci beaucoup
Florent

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

Something like this but staying in the signal domain:

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

Something like this?

sorry, didn't look at your patch and did't test mine.. really no time right now. Hope it helps anyways!
Cheers!

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

Hey, thanks a lot for your answer.
The [!-~] is a good idea, the only thing is that the gate~ reopens as soon as rate~ goes back to 0. and I need the gate~ to remain open or closed.
I've found something like this which works:

Now, I am just not sure about the sequence [delta~] and [
Is it reporting a signal at 1. or a signal at 0.?
thanks

Dave Mollen's icon

Can't you just run the rate~ at half speed? Then you can add a [>~ 0.5] to your patch and you're there.