|
This project provided both visual and audible support for the concepts of single and complex tones along with the Doppler effect. In part 1, problem 1, a single tone (F0=440Hz) was produced using a sampling rate of 8kHz. In the next problem, I modified the original code by combining the single tone with its next six harmonics (880 Hz, 1320 Hz, etc). This was done by using the same equation for the wave, but replacing the frequency components with the harmonics. Then adding all these signals together and graphing them as a whole. This was done twice, once with similar energies and another with varying energies. Problem 3 required the same process, yet with six random higher tones that were not harmonics. This sound was harsher on the ears than the previous one. The last problem in part 1 was to create a sinusoidal chirp, beginning at 0 Hz and ending at 880 Hz. In order for this to be executed a variable frequency had to be created of the same size as the sampling frequency. This allowed the tone to change in frequency over time. Part 2 experimented with Doppler effects. The first two problems only differed by one distance value. The user is asked to input three variables: The distance from the source to the observer, the distance of the observer offset from the source path, and the velocity of the source. In problem 1, we are looking for the Doppler effect when the source passes through the observer, this is simulated when the second variable value is entered as 0 (there is no distance between the observer and the source path, meaning the observer is on the source path). I drew a diagram and created a link to view it, that will explain what my variable names are and how trigonometry was used to find a remaining distance. In the final problem, a source consisting of 3-tones was generated and ran through the Doppler experiement. When listening to this wav file you can distinctly hear the three different tones since their values were purposely chosen to be at noticible frequencies from each other. As expected from calculations, when a source is moving with respect to an observer, there are perceived frequency and intensity variations. |
|