Question
4.1 Beat Notes In the section on beat notes in Chapter 3 of the text, we analyzed the situation in which we had two sinusoidal
4.1 Beat Notes In the section on beat notes in Chapter 3 of the text, we analyzed the situation in which we had two sinusoidal signals of slightly different frequencies; i.e., x.t / D Acos.2.fc f/t /CB cos.2.fc Cf/t / (5) In this part, we will compute samples of such a signal and listen to the result.
(a) Write an M-file called beat.m that implements (5) and has the following as its first lines: function [xx, tt] = beat(A, B, fc, delf, fsamp, dur) %BEAT compute samples of the sum of two cosine waves % usage: % [xx, tt] = beat(A, B, fc, delf, fsamp, dur) % % A = amplitude of lower frequency cosine % B = amplitude of higher frequency cosine % fc = center frequency % delf = frequency difference % fsamp = sampling rate % dur = total time duration in seconds % xx = output vector of samples %--Second Output: % tt = time vector corresponding to xx Include a copy of your M-file in your lab report. You might want to call the syn_sin() function written in Lab 2 to do the calculation. The function should also generate its own time vector, because that vector can be used to define the horizontal axis when plotting.
(b) To assist you in your experiments with beat notes, a tool called beatcon has been created. This user interface controller is able to call your function beat.m, if you check the box Use External beat() in the lower left-hand corner of the GUI. Therefore, before you invoke beatcon you should be sure your M-file is free of errors. Also, make sure that your beat.m function is on the MATLAB path. Test the M-file written in part (a) via beatcon by using the values A=10, B=10, fc=1000, delf=10, fsamp=11025, and dur=1 s. Plot the first 0.2 seconds of the resulting signal. Describe the waveform and explain its properties. Hand in a copy of your plot with measurements of the period of the envelope and period of the high frequency signal underneath the envelope.
(c) (Optional)6 Experiment with different values of the frequency difference f. Listen to the sounds (there is a button on beatcon that will do this for you automatically) and think about the relationship between the sound and waveform.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started