|
|
|
|
153
|
|
153
|
|
154
|
Play the output sound file with the application by clicking the `Play Audio Out` button.
|
154
|
Play the output sound file with the application by clicking the `Play Audio Out` button.
|
155
|
|
155
|
|
156
|
-###Exercise 2: Fade In
|
|
|
|
|
156
|
+### Exercise 2 - Fade In
|
157
|
|
157
|
|
158
|
A common sound effect is the gradual intensification of the recording's volume, or fade in. This is the result of constantly increasing the value of consecutive samples in the array of sound samples.
|
158
|
A common sound effect is the gradual intensification of the recording's volume, or fade in. This is the result of constantly increasing the value of consecutive samples in the array of sound samples.
|
159
|
|
159
|
|
160
|
-####Instructions
|
|
|
|
|
160
|
+#### Instructions:
|
161
|
|
161
|
|
162
|
1. Load and play any of the wave files `rain.wav`, or `water.wav` just as in Exercise 1.
|
162
|
1. Load and play any of the wave files `rain.wav`, or `water.wav` just as in Exercise 1.
|
163
|
|
163
|
|
|
|
|
|
187
|
Notice that we have 4 samples and the factor used to multiply the sample in each channel stars at `0` and increases `0.25` each time until reaching `1`.
|
187
|
Notice that we have 4 samples and the factor used to multiply the sample in each channel stars at `0` and increases `0.25` each time until reaching `1`.
|
188
|
|
188
|
|
189
|
|
189
|
|
190
|
-###Exercise 3: Fade Out
|
|
|
|
|
190
|
+### Exercise 3 - Fade Out
|
191
|
|
191
|
|
192
|
Another common sound effect is the gradual decrease of volume in a recording. This is the result of constantly decreasing the value of consecutive samples in the array of sound samples.
|
192
|
Another common sound effect is the gradual decrease of volume in a recording. This is the result of constantly decreasing the value of consecutive samples in the array of sound samples.
|
193
|
|
193
|
|
194
|
-####Instructions
|
|
|
|
|
194
|
+#### Instructions:
|
195
|
|
195
|
|
196
|
1. Load and play any of the wave files `rain.wav`, or `water.wav` just like in the previous exercises.
|
196
|
1. Load and play any of the wave files `rain.wav`, or `water.wav` just like in the previous exercises.
|
197
|
|
197
|
|
|
|
|
|
209
|
The multiplicative factors for `fade_out` are the same as for `fade_in`, but are applied in the reverse order. For example, if `fade_length` were `4`, the samples in the fourth-before-last positions would be multiplied by `0.75` (in both channels), the samples in the third-before-last positions would be multiplied by `0.5`, the samples in the penultimate positions would be multiplied by `0.25`, the samples in the final positions would be multiplied by `0.0`.
|
209
|
The multiplicative factors for `fade_out` are the same as for `fade_in`, but are applied in the reverse order. For example, if `fade_length` were `4`, the samples in the fourth-before-last positions would be multiplied by `0.75` (in both channels), the samples in the third-before-last positions would be multiplied by `0.5`, the samples in the penultimate positions would be multiplied by `0.25`, the samples in the final positions would be multiplied by `0.0`.
|
210
|
|
210
|
|
211
|
|
211
|
|
212
|
-###Exercise 4: Panning from left to right
|
|
|
|
|
212
|
+### Exercise 4 - Panning from left to right
|
213
|
|
213
|
|
214
|
The sound effect we want to produce in this exercise is to start hearing sound from the left channel, then fading from that channel, intensifying in the right channel and ending up completely on the right channel.
|
214
|
The sound effect we want to produce in this exercise is to start hearing sound from the left channel, then fading from that channel, intensifying in the right channel and ending up completely on the right channel.
|
215
|
|
215
|
|
216
|
|
216
|
|
217
|
-####Instructions
|
|
|
|
|
217
|
+#### Instructions:
|
218
|
|
218
|
|
219
|
1. Load and play the `airplane.wav` just like in the previous exercises.
|
219
|
1. Load and play the `airplane.wav` just like in the previous exercises.
|
220
|
|
220
|
|
|
|
|
|
238
|
|
238
|
|
239
|
### Deliverables
|
239
|
### Deliverables
|
240
|
|
240
|
|
241
|
-Use "Deliverables" in Moodle to upload the `audiomanip.cpp` file. Remember to use good programming techniques, include the names of the programmers involved, and to document your program.
|
|
|
|
|
241
|
+Use "Deliverable" in Moodle to upload the `audiomanip.cpp` file. Remember to use good programming techniques, include the names of the programmers involved, and to document your program.
|
242
|
|
242
|
|
243
|
---
|
243
|
---
|
244
|
|
244
|
|