You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: multimedia_introduction/2_AudioProcessing.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,15 +59,19 @@ Representing raw sounds in this way is called Pulse Code Modulation (PCM) and he
59
59
60
60
Notice that to capture a sound with a given frequency we need a sampling rate that's at least double that frequency to account for both the peaks and the throughs in the wave.
61
61
62
-
(It's actually more complicated and involves [math](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem))
62
+
(It's actually more complicated and involves some [math](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem))
63
63
64
-
As most human speech is below 4kHz an `8kHz` sampling rate is usually used to register it (for example in GSM). `44.1kHz` or `48kHz` is used for standard quality audio as this is sufficient to cover the human hearing range and `96kHz` is used for high-quality audio.
64
+
As most human speech is below 4kHz an `8kHz` sampling rate is usually used to register it (that is the cas, for instance, in GSM). `44.1kHz` or `48kHz` is used for standard quality audio as this is sufficient to cover the human hearing range and `96kHz` is used for high-quality audio.
65
65
66
-
TODO: how do I tie this in?
66
+
When it comes to sampling, a problem called 'aliasing' occurs.
67
+
Imagine, that you are about to sample with `f_s` frequency. If so, you cannot distinguish between the harmonic signal of frequency `f_0` from the signal of frequency (`f_0+k*f_s`), where k is a integer.
68
+
Such a situation is shown on the picture below:
69
+

67
70
68
-
>In addition, signals must be low-pass filtered before sampling to avoid aliasing. While an ideal low-pass filter would perfectly pass frequencies below 20 kHz (without attenuating them) and perfectly cut off frequencies above 20 kHz, such an ideal filter is theoretically and practically impossible to implement as it is noncausal, so in practice, a transition band is necessary, where frequencies are partly attenuated. The wider this transition band is, the easier and more economical it is to make an anti-aliasing filter. The 44.1 kHz sampling frequency allows for a 2.05 kHz transition band.
69
-
70
-
A nice example of aliasing
71
+
While sampling in points marked as black dots, we can interpolate both the blue (the original harmonic wave) and the red (so called "alias") sin-waves through these points.
72
+
As you can see, aliasing introduces some additional harmonic waves to our description of sound, with frequencies higher then the original ones.
73
+
That is why signals must be low-pass filtered before sampling to avoid that problem. While an ideal low-pass filter would perfectly pass frequencies below 20 kHz (without attenuating them) and perfectly cut off frequencies above 20 kHz, such an ideal filter is theoretically and practically impossible to implement as it is noncausal, so in practice, a transition band is necessary, where frequencies are partly attenuated. The wider this transition band is, the easier and more economical it is to make an anti-aliasing filter. The 44.1 kHz sampling frequency allows for a 2.05 kHz transition band.
74
+
Below you can find out more about the nature of aliasing:
0 commit comments