Erratic sample interval from snapshot object
I’m trying to sample the output of a low frequency [cycle~] object using [snapshot~]. The sample interval produced by the internal timer of the [snapshot~] object is showing a great deal of variation. For some settings between 130 and 500 msec, the sample interval varies as much as 60 msec. I wonder if anyone else is seeing this behavior.
I’m running Max 5.1.7 under Windows XP on a moderately fast dual core Thinkpad. No other app’s are running, but undoubtedly other processes are active in the background. The Max CPU utilization is very low.
I notice others using [snapshot~] at a 10 msec. interval, but this is not even possible on my system. The minimum sample interval seems to be around 40 msec.
Here is the patch I used for testing. Any comments would be appreciated.
----------begin_max5_patcher---------- 987.3oc0YsrbhiCEcMcU8+fJusITVxO.5cyrX9.lrr6TSILJflxRhxRjWc04 aezCahCwtQIiA4dCBt9Z4y8n6S7O97mlDsR7.QFA9J3afIS9gVxDqLijIMBl DwvOTThkVEitsTv2yhlVeM5ZqTwp+8pjjCR0ZH1qJIJ68fZDeqfqjzmHFgPz r3F4NcUOti3vh4gfUQSAQqv7MQfaZTbGVUrkx27OUjBkSWDJSuQfTTrYIy9o 46ubSlmJGyr6czeTQwkswIk2.SnU3O+7mLq5kodyIEBFivUG1VE4AK5h9aM7 I.ws.Ilsqj.nbEo5Nbo9K.ljTLCbqnBn2GE.FWqjb1g8ojxIEh8b0qXw1TNp GJO9TTdWL4h1LIbYtYII8xRkbx8ZC6sL4Uf3Yc5zE2CC.+fNc93rkrzRQInY YeTmMzfyPOUBjpJBlock5hoPKGrvSSj4IHJnigRrKyy+3QkCOQo2bJaOqGGJ zhgOKFkeJ+pLmeUtitRFUzE9geEcMO.zEL+UzUP7t5Mm+0D0wo66h3fyG9T2 vX2xHqJ3eoqw8MIGuStUnd9lo.8ZkBn4F1aJLdGVCMEUvklxl4wewVmDfqzk QWIM5rRqtopoT67nYAqdvzXfRnq9G6Jq9c924+IoTbu8JFQSApsj2VFVBzfr hvHkOBHUU5mr6lu9HEw61QvURyCYK9NB.CzaNQW5lxnJCBvqzGgfTn642cE7 kc4FjOftA0oagKstAnrE1ek.GGkv2UQa4czlCxFxPg4NmeWDgo8kKej.4o03 hm6zTSOko1ewz5n6zCe9hIclKAT7XQI44d5q.lLXcfIoa35SCe5rntDPNJD4 9UhMaJIcRFnSQFuwnOcyANKN+PR8iM3ybbKinpD5GYm16v098oG0Kuc1MWxs wRSRGpt0COs7hNkBrMQsHHcStZuRI3cQE4u6HDe8LpmN6bFhrmshT0kUMbsA aKR9NLZWgtvzxWegCJJqaZ5LLbkWjT87UyGWgBYmgPg5f+PFKjd4iEZF.JOf ACxR55VDRiApGJ4EKr8+b069v2OJHwsj5lJFdQO4QA3jG9aXZP3kNMXCKM74 Ac6fcP2ieSBVbXtvQbmTrupnw.p6NBzBJqIR8j81+EfVJk8Zk1RWulve0nSL 55cBsiSMN.2z+Ap2PagOPadPfVtOPaw3FZvKNzx7AZvfvZdCsKOqk5CzVNdg lYN0.fMyam5zfy7hSCf6VhOXKMHPC4UEAzhwL3BSQAjWErRBS3vwbxu.bAf4 75TcYPvFLw27uA.adQbvzwL3BiGGzqpC4gAadEMLdgF7++3BFA5k+C.mW6Tl -----------end_max5_patcher-----------
If you want tight control timing you need to make sure that overdrive, and scheduler in audio interrupt are on (in the DSP Status window). Also make sure the signal vector size is small enough.
Thanks for the help. Turning on overdrive and scheduler in audio interrupt, and reducing the vector size to 512 did help considerably. However, even with these settings, there are two problems.
When [snapshot~] is set to 20 msec., there is still a 12 msec. range between the shortest and longest interval.
Also, when the interval is reset externally through the right inlet, the object sometimes fails to recognized the change and remains at the previous setting. You can see this in the test patch, where the [metro} used as a reference interval generator changes immediately and [snapshot~] does not.
With a signal vector size of 64 samples, I see a variation of about 2 ms.
Forums > MaxMSP