[linux-audio-user] Re: [linux-audio-dev] music engine

Ralf Beck musical_snake at gmx.de
Sat Apr 8 12:28:19 UTC 2006


Paul Davis schrieb:

> although i agree that this is the right design for many classes of
>
>application design, i would like to see how you propose to tackle
>metering and waveform display (the two most difficult examples).
>ardour would be relatively easy to separate into interface+engine
>processes (as opposed to just a lib/lib-client separation) if it were
>not for these issues. moving waveform and metering data back and forth
>between two processes via a wire protocol is very expensive and
>inefficient.
>
>--p
>
>  
>
The key here is to reduce the data to be displayed to what the GUI 
actually needs.

Example: metering
You can send every rms + peak at 32 float  at 44.1kHz, requiring  4 * 2* 
44100 Bytes/sec per track
or
send the peak and the RMS reduced to 8-Bit resolution at a rate of 25Hz 
=> 50 Bytes/sec per track

The latter will satisfy even people running a display at 1280x1024 with 
the full vertical resolution dedicated
to the meters. 4 Bit displayed resolution isn't that noticable, nor is 
the 25Hz update rate.

Example: waveform
Let the GUI send a request with startposition, endposition, length + 
required resolution and return only the requested data.

Suppose you have a 10sec wave  you want to display from second 4 to 
second 6, using a canvas of 256 * 1024 pixels,
your engine only needs to send 1024 bytes.

Actually, i consider any realtime application, which does not separated 
rt part and gui into different processes,
a bad design.
Not to mention that this separation allows to run several rt engines in 
a single  process thread and have each of
them communicate to their guis, independent of what toolkits the guis 
are based on and whether or not these guis
 run on completely different machines/architectures. 

Ralf






More information about the Linux-audio-dev mailing list