Discretize the sinusoidal signal using a sampling frequency of 11025 samples / sec. Generate the music by adding all three melodies. Let, the discrete-time music signal be stored in the output variable ‘music vec’. Play the music using the command ‘s

3 views (last 30 days)
Goal of this problem is to synthesize music using signal processing techniques. The music data is available in the file Melodies.mat as a structure array ‘Melodies’. There are three melodies in this music. Each melody has a sequence of numbered notes. Each note is given by a sinusoidal signal of the form cos(2πfnt), where fn is the frequency of the corresponding note. Reference note ‘A’ is numbered 40 and has a frequency of fn = 440Hz. Frequencies of the subsequent notes have a constant ratio of 2 1 12 . For example, note number 49 has a frequency of (2 1 12 ) 49−40 × 440 = 739.9888Hz. Note number 35 has a frequency of (2 1 12 ) 35−40 × 440 = 329.6276Hz. The sequence of notes-number in each melody is in the variable ‘noteNumbers’. Let, the tempo of the music is set by the variable ‘beats per minute = 120’. Increasing this tempo will accelerate the music and decreasing will slow down the pace of the music. Duration of each note in each of the melodies is given as the number of pulses in the variable ’noOfPulses’. The time duration of each pulse can be estimated as seconds per pulse = 60 4×beats per minute . The starting location of any note in a melody is given in the variable ‘startingPulseNumber’. Discretize the sinusoidal signal using a sampling frequency of 11025 samples / sec. Generate the music by adding all three melodies. Let, the discrete-time music signal be stored in the output variable ‘music vec’. Play the music using the command ‘soundsc’ in Matlab. 2. Using the note synthesis of the form cos(2πfnt + cos(2π2fnt)) (frequency modulation) and test your program

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!