Re: [LAD] Scopes & RMS

From: Robin Gareus <robin@email-addr-hidden>
Date: Wed Dec 21 2011 - 17:22:48 EET

(sorry Harry, I missed to CC the list)
On 12/21/2011 03:29 AM, Harry van Haaren wrote:
> Hey all,
>
> I've been writing a scope the last while, and I'm intrested in how other
> people have approached plotting the data.

http://kokkinizita.linuxaudio.org/linuxaudio/downloads/yass-0.0.2.tar.bz2
or http://xoscope.sourceforge.net/

> Currently I'm taking every 50th sample, and drawing a line from the
> previous sample to there, and so on. Not particulary neat.
> So is there a resample, or smoothing of the samples, or how does one plot a
> "smooth" waveform like Ardour / QTractor?

IIRC ardour uses all audio samples and lets cairo do the scaling.

> My other question is about RMS, is calculating it in its literal sense
> best?

It depends on the use-case. A traditional analog scope does that. Well,
it is not true RMS but a low-pass filter.

>Or perhaps only taking every 5th sample?

Better take the min/max of all sample that fall on a single pixel on the
time-axis and draw a box (actually a vertical line if x is the time-axis).

> Resampling the signal from 44.1 or 48k to say 11025? I'm not really sure
> which way to go.
11025?

25 (fps) (or actually: screen update-freq aka vblank-frequency)
multiplied by the width of display in pixels is more appropriate.

Cheers!
robin
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Dec 21 20:15:01 2011

This archive was generated by hypermail 2.1.8 : Wed Dec 21 2011 - 20:15:02 EET