DSPRelated.com
Forums

Regarding sampling.

Started by Ted January 4, 2007
Jerry Avins wrote:

> glen herrmannsfeldt wrote: > >> Jerry Avins wrote: >> >>> glen herrmannsfeldt wrote:
(snip)
>>>> Not too far off. As I understand it, the highest key on the piano >>>> is around 5kHz, and that isn't used all that often. Even with >>>> harmonics, you won't find much above 8.82kHz. It is one of the reasons >>>> digital audio works as well as it does.
(snip)
>>> Forget piano or any other instrument. What is the frequency range that a >>> 44.1 KHz CD can reproduce? There is a spec, and most CDs meet it.
>> I used to read stories about audiophiles who hated the non-musical >> sound of digital audio, and especially CDs. There was for a while >> renewed interest in direct to disk vinyl records to avoid that >> effect. (And also vacuum tube amplifiers.)
> I never heard of those perceived shortcomings being substantiated on > blind tests.
Many tests are not easy to do. Comparing two CD players requires that they be synchronized very closely, or one can detect the time difference.
>> I might believe that with some kinds of pure test tones one could hear >> the remaining non-linearities in the filters of CD players. I have >> a much harder time believing it for musical signals.
> I don't understand it. What is the relation between the highest > fundamental that a piano can produce and the highest frequency that a CD > can reproduce?
Not that it can produce, but that it needs to produce to sound good to listeners.
> For the low piano strings, seventh and eleventh harmonics, if not > suppressed, contribute to "roughness" in the note. It's nearly > impossible to make a struck string that displays fewer than five > overtones. Neither vinyl nor CD reproduce all the overtones of upper > piano strings. That's OK because we can't hear them anyhow.
I might believe, though without any proof, that the designers of the CD standard knew about the power spectrum of musical sounds. That if music had a large amount of power in the 19kHz to 20kHz range relative to that in the 2kHz to 3kHz range that the standard would have been different. Of all the audio recording systems, the CD is the one with the least obvious consideration of audio signals. Preemphasis is used on vinyl records, FM radio, and most (or all) audio analog magnetic tape systems. Dolby is somewhat dependent on the power and noise spectrum for its noise reduction systems. Digital audio compression systems have a strong dependence on the power spectrum and the ability to hear parts of it. The ease of building CD players seems to have been important. One decision I still find amazing is the 99 track limit. Track numbers are stored in BCD instead of binary to simplify the decoding in CD players track displays. It doesn't take so much logic to convert 8 bit binary to BCD, but it seems the CD player designers thought it was too much.
Carlos Moreno wrote:
> > You should normally use a much higher sampling frequency > > (let's say five times or more the highest frequency of your wave). > > This is ridiculous --- is 44.1 kHz five times the bandwidth of the > audio signals on CDs?
44.1 kHz is the data rate. Most high quality audio equipment uses a much higher sampling rate, via decimation down to and interpolation up from the 44.1 * 2 samples per second on an red book CD (plus ECC, etc.). Even my cheap CD player, I think, says 8X oversampling on the box. Cheap attempts at building brick wall filters can really muck up higher frequency transient responses. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Ron N. wrote:

(snip)
> 44.1 kHz is the data rate. Most high quality audio equipment > uses a much higher sampling rate, via decimation down to > and interpolation up from the 44.1 * 2 samples per second > on an red book CD (plus ECC, etc.). Even my cheap CD > player, I think, says 8X oversampling on the box.
As far as I know, that wasn't part of the original CD design.
> Cheap attempts at building brick wall filters can really muck > up higher frequency transient responses.
This should have been known to the designers, and considered at the time. -- glen
glen herrmannsfeldt wrote:
> Jerry Avins wrote:
...
>> What is the relation between the highest >> fundamental that a piano can produce and the highest frequency that a >> CD can reproduce? > > Not that it can produce, but that it needs to produce to sound > good to listeners.
The highest fundamental of a piano is less than 5 KHz. The highest piano overtone than can typically be heard -- not by me, alas -- is a few octaves above that. "Needs to produce to sound good" is not necessarily the same as "needs to produce to sound like a piano".
>> For the low piano strings, seventh and eleventh harmonics, if not >> suppressed, contribute to "roughness" in the note. It's nearly >> impossible to make a struck string that displays fewer than five >> overtones. Neither vinyl nor CD reproduce all the overtones of upper >> piano strings. That's OK because we can't hear them anyhow. > > I might believe, though without any proof, that the designers of the > CD standard knew about the power spectrum of musical sounds. That > if music had a large amount of power in the 19kHz to 20kHz range > relative to that in the 2kHz to 3kHz range that the standard would > have been different. > > Of all the audio recording systems, the CD is the one with the least > obvious consideration of audio signals. Preemphasis is used on > vinyl records, FM radio, and most (or all) audio analog magnetic > tape systems. Dolby is somewhat dependent on the power and noise > spectrum for its noise reduction systems. Digital audio compression > systems have a strong dependence on the power spectrum and the > ability to hear parts of it.
Preemphasis and Dolby are ways to diminish the effects of analog noise. Only quantization noise shows up on digital media -- CD and DAT -- and other means are used to control it.
> The ease of building CD players seems to have been important. One > decision I still find amazing is the 99 track limit. Track numbers > are stored in BCD instead of binary to simplify the decoding in > CD players track displays. It doesn't take so much logic to > convert 8 bit binary to BCD, but it seems the CD player designers > thought it was too much.
Yeah; dumb. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Ron N. wrote:
> Carlos Moreno wrote: >>> You should normally use a much higher sampling frequency >>> (let's say five times or more the highest frequency of your wave). >> This is ridiculous --- is 44.1 kHz five times the bandwidth of the >> audio signals on CDs? > > 44.1 kHz is the data rate. Most high quality audio equipment > uses a much higher sampling rate, via decimation down to > and interpolation up from the 44.1 * 2 samples per second > on an red book CD (plus ECC, etc.). Even my cheap CD > player, I think, says 8X oversampling on the box.
Where do you get the 8X oversampled CDs to play? :-)
> Cheap attempts at building brick wall filters can really muck > up higher frequency transient responses.
That may be why your player claims 8X. Do they upsample to make filtering easier? But how could they upsample without filtering first? "Is a puzzlement" Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Ron N. wrote:
> Carlos Moreno wrote: > > > You should normally use a much higher sampling frequency > > > (let's say five times or more the highest frequency of your wave). > > > > This is ridiculous --- is 44.1 kHz five times the bandwidth of the > > audio signals on CDs? > > 44.1 kHz is the data rate.
the data rate (before the redundancy in coding for error-correction or concealment) is 16 x 2 x 44100 bits/second. CDs can conceivably have any components up to, but not including, 22.05 kHz. i dunno how any components above 20 kHz would come out.
> Most high quality audio equipment > uses a much higher sampling rate, via decimation down to > and interpolation up from the 44.1 * 2 samples per second > on an red book CD (plus ECC, etc.).
> Even my cheap CD > player, I think, says 8X oversampling on the box.
ONLY 8X oversampling?? all of the cheap sigma-delta chips have higher oversampling than that. you MUST have higher oversampling than 8X for decent 1-bit D/A and any cheap CD player is using off-the-shelf 1-bit D/A converters, no? (they are oversampling by 64x or 128x, i think.)
> Cheap attempts at building brick wall filters can really muck > up higher frequency transient responses.
oh, yeah. but you gotta oversample more than 8x to do decent digital brickwall filtering and expect a passive RC filter to take care of the analog filtering (and eliminate the images at 128x and above). r b-j

robert bristow-johnson wrote:


>> Even my cheap CD >>player, I think, says 8X oversampling on the box. >
Apparently it has to do with the 8x speed CD-R which it is capable of playing.
> ONLY 8X oversampling?? all of the cheap sigma-delta chips have higher > oversampling than that. you MUST have higher oversampling than 8X for > decent 1-bit D/A and any cheap CD player is using off-the-shelf 1-bit > D/A converters, no? (they are oversampling by 64x or 128x, i think.)
Today it would be difficult to find the 1-bit audio delta-sigma; the most common is the 4-bit architecture. As for the oversampling, you are correct: x64 or x128 is typical.
>>Cheap attempts at building brick wall filters can really muck >>up higher frequency transient responses. > > > oh, yeah. but you gotta oversample more than 8x to do decent digital > brickwall filtering and expect a passive RC filter to take care of the > analog filtering (and eliminate the images at 128x and above).
This is actually an interesting question. The passive 1-st order RC should have a cutoff at about 30kHz. The 128x oversampling will result in the alias attenuation of ~40dB. In addition to that, there will be a lot of noise shaping residual in the near ultrasound, that's why the simple RC is not adequate. VLV
robert bristow-johnson wrote:

   ...

> ONLY 8X oversampling?? all of the cheap sigma-delta chips have higher > oversampling than that. you MUST have higher oversampling than 8X for > decent 1-bit D/A and any cheap CD player is using off-the-shelf 1-bit > D/A converters, no? (they are oversampling by 64x or 128x, i think.)
Maybe they use more than 1 bit in the D/A? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Ron N. wrote:
> Carlos Moreno wrote: > >>>You should normally use a much higher sampling frequency >>>(let's say five times or more the highest frequency of your wave). >> >>This is ridiculous --- is 44.1 kHz five times the bandwidth of the >>audio signals on CDs? > > 44.1 kHz is the data rate.
Err, no. 44.1 kHz is the *sampling frequency* ... Hz measure frequency; bytes/sec or bits/sec measure data rate.
> Most high quality audio equipment > uses a much higher sampling rate, via decimation down to > and interpolation up from the 44.1 * 2 samples per second > on an red book CD (plus ECC, etc.). Even my cheap CD > player, I think, says 8X oversampling on the box.
This is entirely irrelevant to my comment/complaint about the previous post. The sampling frequency remains 44.1 kHz --- what you describe is an *implementation detail* about the reconstruction filter; you are indeed building a brick wall low-pass filter; it's just that you're doing it in the discrete-time domain, by doing the oversampling filtering. Then, the analog part that completes the process can be cheap yet work very nicely. Unless you're talking about the recording and production equipment, which I guess use much higher sampling rate and finer quantization --- e.g., 24-bit or 32-bit sampling, maybe? But then, it is still irrelevant, in that *the CD* contains audio sampled at 44.1 kHz, which is nowhere near five times or more the frequencies being reproduced --- how did that data came to be in the CD is entirely another issue. Carlos --
Carlos Moreno wrote:
> Ron N. wrote: > > Carlos Moreno wrote: > > > >>>You should normally use a much higher sampling frequency > >>>(let's say five times or more the highest frequency of your wave). > >> > >>This is ridiculous --- is 44.1 kHz five times the bandwidth of the > >>audio signals on CDs? > > > > 44.1 kHz is the data rate. > > Err, no. 44.1 kHz is the *sampling frequency* ... Hz measure > frequency; bytes/sec or bits/sec measure data rate.
No, the audio data does not have to be sampled at a frequency of 44.1 kHz. The 44.1 number is related to the data on the CD and how much of it needs to be streamed per second for real time playback. See below for your own comments:
> Unless you're talking about the recording and production > equipment, which I guess use much higher sampling rate and > finer quantization --- e.g., 24-bit or 32-bit sampling, maybe?
Yes.
> But then, it is still irrelevant, in that *the CD* contains > audio sampled at 44.1 kHz, which is nowhere near five times > or more the frequencies being reproduced --- how did that > data came to be in the CD is entirely another issue.
The CD does not contain the data from the sampler, it contains some processed data from potentially a very different sample rate, which might be played back at yet another sample rate. These days, it might be better to think of the data on an audio CD as a fixed rate compression format, which is usually seriously processed in the digital domain (maybe not as much as mp3) for input and output. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M