sampstoms~ bug in Max 5.1.2

Maurizio Giri's icon

If you send a value in samples to sampstoms~ with DSP switched OFF, it will produce a result in seconds, not milliseconds (i.e. if you give it 44100 it will output 1).
It wasn't like this on previous versions of Max (and it breaks a few patches I have).

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

Macbook pro 2.8 GHz OS X 10.6.2

jasperspeicher's icon

Here is the behavior I get: if I make a new patch from clipboard with your post with DSP off, I get the behavior you describe. If I do the same with DSP switched on, but then I turn it off, and then I click the button, it produces the correct value.

So I think it has to do with whether audio is on when the object is constructed?

j

Macciza's icon

Hi
I did a diff on the objects and all that has changed is the identifier strings for version etc.
I think your patch worked straight up in 5.1.1 but did what you said in 5.1.2.
I also noticed that toggling the dsp set things straight
Bit weird - something for the dev list methinks . . .
Cheers

Emmanuel Jourdan's icon

Thanks for the report. This has been fixed for the next incremental. I'll post a new version on the incremental download page. In the meantime, starting the DSP fixes the problem. Sorry for any inconvenience.