# Sampling

Started by June 24, 2013
```Somebody just told me something I cannot accept. That the usual sampling theorem doesn't work too well when there are fast moving transients in a signal. To me this means that you are just not sampling fast enough ie the higher harmonics are not being captured. Is this one of those Hi-Fi myths that when you sample an audio signal at say 48kHz that it won't catch the cymbals in an orchestra or band?
```
```On Mon, 24 Jun 2013 13:47:58 -0700 (PDT), gyansorova@gmail.com wrote:

>Somebody just told me something I cannot accept. That the usual sampling th=
>eorem doesn't work too well when there are fast moving transients in a sign=
>al. To me this means that you are just not sampling fast enough ie the high=
>er harmonics are not being captured. Is this one of those Hi-Fi myths that =
>when you sample an audio signal at say 48kHz that it won't catch the cymbal=
>s in an orchestra or band?

A "fast moving transient", if I understand correctly, implies high
frequencies.   The usual sampling theorem takes into account the
spectral content of the signal, so if there are "high" frequencies due
to transients they either need to be removed by the anti-alias filter
or the sampling rate adjusted to include them.

There's no problem with the sampling theorem, just some people's
understanding of what "fast moving transient" means in the context of
the bandlimiting requirements of the  theorem.

Eric Jacobsen
Anchor Hill Communications
http://www.anchorhill.com
```
```On 6/24/13 1:47 PM, gyansorova@gmail.com wrote:
> Somebody just told me something I cannot accept. That the usual sampling theorem doesn't work too well when there are fast moving transients in a signal. To me this means that you are just not sampling fast enough ie the higher harmonics are not being captured. Is this one of those Hi-Fi myths that when you sample an audio signal at say 48kHz that it won't catch the cymbals in an orchestra or band?

probably.  there is content above 24 kHz coming outa a cymbal.  the
question is whether or not we can hear that content above 24 kHz (or
even 20 kHz).

an experiment that someone with a really high quality audio recording
environment (like a modern version of Pro Tools) and something to
manipulate data analytically (say MATLAB) would be to *record* the
cymbal or music with a cymbal and all sorts of other percussion (like an
orchestra) directly with very expensive B&K microphones and mic preamps
( http://www.bksv.com/products/transducers/acoustic/microphones.aspx )
sample at 192 kHz (4 times the normal), save the data as a WAV file and
open it into a MATLAB program (with audioread or wavread).

you can confirm, by windowing long segments and FFTing, that there is
content in there above 24 kHz (perhaps as high as 95.9 kHz).  then,
using a nice long FIR optimally designed using firpm or firls,
obliterate all of the energy above 22 kHz (say, down by 120 dB) while
leaving the content below 20 kHz unchanged (say the passband ripple is
0.01 dB for most, nearly all of it below 20 kHz).

then play that sound back at the same 192 kHz and compare to the
original 192 kHz recording.  if someone suggests they can hear the
difference between the brickwall LPFed music and the original, it's time
to do some blind or double-blind testing where they have to identify
changed recordings among true pairs (where one is LPFed and the other
not) and false pairs (where both are identical).

run this test for several pairs of audio recordings.  for each subject
(with golden ears), subtract the number of false positive from true
positives and do the same with the false negatives and true negatives.
add the two differences together which would be the net number of trials
or "guesses" that the listener got right (minus the number he/she got
wrong).  let there be an equal number of pairs with true differences as
with pairs with no difference (and the listener doesn't know which is
which and, in fact, must tell us which is which), if the listener gets a
net score well above zero, it means that he/she can really hear the
difference (or is a very lucky guesser).  if it's around zero, it means
he/she is guessing (and any claims that he/she can hear the difference
is disproven) and if it's significantly below zero, either the listener
is very unlucky in his/her guessing or perhaps the listener *can* hear a
difference and is deliberately answering the question exactly wrong.

i really don't think there are many people, if any at all, that can hear
the difference between this full bandwidth audio (with bandwidth up to
96 kHz) and the same audio where everything above 22 kHz is fully
removed (and *only* that audio above 22 kHz is removed).  i would be a
skeptic, but what i described above is how i would decide.

--

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."

```
```>Somebody just told me something I cannot accept. That the usual sampling
th=
>eorem doesn't work too well when there are fast moving transients in a
sign=
>al. To me this means that you are just not sampling fast enough ie the
high=
>er harmonics are not being captured. Is this one of those Hi-Fi myths that
=
>when you sample an audio signal at say 48kHz that it won't catch the
cymbal=
>s in an orchestra or band?
>

I'm sure he/she meant to say that 'sampling' doesn't work too well when
there are fast moving transients, and that the sampling theorem does a good
job of explaining why.

_____________________________
Posted through www.DSPRelated.com
```
```On Mon, 24 Jun 2013 17:39:18 -0500, "dszabo" <62466@dsprelated> wrote:

>>Somebody just told me something I cannot accept. That the usual sampling
>th=
>>eorem doesn't work too well when there are fast moving transients in a
>sign=
>>al. To me this means that you are just not sampling fast enough ie the
>high=
>>er harmonics are not being captured. Is this one of those Hi-Fi myths that
>=
>>when you sample an audio signal at say 48kHz that it won't catch the
>cymbal=
>>s in an orchestra or band?
>>
>
>I'm sure he/she meant to say that 'sampling' doesn't work too well when
>there are fast moving transients, and that the sampling theorem does a good
>job of explaining why.
>
>_____________________________
>Posted through www.DSPRelated.com

Nicely put.

Eric Jacobsen
Anchor Hill Communications
http://www.anchorhill.com
```
```On Mon, 24 Jun 2013 14:24:10 -0700, robert bristow-johnson wrote:

> On 6/24/13 1:47 PM, gyansorova@gmail.com wrote:
>> Somebody just told me something I cannot accept. That the usual
>> sampling theorem doesn't work too well when there are fast moving
>> transients in a signal. To me this means that you are just not sampling
>> fast enough ie the higher harmonics are not being captured. Is this one
>> of those Hi-Fi myths that when you sample an audio signal at say 48kHz
>> that it won't catch the cymbals in an orchestra or band?
>
> probably.  there is content above 24 kHz coming outa a cymbal.  the
> question is whether or not we can hear that content above 24 kHz (or
> even 20 kHz).
>
> an experiment that someone with a really high quality audio recording
> environment (like a modern version of Pro Tools) and something to
> manipulate data analytically (say MATLAB) would be to *record* the
> cymbal or music with a cymbal and all sorts of other percussion (like an
> orchestra) directly with very expensive B&K microphones and mic preamps
> ( http://www.bksv.com/products/transducers/acoustic/microphones.aspx )
> sample at 192 kHz (4 times the normal), save the data as a WAV file and
> open it into a MATLAB program (with audioread or wavread).
>
> you can confirm, by windowing long segments and FFTing, that there is
> content in there above 24 kHz (perhaps as high as 95.9 kHz).  then,
> using a nice long FIR optimally designed using firpm or firls,
> obliterate all of the energy above 22 kHz (say, down by 120 dB) while
> leaving the content below 20 kHz unchanged (say the passband ripple is
> 0.01 dB for most, nearly all of it below 20 kHz).
>
> then play that sound back at the same 192 kHz and compare to the
> original 192 kHz recording.  if someone suggests they can hear the
> difference between the brickwall LPFed music and the original, it's time
> to do some blind or double-blind testing where they have to identify
> changed recordings among true pairs (where one is LPFed and the other
> not) and false pairs (where both are identical).
>
> run this test for several pairs of audio recordings.  for each subject
> (with golden ears), subtract the number of false positive from true
> positives and do the same with the false negatives and true negatives.
> add the two differences together which would be the net number of trials
> or "guesses" that the listener got right (minus the number he/she got
> wrong).  let there be an equal number of pairs with true differences as
> with pairs with no difference (and the listener doesn't know which is
> which and, in fact, must tell us which is which), if the listener gets a
> net score well above zero, it means that he/she can really hear the
> difference (or is a very lucky guesser).  if it's around zero, it means
> he/she is guessing (and any claims that he/she can hear the difference
> is disproven) and if it's significantly below zero, either the listener
> is very unlucky in his/her guessing or perhaps the listener *can* hear a
> difference and is deliberately answering the question exactly wrong.
>
> i really don't think there are many people, if any at all, that can hear
> the difference between this full bandwidth audio (with bandwidth up to
> 96 kHz) and the same audio where everything above 22 kHz is fully
> removed (and *only* that audio above 22 kHz is removed).  i would be a
> skeptic, but what i described above is how i would decide.

Double blind testing of audio equipment is bunk:
http://www.avguide.com/forums/blind-listening-tests-are-flawed-editorial

And be sure to dip your power cords in LN2:
http://www.jenalabs.com/ac-products/powercords.html

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

```
```Tim Wescott <tim@seemywebsite.really> writes:
> [...]
> And be sure to dip your power cords in LN2:
> http://www.jenalabs.com/ac-products/powercords.html

Only \$500!
--
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com
```
```On 6/24/13 4:46 PM, Tim Wescott wrote:
>
>
> And be sure to dip your power cords in LN2:
> http://www.jenalabs.com/ac-products/powercords.html
>

how do my power chords (like a gratifying slam on E major) make use of
the natural logarithm of 2?

it's gotta be something related to octaves.

--

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."

```
```I've noticed that when I walk into a building where music is playing, I can always tell instantly when it's live music, and the sound of real cymbals is what gives it away. But I don't think this is due to wider bandwidth. My theory is that the spatial radiation pattern of the cymbals is different from all the other sound sources. If the cymbal were played back over speakers it would get the same radiation pattern as everything else, and you would hear the difference.
```
```Am 25.06.13 06:33, schrieb radams2000@gmail.com:
> I've noticed that when I walk into a building where music is playing,
> I can always tell instantly when it's live music

I have this impression, too, that I can distinguish live music from
playback.

, and the sound of
> real cymbals is what gives it away. But I don't think this is due to
> wider bandwidth. My theory is that the spatial radiation pattern of
> the cymbals is different from all the other sound sources. If the
> cymbal were played back over speakers it would get the same radiation
> pattern as everything else, and you would hear the difference.
>

My explanation is the dynamic range compression that every commercial
recording does. When you ever tried recording something yourself and
then played it back, you wonder why it sounds soooo thin in comparison
to a studio recording. The biggest answer is dynamic compression, nicely
explained here: