Toggle to convert received number from int to float (edit: Fixed, sorry!)

ian jojo's icon

Hi all, I have a tricky little bug that maybe I'm overthinking.

I have a patch that sends a BPM value to a udpsend. I made a toggle that chooses between sending the BPM (which begins as a float) as an integer or a float and this works fine. However, I've noticed that when the toggle is deactivated (integer mode) and the original BPM float is changed from, say, 120.00 to 120.22, the Int version of this still fires upon each change even though the Int version of this value is the same each time (120.00). I thought that using a change object would prevent this but it seems that something is triggering it.

I feel this is tricky to explain and I'm not able to supply the patch at the moment but I wonder if anyone knows what I'm talking about here?

Edit: Sorry, I found the issue, feel free to delete this post!