Question: please include matlab code Tutorial on musical frequencies: An octave consists of 12 notes between C and the next C. On the piano, the middle

 please include matlab code Tutorial on musical frequencies: An octave consists
of 12 notes between C and the next C. On the piano,
please include matlab code

Tutorial on musical frequencies: An octave consists of 12 notes between C and the next C. On the piano, the middle C has a central frequency of f=261.6 Hz. Next C, C', has twice the frequency, or 523.2Hz. There are 12 notes between them: [CC D D E F F G G A A B C]. C' is read C sharp. Let's denote the frequencies of these notes as [f, f, f...f, f). Each frequency is given by f= f 242 which satisfies f = 2f, the frequency of the C. 000000000 GRAND STAFF 000000 PIANO KEYS GABICPEF GABRIEFIGA BICIPIEFIG Consider the upper staff of the music score Mary Had a Little Lamb below. It is written in 4/4 time which means that duration of the notes in each measure must add up to 4. Measures are separated by a solid vertical line. The notes and their duration are given in the table below. E DCD EEE DDD EGG E DCD EEEE 1.5.5 11 112 112 11 21.5.5 11 1111 D DEDC 1111 4 3. Write a MATLAB main program and save it under the name of mary_lamb.m. The main program should a. Call the function note for each note and duration of the musical score Mary Has a Little Lamb. b. Collate the vector outputs in a large vector called song so that song=[xl x2 x3.) where xi is the i" vector output of the function note. c. Use the MATLAB instruction soundsc to play the vector song d. Compute the N-point DFT of each note in the score. N should be the same for each note and should be 2 times the power of 2 larger than the number of samples in the longest note of the musical score

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!