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).
Macbook pro 2.8 GHz OS X 10.6.2
– Pasted Max Patch, click to expand. –
Copy all of the following text. Then, in Max, select New From Clipboard.
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?
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 . . .
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.