Hello. Using hsc3, I have a process which is playing eigth notes at 120 bpm (four calls to audition per second). After doing something like what Alex described in "Hacking Perl in Nightclubs", the timing sounds reasonable, except that roughly once every five seconds a note is about a sixteenth note late (~125 ms).
I think the problem may be garbage collection. If I run performGC from System.Mem after forking my audition call each time, the timing in general is not as good, slightly shaky, but never with a 125 ms gap. It also increases CPU usage by an unacceptable degree (up to around 25% cpu usage). What strategies do people suggest for dealing with this? Is there a better way to verify that the problem is caused by garbage collection? Is there a better way to manage garbage collection if that is the problem? It doesn't seem great at all, but one solution might be to use a kind of auditionAtTime function which took a UTC or POSIX seconds time as the time to be executed by scsynth and send everything ~150 ms early so that the garbage collection would never be noticed. I don't like the idea of such latency, though. Have any of you encountered this problem? Can you suggest some solutions? Best, Renick -- Renick Bell http://the3rd2nd.com _______________________________________________ haskell-art mailing list [email protected] http://lists.lurk.org/mailman/listinfo/haskell-art
