Talk:Homework: Sampling: A class review: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
Could you please expand on this as I don't understand what additional processing is needed to output a waveform once you have the sampled values. When we did our embedded project we sampled data in, then simply repeated the data back out the DAC. |
Could you please expand on this as I don't understand what additional processing is needed to output a waveform once you have the sampled values. When we did our embedded project we sampled data in, then simply repeated the data back out the DAC. |
||
Thanks Chris. As you remember, we did put the sampled data right back out on the DAC. However, that information could have been filtered to smooth out the signal by averaging two consecutive samples, like we did in class. I'm not sure how that would come out audibly, but I'm pretty sure it would be better. |
|||
Here is a quote from mathworld.wolfram.com summarizing the Shannon-Nyquist Sampling Theorem. |
|||
''In order for a band-limited (i.e., one with a zero power spectrum for frequencies nu>B) baseband (nu>0) signal to be reconstructed fully, it must be sampled at a rate nu>=2B. A signal sampled at nu==2B is said to be Nyquist sampled, and nu==2B is called the Nyquist frequency. '''No information is lost if a signal is sampled at the Nyquist frequency''', and no additional information is gained by sampling faster than this rate.'' |
|||
Averaging two sample points would simply act as a low-pass filter. I've applied this to a recorded song to demonstrate. |
|||
Here's the code I used. |
|||
<code> |
|||
y = wavread('\\skynet.local\StudentsHome\chris.rasmussen\My Documents\ICanSeeClearlyNow.wav') |
|||
windowSize = 10; |
|||
yy = filter(ones(1,windowSize)/windowSize,1,y); |
|||
clear y |
|||
wavwrite(yy,44100,16,'\\skynet.local\StudentsHome\chris.rasmussen\My Documents\ICanSeeClearlyNowSmooth15.wav') |
|||
clear all |
|||
</code> |
Latest revision as of 23:28, 5 November 2007
I'm curious about the last sentence in your article "Once these values are recorded, there is alot more processing that is required to restore it to the original signal - at least close enough to the real thing that you can't hear the difference."
Could you please expand on this as I don't understand what additional processing is needed to output a waveform once you have the sampled values. When we did our embedded project we sampled data in, then simply repeated the data back out the DAC.
Thanks Chris. As you remember, we did put the sampled data right back out on the DAC. However, that information could have been filtered to smooth out the signal by averaging two consecutive samples, like we did in class. I'm not sure how that would come out audibly, but I'm pretty sure it would be better.
Here is a quote from mathworld.wolfram.com summarizing the Shannon-Nyquist Sampling Theorem.
In order for a band-limited (i.e., one with a zero power spectrum for frequencies nu>B) baseband (nu>0) signal to be reconstructed fully, it must be sampled at a rate nu>=2B. A signal sampled at nu==2B is said to be Nyquist sampled, and nu==2B is called the Nyquist frequency. No information is lost if a signal is sampled at the Nyquist frequency, and no additional information is gained by sampling faster than this rate.
Averaging two sample points would simply act as a low-pass filter. I've applied this to a recorded song to demonstrate.
Here's the code I used.
y = wavread('\\skynet.local\StudentsHome\chris.rasmussen\My Documents\ICanSeeClearlyNow.wav')
windowSize = 10;
yy = filter(ones(1,windowSize)/windowSize,1,y);
clear y
wavwrite(yy,44100,16,'\\skynet.local\StudentsHome\chris.rasmussen\My Documents\ICanSeeClearlyNowSmooth15.wav')
clear all