Re: Livecoding music in Haskell

On Tue Nov 7 16:32:11 EST 2006, alex wrote:
Latency I deal with by calculating everything a second or so ahead of time, and timestamping my OSC packets with times in the future. Then on the other side I have some scheduling stuff to trigger sounds at the right moment, for example in SuperCollider's sclang:
A second seems excessive? Working directly with ghc <-> scsynth latencies of ~ 0.075 do not seem to be and issue with even relatively heavy scheduling loads.
response = { arg time, responder, message; if (message[1] == 'on', { SystemClock.sched(time - Date.getDate.rawSeconds, {Synth("noisebox", [\lgain, message[2] / 100, \rgain, message[3] / 100, \ts, message[4] / 100, \browndel, message[5] / 100, \filter, message[6], \envtype, message[7] ] ); nil; }; ); }); }; o = OSCresponder(nil, '/noise', response); o.add;
Even sclang, remarkable as it is, will need to be sending time-stamped bundles for reliable sample-accurate timing? Even to avoid perceptible jitter under high load? Regards, Rohan

On Wed, 2006-11-08 at 22:35 +1100, Rohan Drape wrote:
A second seems excessive? Working directly with ghc <-> scsynth latencies of ~ 0.075 do not seem to be and issue with even relatively heavy scheduling loads.
Yes you're right, although with my current timescales of livecoding, an extra second of latency doesn't make much difference. I'm not dealing with individual notes, but longer term structures.
Even sclang, remarkable as it is, will need to be sending time-stamped bundles for reliable sample-accurate timing? Even to avoid perceptible jitter under high load?
Ah, good point - so I am falsely conflating sclang with scsynth? I am (still) a beginner sclang programmer as well as a beginner haskell programmer. In any case I intend to move to your hsc library soon, so thanks for the scheduling details in your other mail. Thanks also to those pointing me at Haskore on #haskell, so far it looks a lot like my existing representation of music, only much better. alex

I meant to add that of course once you have sample-accurate timing, the next job is to mess things up again with some model of expression in performance (unless you're making german techno). For example I intend to apply some of these rules within Haskore as part of my project: http://www.speech.kth.se/music/performance/performance_rules.html The alternative to this is to stick with a flawed system and decide that it's expressive :) Relatedly, one thing I dislike about supercollider (or at least the way I'm using it right now) is that its failure mode is to crash rather than produce inaccurate output. To me part of the enjoyment of an instrument is what happens when you go beyond its normal limits. alex
participants (2)
-
alex
-
Rohan Drape