Accuracy of translate @in ms @out notevalues

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

Hello,
I am trying to translate values from ms into notevalues with the object translate.
I tried two different methods, one getting the time values in ms from timer, another from borax.
In both cases the values in ticks found by translate vary between 478.5 and 482.4.
When these values are too far from 480 ticks translate would only output a 0 when using the @out notevalues argument.
Is there a way to change to tolerance of translate?
Is there a way to make this patch work?

Thanks!

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

It seems it is working better with 'simple' tempos like 120bpm.
Always issues with triplets and quintuplets.
I guess this post is linked to this one https://cycling74.com/forums/translate-ms-to-notevalues
Solved this issue with something like this (not elegant but working):

AaronMButler's icon

I ran the patch for a bit on two computers. On a MBP with 8gb ram and an old macbook with 2. Both running lion/max 6.

I never saw any output other than 480 ticks.

AaronMButler's icon

Actually just had the value drop when switching windows on the mb, but the mbp never deviated evening while running multiple windows.

Florent Ghys's icon

Thanks Aaron for trying it out.
This is really strange, it has been working great today. I am on a MBP 8gb ram and Lion as well.
I think it is when one changes the tempo that translate acts weirdly.
I ended up with a [translate @in ms @out ticks] going into a [round 2 @nearest 1]
...doesn't work with septuplets though, since they are 68.5714 ticks length