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
Tutorial 2: Sampling a Waveform in the Time Domain
34
34
</H1>
35
35
<hr>
36
36
</div>
37
37
38
38
<divid="Question" class="tabcontent active">
39
39
<divclass = "qs">
40
40
<p>
41
-
In the left panel, you can see a sine wave with frequency 440 Hz.
42
-
Click on the Play Original button at the bottom left to hear how it sounds.
41
+
In the top panel, you can see a sine wave with frequency 440 Hz. Like in the previous tutorial,
42
+
you can hear the sound by clicking on "play original" at the bottom of the page.
43
43
</p>
44
44
<p>
45
-
In the right panel, a vertical line at 440 Hz represents the sine wave frequency component.
46
-
Remember that a sine (or a cosine) wave has only one frequency component,
47
-
in other words, it represents a <u>simple harmonic motion</u> such as the motion of an ideal pendulum or a tuning fork.
45
+
As seen in the slides for class 1, the input signal would be some kind of continuous signal, whether analogue or acoustic and would be captured either directly or by a microphone. In this case it is a sinusoidal waveform.
46
+
Before the continuous signal can be converted into a set of 0's and 1's, it must be sampled. A simple one-dimensional sampling system would be represented with equation: y[n] = x(nT<sub>s</sub>)
47
+
</p>
48
+
<p>
49
+
The middle panel represents said sampling signal (impulse train) that will poll the input x at time [n].
50
+
</p>
51
+
<p>
52
+
The bottom panel shows the resulting samples with amplitudes corresponding to the polled input signal.
add 10 components (harmonics) to the original sine wave.
61
-
You can get the same effect by typing 10 in the top right
62
-
box and pressing the Update button. Describe what happens
63
-
in the left panel.
64
+
Let's get to know the panels, bring the zoom to 300% and start to reduce the sample rate to its minimum. What changes in panels 2 and 3?
64
65
</div>
65
66
<divid = "q2" class = "tab_questions_content qs">
66
-
If you add more components (say, 20), what do you see happening in the left panel?
67
+
Now type into the input signal frequency 150 Hz, press update and resize the zoom until you see at least one full cycle of the input signal. How many samples do you get in each period?
68
+
Now double the input signal frequency. How many samples do you get per period?
67
69
</div>
68
70
<divid = "q3" class = "tab_questions_content qs">
69
-
Now, what do you see when using 20 harmonics and changing the amplitude values to 1/x2?
71
+
Keep the sampling rate at 3 kHz (Nyquist Rate) and set the input signal frequency to 1.5 kHz at the Nyquist Frequency. How many samples per period do you see and where are they? What would the resulting sound look like? By moving the phase slider, what happens to the samples?
72
+
What would the resulting sound look like?
70
73
</div>
71
74
<divid = "q4" class = "tab_questions_content qs">
72
-
If you go back to 1/x, change Odd to All, and press the Update button, what happens? Remember that now your highest frequency will be half of the one with only Odd harmonics.
73
-
To get a similar maximum frequency value you’ll need to add 40 harmonics in this case.
75
+
Now, bypass the Nyquist Frequency to 2700 Hz whilst keeping the sampling rate at 3000 Hz, what do you notice? Can you tell what the resulting frequency.
76
+
</div>
77
+
<divid = "q5" class = "tab_questions_content qs">
78
+
Now set the input signal frequency to 750 and the number of harmonics to two.
79
+
With the sampling rate at 3000 Hz, do you notice something in how the input signal is being sampled?
74
80
</div>
75
81
<main>
76
82
<script>
@@ -96,37 +102,41 @@ <H1>
96
102
</div>
97
103
<divid="Answer" class="tabcontent">
98
104
<p>
99
-
You have just played with approximations of the most
100
-
common waves used in analog syntehsizers: square, triangular, and sawtooth waves.
101
-
102
-
</p>
103
-
<center><imgsrc="../images/SH_101.png"></center>
104
-
<p>
105
+
These were the core concepts on how a signal is sampled.
105
106
<ul>
106
107
<li>
107
-
Click again on the Play Original button at the bottom left to hear how they sound. Add and remove
108
-
partials and check the resulting visuals and sounds.
108
+
Question 1 demonstrates the sampling of a sine wave.
109
+
</li>
110
+
<li>
111
+
Question 2 prepares the user for the concept of input signals that are multiples of the sampling rate.
112
+
</li>
113
+
<li>
114
+
Question 3 further the idea of Q.2. and presents the concept of the Nyquist Frequency. What happens to the signal as it approaches
115
+
it and how the phase of the signal can change the outcome in the creation of DC signals.
116
+
</li>
117
+
<li>
118
+
Question 4 introduces the idea of signal folding when bypassing the Nyquist frequency.
109
119
</li>
110
-
</ul>
111
-
</p>
112
-
<p>
113
-
You can also play with these variable and see the results in both panels and hear the results.
114
-
</p>
115
-
<p>
116
-
<ul>
117
120
<li>
118
-
For instance, describe what do you hear when using 20 Even harmonics with flat amplitude?
119
-
Compare the sonic result to using 20 Odd harmonics and flat amplitude.
121
+
Finally Question 5 introduces the idea that such concepts not only affect the base harmonic of a signal but also its nth harmonics.
122
+
Something that must be taken into account as many sounds contain frequencies above the sampling range and this must be filtered out to prevent ghosting.
120
123
</li>
121
-
</ul>
124
+
</ul>
122
125
</p>
126
+
<!-- Q1 demonstrates how the sinwave is being sampled -->
127
+
<!-- Q2 prepares the user for the concept of input signals that are multiples of the sampling rate -->
128
+
<!-- Q3 Presents the concept of the Nyquist Frequency, what happens to the signal as it approaches
129
+
it and how the phase of the signal can change the outcome. Also the concepts of a DC signal -->
130
+
<!-- Q4 Introduces the idea of signal folding when bypassing the nyquist frequency -->
131
+
<!-- Q5 Introduces the idea that such concepts not only affects the base harmonic of a signal but also it's nth harmonics.
132
+
Something that must be taken into account as many sounds contain frequencies above the sampling range and this must be filtered out to prevent ghosting.-->
123
133
</div>
124
134
</div>
125
-
<footer>
135
+
<!-- <footer>
126
136
<div>Digital Audio Workbench Tutorial, by Maxwell Gentili-Morin & Marcelo M. Wanderley </div>
0 commit comments