in reply to using timers in a music app
Assuming Time::HiRes installs properly, you will get a highly accurate sleep interval. But latency and timing jitter depend on more than this. In a pre-emptive multitasking system with other processes running, it is very hard to predict when, say, Csound will read your command and start generating sound. I have seen jitters of up to 10 msec on my Linux machine. If you need low jitter, I would recommend dumping as many unneeded processes as possible and setting your desired processes to high priority.use Time::HiRes qw( usleep ); usleep ($microseconds);
Even better is to have realtime control of your OS. Check out RTLinux for an elegant realtime version of the Linux kernel.
-Mark
|
|---|