Re: [LAD] Program design: C++ -> SHM -> Python

From: Olivier Guilyardi <list@email-addr-hidden>
Date: Mon Dec 27 2010 - 13:51:09 EET

On 12/26/2010 01:37 PM, Harry Van Haaren wrote:
>
>
> On Sun, Dec 26, 2010 at 11:20 AM, <fons@email-addr-hidden
> <mailto:fons@email-addr-hidden>> wrote:
>
> Depends entirely on if the delay is acceptable or not. You can send
> it as
> a binary blob - encoding each sample would be quite a waste of time.
>
>
> I should have specified: The data will be the Sample played back by the
> engine,
> and it will be sent to the GUI, to be able to show the waveform /
> spectral etc info.
>
> IMO: Delay acceptable yes. Binary blob is good advice, thanks.

If you want to display a live waveform/spectrum while receiving data through
OSC, then I recommend that each packet is timestamped, so that you can
synchronize the graphics with audio output.

Also, if you don't need sample-level zooming in your waveform, you could send
peaks of blocks of a fixed size. Streaming the entire sample data through OSC
could be heavy IMO. Similarly, for the spectrum, you could compute it in the
engine, and send frequency peaks through OSC.

But for all that, you'll need accurate timestamps for each packet. Such accurate
timestamps can be tricky to produce. I made a small library for this purpose:
http://code.google.com/p/libtimefilter/

--
  Olivier
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Dec 27 16:15:02 2010

This archive was generated by hypermail 2.1.8 : Mon Dec 27 2010 - 16:15:02 EET