1
$\begingroup$

I'm new to DSP and was thinking of sampling in the traditional music creation way, in that you capture a sound and play it back, warp it, etc., but when I thought about the Nyquist theorem, I realized that can't be what's happening when sound is being captured.

If we treated a sound clip that is 1 second long as its own waveform, then it's 1Hz and according to Nyquist you'd have to capture it at least at 2Hz. That's only 2 snapshots for 1 second of sound.

What are those 2 snapshots capturing? Let's say it's 16 bits of depth. What can that combination of 1s and 0s capture exactly? I've caught that the bit depth determines how many dBs you have to work with (more range), but I'm a bit lost on the rest. Is it capturing a unique waveform tone? Is it specifically a Sine wave tone? Is it multiple tones? I'm having trouble picturing what's being sampled and how it's being accurately played back.

$\endgroup$
1
$\begingroup$

It might be better to think of Nyquist sampling as shooting fish in a bucket.

The bucket limits what is in the bucket by being only so large. This is like a band limit. We can only have so much variation.

Two samples is the very least number of samples we need to specify that 1 sec of 1 Hz sine wave, although intuition tells us we are on the edge. Three samples for a second and half is a safer proposition. How about 120 samples for 60 seconds of 1 Hz signal. If you look at the reconstruction formula for Nyquist sampling, it says you need a need an infinite number of samples to get that 1 Hz sine back. The summation limits are plus and minus infinity.

In practice, we usually sample a bit faster than what Nyquist specifies.

There are circumstances where one can sample less than what Nyquist tells us and there is a lot of activity in an area known as sparse sampling.

To be honest, this was a terrible analogy. The mathematics is really more straightforward. Things like mathematical limits are hard to analogize.

It also turns out that a 1Hz sine wave is also a mathematical ideal.

$\endgroup$
  • $\begingroup$ So do we hear specifically a single sine wave for each sample? $\endgroup$ – Aeggero Apr 5 at 1:08
  • $\begingroup$ I wouldn't say that. Cognition is not sampling, per se $\endgroup$ – Stanley Pawlukiewicz Apr 5 at 1:18
  • $\begingroup$ I mean is that the reality of the sample? It's captured as a sine wave? Like in a song clip. If you took one sample out of 44100 of a second, that would be a sine or can it be something else? $\endgroup$ – Aeggero Apr 5 at 1:22
  • $\begingroup$ A sample by itself doesn't say much $\endgroup$ – Stanley Pawlukiewicz Apr 5 at 1:24
  • $\begingroup$ Hmm, but it has one specific frequency? Not multiple? $\endgroup$ – Aeggero Apr 5 at 1:25
1
$\begingroup$

If your 1 second clip of sound is repeated continuously, then you have a periodic waveform having 1 Hz as it's fundamental frequency. But to capture the sound as we would hear it, it must be sampled a rate that exceeds twice of the highest frequency we can expect to hear. This is why you see 44100 Hz and 48000 Hz for music and maybe 8000 Hz for just voice.

So then your repeating second of sound is repeating the same 44100 samples each second and the fundamental frequency is still just 1 Hz. But there are other frequencies that are integer multiples of that 1 Hz. We call those "harmonics" or "overtones" So there is energy at 2 Hz, 3 Hz, 4 Hz, all the way up to 22050 Hz. But no higher.

$\endgroup$
  • $\begingroup$ Could I recreate a sound recording by causing a sine oscillator to play and change frequency at the sample rate of the recording? $\endgroup$ – Aeggero Apr 5 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.