What~ doesn't read 1. from groove~ ?

Aine Pearson's icon

Hey all! Working on a sampler which will select a new slice of the sample when the selected loop ends. I'm trying to use the what~ object to send an impulse which will trigger this, but it looks like it doesn't read 1 from the groove~ loop sync outlet.

It reads 0.9999999....... but not 1. Why?? I know that many 9's will be functionally the same as one but the imperfection of it makes me upset. Tested with phasor~ and it doesn't read 1 there either. Is there something about DSP that I'm not understanding here? Is there a better way to do this that I'm missing? Is it time to learn gen~?

Thanks for your thoughts! Attatched a test file & screenshot for you to explore

Max Patch
Copy patch and select New From Clipboard in Max.

Wil's icon

select copy compressed form the edit menu to upload your patch

here:
you can get it with ==~ 1. and edge~

Max Patch
Copy patch and select New From Clipboard in Max.

Aine Pearson's icon

Amazing! Thanks for your help, this works great. Strangely, when the groove~ is played in reverse, ==~0 > edge~ does NOT work, but what~ 0 > edge~ does. So I'll use each for their according quirky preference! :3

Max Patch
Copy patch and select New From Clipboard in Max.

Looks like something weird is happening with the topic post as I've tried to edit out the block of text and it's not showing up in the editor.