Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB. 3.3) please finish the following incomplete m-file using the function attached and show how to play notes. 3.4) please complete all parts (a and

MATLAB. 3.3) please finish the following incomplete m-file using the function attached and show how to play notes. 3.4) please complete all parts (a and b). image text in transcribed
image text in transcribed
image text in transcribed
3.3 Synthesize a Scale with Octaves In a previous section you completed the key2note.m function which synthesizes the correct sinusoidal signal for a particular key number. Now, use that function to finish the following incomplete M-file that will play scales where each tone is the sum of two notes separated by an octave play_scale octave.m scale . keys = [ 40 42 44 45 47 49 51 52 40 44 47 44 40]; % NOTES: C D E F G A B C C E G E C % key #40 is middle-c scale.durations0.25ones (1,length (scale.keys)) fs 11025; %-- or 22050 Hz xx = zeros (1, ceil (sum (scale . durations)"fs+length (scale . keys)) ); for kk = 1 : length (scale , keys) keynum scale . keys (kk) ; tone n2 = n1 + length ( tone) -1; xx (nl:n2) xx (n1:n2) tone; n1 = n2 + 1; end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

1. Discuss the four components of language.

Answered: 1 week ago

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago