In this chapter we will examine what happens when two sine waves of different frequencies interfere. The diagram below illustrates the wave interference pattern resulting from two waves (drawn in purple and red) with very similar frequencies. A beat pattern (blue wave) emerges where the amplitude is changing at a regular rate. If two crests on the waves line up with each other, constructive interference occurs and the resulting amplitude is larger. If a crest and a trough line up then destructive interference occurs and the resulting amplitude can decrease to zero. Since a taller amplitude means a louder sound, the resulting wave will have pulses of loudness and softness.
The beat frequency refers to the rate at which the volume is heard to be changing from high to low volume. For example, if two complete cycles of high and low volumes are heard every second, the beat frequency is 2 Hz. The beat frequency is always equal to the difference in frequency between the two interfering waves. So if two sound waves with frequencies of 256 Hz and 250 Hz are played simultaneously, a beat frequency of 6 Hz will be heard. The human ear is capable of detecting beats frequencies of around 7 Hz and below.
In music we use beat frequencies to tune instruments. A standard frequency tone is played and then an instrument is played along with it. For woodwinds the instrument is lengthened or shortened to try to reduce the beats to zero.
If you remember from the Oscilloscope program, two equations (one with the phase shift and one without seen below) were graphed against each other to make Lissajou Patterns. This time we want to graph each of those columns against the time column. You should do this as two data series on the same graph. Make one of the sine waves blue and the other one red.
Next, in a fourth column we are going to simply add the two frequencies together and then drag the column down to row 365. Now, in a second graph we will plot this column against the time. This graph should show oscillating beats of loudness and softness as long as the two frequencies aren't the same.
INPUTS:
A user can select from a dropdown of 1-10 beats.
A user can also enter a base frequency
A button can be clicked to graph the beat signal and provide a link to listen to it.
OUTPUTS:
Graphical output of two overlapping beats and the combined beat pattern
A link from https://mynoise.net/NoiseMachines/binauralBrainwaveGenerator.php
CRITERIA & CONSTRAINTS:
Clicking the button will graph the beat frequency.
Your program should have an impressive interface. (colors and graphics)
A link will play the chosen beat frequency.
Set a data validation drop down menu of 1-10 for the beats/second.
Create a Phase variable, set it to 180 and add it to the spreadsheet. I added it to cell P5.
Do if-else-if statements to add the correct link to https://mynoise.net/NoiseMachines/binauralBrainwaveGenerator.php for the number of beats.
Create a while loop that runs while the Phase angle is less than 540.
In the while loop get the Phase angle from the spreadsheet, add 10 to it and put it back on the spreadsheet.
After the while loop set the Phase angle back to 180.
We will just go ahead and add data directly on the graph.
Since we are using a scatter plot we need a lot of data points so it looks more like a smooth curve. We will go through one cycle of a sine wave or 360˚. In cell P1 create a time interval by entering =1/360
In cells Q1, R1, S1 and T1 enter headers t, f1, f2 and f1+f2 respectively.
In column Q, starting in cell Q2, enter 0 but then increment down the column by the time interval in cell $P$1. Drag this down 360 rows.
In column R, we will enter the x equation from above. The amplitude A will just be 1. The phase angle needs to be converted to radians. The only variable that changes in this formula is time so make sure all other variables are grabbing the same thing each time. This formula should grab the base-frequency and the phase angle. Drag this equation down 360 rows.
In column S, we will enter the y equation from above. The amplitude B will just be 1. The only variable that changes in this formula again is time so make sure all other variables are grabbing the same thing each time. This formula should grab the base-frequency+beats. Drag this equation down 360 rows.
In column T, simply add columns R and S. Drag this equation down 360 rows.
In Chart 1 make a smooth line graph with x-axis from Q2:Q362, Series 1 from R2:R362 and Series 2 from S2:S362. Use column Q as labels and make one frequency red and the other blue.
In Chart 2 make a smooth line graph with x-axis from Q2:Q362 and Series 1 from T2:T362. Use column Q as labels and make one frequency red and the other blue.