|
From: Josh G. <jg...@us...> - 2003-01-22 02:26:32
|
On Tue, 2003-01-21 at 13:14, David Olofson wrote: > > Well, MIDI may not suffer as much from unbounded latency as audio, > but I'm not willing to take chances. We're talking about *unbounded* > worst case latency here, and it's really as bad as it sounds. If you > *can* have memory management stall MIDI processing for half a second > in the middle of a live performance, it *will* happen sooner or > later. (You know Murphy...) > Half a second? I'm sure that rarely occurs. I can't speak for Python's memory management, but much of the critical stuff in Swami uses glib memory chunks. These allow for an initial allocation block and then only allocate more if and when needed (as long as you pre-allocate enough, it shouldn't happen). If I do ever get around to creating a sequencing sub system, using Python functions will be completely optional. Users who use this feature will probably understand the potential for problems. When just playing around with composing music, I don't think its much of an issue. When one wants to do real time stuff, all the Python functions can be rendered to a MIDI buffer with explicit time stamps (those that don't take real time input of course). Currently, I'm more interested in nice functionality then sub ms latency. This can always be optimized at a later date. > Either way, Audiality runs all event processing in the same context > as the audio processing, so I can't realistically use anything that > isn't RT safe anyway. Even the slightest deadline misses would cause > audible drop-outs. > > > > I'm not yet fully familiar with > > using Python embedded in a program, but I'm sure there is probably > > a way to compile script source into object code. Anyways.. > > That might work, but I suspect it will only improve throughput > without making worst case latencies bounded. If the compiled code > could still uses malloc(), garbage collection and other > non-deterministic stuff, you have gained next to nothing WRT RT > reliability. > > > //David Olofson - Programmer, Composer, Open Source Advocate > Cheers. Josh Green |