Re: [linux-audio-dev] peakfiles and EDL's

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] peakfiles and EDL's
From: Paul Davis (pbd_AT_Op.Net)
Date: Tue Feb 27 2001 - 15:40:57 EET


>Well I'm pretty sure: if you take a sample each 2048 samples
>of a sample stream that was recorded at 44,1 kHz you would have
>a resulting sampling frequency for the peak data of about 20 Hz.
>I think this is pretty right, isn't it?

Well, yes, but notice that you said that the SF for the *peak data* is
20Hz. Thats not the same thing at all as saying the SF for the
original audio signal was 20Hz.

>Here the sampling frequency is only the double of the
>sampled singnal frequency, you already can't tell anymore
>if it's a sin wave or a square wave:
>
>.. . . . . .
>
> . . . . . .

But thats not what's proposed. You're talking about traditional
sampling of an acoustic pressure wave or analog signal. In this case,
we are doing computational determination of the peaks. At the
resolutions we're talking about for peakfiles, we're not trying to see
the waveform, we're trying to see the amplitude curve for the sound.

>If you take only min/max peak data, the peak data does not neccessarily
>correspond with the 'loudness' of the input singnal. One single
>sample, maybe a glitch, would trigger a whole block of 2048 samples
>at maximum volume. Maybe you want this, maybe not.

You do want this. As Jarno pointed out, one of the primary purposes of
viewing the waveform is to see areas that clip. The fact that 2047 of
the 2048 samples are not clipping is not as important as the fact that
1 is. Consider the extreme case: 2047 zero values and one that
clips. What you will hear from that 0.04secs (at 48kHz) of audio is a
loud click. What do you want to see on your screen ?

>I don't understand why you take min AND max peak data - for usual
>audio singnals sampled without an DC offset they would be almost
>the same (except for the sign), wouldn't they?

Because you're displaying the entire block of 2048 samples with a
single x coordinate. No, there is reason for the max/min to be the
same, and you want to display both.

>I also think 2048 is resonable. And maybe whatever downsampling algorithm
>you coose, you won't get representative peak data values anyway, because
>each of those peak value would have to speak for 2048 wildly spread
>data values. A hard job I think :)

the min/max values are not representative of the 2048 samples,
sure. but thats not the point. when you stick the successive max/min
values together on a screen, you end up with something that is a good
visual approximation to the perceived amplitude signal. and *thats*
what's important here. Fidelity to the exact sample data matters only
at high resolution, and there, we use the sample data anyway (though
still peak-sampled, just at a ratio of peaks/sample that works with
the specific values).

--p


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Feb 27 2001 - 16:06:52 EET