Forums > MaxMSP

Erratic sample interval from snapshot object

January 23, 2011 | 9:30 pm

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.

– Pasted Max Patch, click to expand. –

Thanks,
Michael


January 23, 2011 | 10:22 pm

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.


January 23, 2011 | 10:43 pm

Emmanuel,

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.

Thanks,
Michael


January 24, 2011 | 11:35 am

With a signal vector size of 64 samples, I see a variation of about 2 ms.


Viewing 4 posts - 1 through 4 (of 4 total)