Exercise 2. [40 points.] Although pure harmonics contain all the necessary information for us to identify...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Exercise 2. [40 points.] Although pure harmonics contain all the necessary information for us to identify the tune, musical instruments have a more pleasant sound because they com- bine multiple harmonics and modulate the output based on their internal vibration modes. Moreover, musicians typically play more than one note at a time to enrich the sound. To en- able both of these behaviors, we are going to create a new MATLAB function w = tone2 (fs, note, instrument), where w is a row vector f, is a scalar, note is a structure that contains the following information octave: a vector of integer numbers; semitone: an array of strings of the same size as note. octave. Each element of the array can either be the same as the previous exercise or can contain -1'. In this case, w should be a vector of zeros of the same size as t, i.e. a pause; duration: a scalar number. Finally, instrument is an optional input and is a structure that contains the following information .harmonics: a 2 x 1 vector; envelope: a function hadle in t. The envisioned function must do the following. a) Generate the signal i=1 where N is the number of elements in the vector oct=note.octave (equal to the number of elements in the array note.semitone), and f, is the frequency of each individual note; b) If the user called the function with three inputs instead of just two, generate the signal N N Homework w = sin(2 f;. t), i=1 ECEN 2310 w = sin(2 fit) + a sin(27(2fi). t) + a2 sin(2 (3f;) . t), a and a2 are the intensities of the second and third harmonics (i.e. the soundwaves at 2 times and 3 times the main frequency), which can be obtained from the 2 x 1 vector instrument.harmonics; c) If the user called the function with three inputs instead of just two, multiply the final soundwave w by the function handle instrument.envelope evaluated in t. To check if the function works, write a new script that performs the following a) Define the structure piano, where the harmonics vector is [0.6 0.2] and the envelope is min (40t, 1). e-4t; Week 11 b) Run the MATLAB Script mary2.m; c) Play the first note in script and write a for loop that Calls tune2 to compute the soundwave associated to the next note; Waits for the previous note to be done playing using tic and toc to help with the timing; Plays the new soundwave. Exercise 2. [40 points.] Although pure harmonics contain all the necessary information for us to identify the tune, musical instruments have a more pleasant sound because they com- bine multiple harmonics and modulate the output based on their internal vibration modes. Moreover, musicians typically play more than one note at a time to enrich the sound. To en- able both of these behaviors, we are going to create a new MATLAB function w = tone2 (fs, note, instrument), where w is a row vector f, is a scalar, note is a structure that contains the following information octave: a vector of integer numbers; semitone: an array of strings of the same size as note. octave. Each element of the array can either be the same as the previous exercise or can contain -1'. In this case, w should be a vector of zeros of the same size as t, i.e. a pause; duration: a scalar number. Finally, instrument is an optional input and is a structure that contains the following information .harmonics: a 2 x 1 vector; envelope: a function hadle in t. The envisioned function must do the following. a) Generate the signal i=1 where N is the number of elements in the vector oct=note.octave (equal to the number of elements in the array note.semitone), and f, is the frequency of each individual note; b) If the user called the function with three inputs instead of just two, generate the signal N N Homework w = sin(2 f;. t), i=1 ECEN 2310 w = sin(2 fit) + a sin(27(2fi). t) + a2 sin(2 (3f;) . t), a and a2 are the intensities of the second and third harmonics (i.e. the soundwaves at 2 times and 3 times the main frequency), which can be obtained from the 2 x 1 vector instrument.harmonics; c) If the user called the function with three inputs instead of just two, multiply the final soundwave w by the function handle instrument.envelope evaluated in t. To check if the function works, write a new script that performs the following a) Define the structure piano, where the harmonics vector is [0.6 0.2] and the envelope is min (40t, 1). e-4t; Week 11 b) Run the MATLAB Script mary2.m; c) Play the first note in script and write a for loop that Calls tune2 to compute the soundwave associated to the next note; Waits for the previous note to be done playing using tic and toc to help with the timing; Plays the new soundwave. Exercise 2. [40 points.] Although pure harmonics contain all the necessary information for us to identify the tune, musical instruments have a more pleasant sound because they com- bine multiple harmonics and modulate the output based on their internal vibration modes. Moreover, musicians typically play more than one note at a time to enrich the sound. To en- able both of these behaviors, we are going to create a new MATLAB function w = tone2 (fs, note, instrument), where w is a row vector f, is a scalar, note is a structure that contains the following information octave: a vector of integer numbers; semitone: an array of strings of the same size as note. octave. Each element of the array can either be the same as the previous exercise or can contain -1'. In this case, w should be a vector of zeros of the same size as t, i.e. a pause; duration: a scalar number. Finally, instrument is an optional input and is a structure that contains the following information .harmonics: a 2 x 1 vector; envelope: a function hadle in t. The envisioned function must do the following. a) Generate the signal i=1 where N is the number of elements in the vector oct=note.octave (equal to the number of elements in the array note.semitone), and f, is the frequency of each individual note; b) If the user called the function with three inputs instead of just two, generate the signal N N Homework w = sin(2 f;. t), i=1 ECEN 2310 w = sin(2 fit) + a sin(27(2fi). t) + a2 sin(2 (3f;) . t), a and a2 are the intensities of the second and third harmonics (i.e. the soundwaves at 2 times and 3 times the main frequency), which can be obtained from the 2 x 1 vector instrument.harmonics; c) If the user called the function with three inputs instead of just two, multiply the final soundwave w by the function handle instrument.envelope evaluated in t. To check if the function works, write a new script that performs the following a) Define the structure piano, where the harmonics vector is [0.6 0.2] and the envelope is min (40t, 1). e-4t; Week 11 b) Run the MATLAB Script mary2.m; c) Play the first note in script and write a for loop that Calls tune2 to compute the soundwave associated to the next note; Waits for the previous note to be done playing using tic and toc to help with the timing; Plays the new soundwave. Exercise 2. [40 points.] Although pure harmonics contain all the necessary information for us to identify the tune, musical instruments have a more pleasant sound because they com- bine multiple harmonics and modulate the output based on their internal vibration modes. Moreover, musicians typically play more than one note at a time to enrich the sound. To en- able both of these behaviors, we are going to create a new MATLAB function w = tone2 (fs, note, instrument), where w is a row vector f, is a scalar, note is a structure that contains the following information octave: a vector of integer numbers; semitone: an array of strings of the same size as note. octave. Each element of the array can either be the same as the previous exercise or can contain -1'. In this case, w should be a vector of zeros of the same size as t, i.e. a pause; duration: a scalar number. Finally, instrument is an optional input and is a structure that contains the following information .harmonics: a 2 x 1 vector; envelope: a function hadle in t. The envisioned function must do the following. a) Generate the signal i=1 where N is the number of elements in the vector oct=note.octave (equal to the number of elements in the array note.semitone), and f, is the frequency of each individual note; b) If the user called the function with three inputs instead of just two, generate the signal N N Homework w = sin(2 f;. t), i=1 ECEN 2310 w = sin(2 fit) + a sin(27(2fi). t) + a2 sin(2 (3f;) . t), a and a2 are the intensities of the second and third harmonics (i.e. the soundwaves at 2 times and 3 times the main frequency), which can be obtained from the 2 x 1 vector instrument.harmonics; c) If the user called the function with three inputs instead of just two, multiply the final soundwave w by the function handle instrument.envelope evaluated in t. To check if the function works, write a new script that performs the following a) Define the structure piano, where the harmonics vector is [0.6 0.2] and the envelope is min (40t, 1). e-4t; Week 11 b) Run the MATLAB Script mary2.m; c) Play the first note in script and write a for loop that Calls tune2 to compute the soundwave associated to the next note; Waits for the previous note to be done playing using tic and toc to help with the timing; Plays the new soundwave.
Expert Answer:
Related Book For
Fundamentals of Corporate Finance
ISBN: 978-0077861704
11th edition
Authors: Stephen Ross, Randolph Westerfield, Bradford Jordan
Posted Date:
Students also viewed these databases questions
-
Her Passion for Fashion Bobbi Jean Donnelly was hardened by her humble beginnings in rural Mississippi. The fourth of six children in a blue-collar working-class family, she spent the early years of...
-
In each independent case situation below, construct a REA model and a database structure. a. Toms Trailers. Tom owns a small recreational trailer business in a suburban community located close to the...
-
1 YOUR NAME: 2 Asset # 3 Asset name: 4 Date acquired: 5 Cost: 6 Depreciation method: 7 Salvage (residual) value: 8 Estimated useful life (years): 9 222 Computer 1/1/2018 $50,000 Straight Line (SL)...
-
In December 2014, the company paid $1,800 for insurance for the first six months of 2015. This payment was mistakenly recorded as insurance expense in 2014. Make the necessary correcting entry,...
-
a) You work for Dynamic Hardware Division (DHD) of Dynamic IT plc. DHD is considering the development of a wireless router that will provide both the hardware and the software necessary to connect...
-
In Exercises 1518, use the given set of points to a. Compute b1. b. Compute the residual standard deviation se. c. Compute the sum of squares for x, (x x)2. d. Compute the standard error of b1, sb....
-
Determine the amount of the standard deduction allowed for 2014 in the following independent situations. In each case, assume that the taxpayer is claimed as another person's dependent. a. Curtis,...
-
Is social responsibility a driver of a corporate competitive advantage? How? Justify your answer using examples from Saudi Market. 3 marks Briefly describe a successful story of a strategic alliance...
-
What are KPIs and how can KPIs contribute toward the success of operational plans? Provide an example of a KPI.
-
Supposed a body of mass 39 kg is falling in the atmosphere near sea level. Let v(t) m/s be the velocity of the body at time t in seconds. Assume that v is positive in the downward direction - that...
-
You are given the following information about aggregate demand at the existing price level for an economy: (1) consumption = $500 billion (2) investment = $50 billion (3) government purchases = $10...
-
Norma Electronics sell its products for cash and on credit. It usually provides 6 % of its credit sales as allowance for bad and doubtful debts. In the month of April 2 0 x 1 , Norma Electronics...
-
question is shown below 1 Mfr 2 Dell 3 Dell 4 Dell 5 Dell 6 Dell 7 Dell 8 Dell 9 Dell 10 Dell 11 Dell 12 Dell 13 Dell 14 Dell 15 Dell 16 Dell 17 HP 18 HP 19 HP 20 HP 21 HP 22 HP 23 HP 24 HP 25 HP 26...
-
Consider a laser diode composed of InGaAsP crystal of length d=400m with refractive index, n=3.5 and corresponding spectral width, B=1.2THz. Please show all calculations and work. 1. Determine the...
-
Question 15 4 pts nts ?? In 2020, Margie walked into Baby's Toy store and purchased a baby toy for $25. That $25 payment counted as expenditure for Margie and income for Baby's Toy. What amount is...
-
Ball bearings are widely used in industrial applications. You work for an industrial food machinery manufacturer and your role is to design the driveshaft assembly on a new type of equipment that...
-
What is the IRR of the following set of cash flows? Year Cash Flow 0 ................. -$13,900 1 ..................... 6,400 2 ..................... 8,700 3..................... 5,900
-
Based on the following information, calculate the sustainable growth rate for Kaleb's Welding Supply: Profit margin = 7.5% Capital intensity ratio = .65 Debt-equity ratio = .60 Net income = $67,000...
-
A proposed new project has projected sales of $164,000, costs of $87,000, and depreciation of $15,200. The tax rate is 35 percent. Calculate operating cash flow using the four different approaches...
-
Describe circumstances that might cause a client to understate assets such as cash and financial investments.
-
Select the best answer for each of the following situations and give reasons for your choice. a. You have been assigned to the year-end audit of a financial institution and are planning the timing of...
-
What prevents the person who opens incoming mail from being able to abstract cash collections from customers?
Study smarter with the SolutionInn App