Re: [LAD] Real-time plotting of audio/ oscilloscope.

From: Jeremy <jeremybubs@email-addr-hidden>
Date: Thu Jun 17 2010 - 20:37:36 EEST

On Thu, Jun 17, 2010 at 10:41 AM, <fons@email-addr-hidden> wrote:

> On Thu, Jun 17, 2010 at 04:09:08AM -0400, Jeremy wrote:
>
> > Yes, I'll bet that's my problem. Is it because writing to the screen is
> high
> > bandwidth but high latency? Or is it just not possible to draw anywhere
> > near every sample?
>
> Plotting a waveform with 48kHz samples per second is not that
> difficult and it doesn't require HW acceleration or esoteric
> hardware.
>
> But *what* do you want to see ? Of one thing you can be sure:
> the information contained in 48k samples per second will
> overload the visual parts of your brain. If the waveform
> is more or less cyclic for some time, you can set a trigger
> level and display small fragments - that is what a scope
> is doing. In the other case the only thing that makes much
> sense is display longer fragments, and then the only info
> you get from this the amplitude envelope.
>
> Ciao,
>
> --
> FA
>
> O tu, che porte, correndo si ?
> E guerra e morte !
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@email-addr-hidden
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
>

Well I'm interested in plotting two things:

1. A single buffer of the audio
2. The autocorrelation (and selected peak) of that same buffer.

This means about a thousand samples per window (although the goal is to
increase it). I'm only looking at periodic signals, or at least that's all
I care about, so I can change the frequency until it's a harmonic of the
buffer size. On the other hand, the autocorrelation is almost constant, so
that is also interpretable by me, even when refresh rate.

Now, assuming a 60 Hz refresh rate (which is what I believe my monitor has),
and a buffer size of 1024 pixels, that would be a throughput of 61440
samples per second. More than the 48000 sampling rate. So it seems that
drawing every sample *is* a reasonable request. But obviously a lower
refresh rate would also satisfy my needs.

Thanks everyone for the suggestions of programs to look at. It looks like
I'm going to separate the drawing into another thread, although I am a
little bit confused as to why that is necessary. I'll probably copy
something from jack.scope or meterscape, as they seem closest to what I
want.

Jeremy

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Fri Jun 18 00:15:01 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 18 2010 - 00:15:01 EEST