sampstoms~ bug in Max 5.1.2
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
----------begin_max5_patcher---------- 389.3ocyTFsSCCBEF9Z5SAgqqFnqas0674vrXXsrNLEnovhSWlO6Vnk4p5Vq Qyh2.gy4.++7wIrO.fVo1wzH3cvGf.v9..vExF.zuFfDzc4UTsqLjfo0zRFJ rKmgsy3hmlFgw9n0MLMSZnFtR9XCK2zoPb1hawgPRVlcB2O.W1uK4VAWVwLN gh5CtVIMZ9qLaLRT6VNVqZqwWLwqK0jugKKOUyzXqNQXhcJ1sfjdhp7Bm+Uq d5lLu+6NZyK0rtCAgNVt0ORpvk.ceCmVgrINDDXGBmHEWWoZuAihKmamQvii KxOAWQW.WYyb3p6kZNticeOtVbVb0d8nFTHDshJK+qY245.iiIi2ANq65gwW wNvAZd4NvjqVGnj8bqfeAhZpnVaTB8aSjjySthMmCzLI6RMmomkjZdorkYg9 1zIBVWYnJt7y+W5LpM9PZqUaax8Z1+6B7CqVvzFtzQ0SpIcPMa3EELWZOpD7 hZEWZ5s.b429xOUGk7uyQV0Hi3nE+BG0t3Pv6Tu5cNJ -----------end_max5_patcher-----------
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 . . .