Musical notes are arranged in groups of twelve notes called octaves. The notes t
ID: 2249049 • Letter: M
Question
Musical notes are arranged in groups of twelve notes called octaves. The notes that well be using for Beethoven's Fifth are in the octave containing frequencies from 220 Hz to 440 Hz. When we construct our scale, we'll include notes from the octave containing frequencies from 440 Hz to 880 Hz. The twelve notes in each octave are logarithmically spaced in frequency, with each note being of a frequency 212 times the frequency of the note of lower frequency. Thus, a -octave pitch shift corresponds to a doubling of the frequencics of the notes in thc original octavc. In the simplest case, each nate may be represented hy a burst of sinusoid followed hy a shorter period of silence (a pausa The pauses allow us to distinguish between separate notes of the same pitch The orizuntal lines in Figure represent the nodsE,GBD,F lrom the bettun to the tup. The spaces baween the lines are used to represent the notes F. A, C, and E, again from the bottom to the top. Note chnt A-G only yields seven noes; the ndditional notes are due to changes in pitch called sharps denoted by the symhol F) or flats (denoded by the symbol ) thnt follows n given note, A sharp increases the pitch by 2 and a flat decreases the pitch by 22 Table 1 shows the ordering of notes in the octave to be used to synthesize the opening of Beethoven's fifth, as well as the fundamental frequencies for these notes. When you do your scale, you will have to determine the frequencies of three of the higher notes on your own. cighth note two eighth Note Frequency (Hz) -eighth note halfnate 220 220 * 2012 220 21 220 23 A#, Bb Figure 1: Musical Suore for Beetboven's Filth In the musical score in Figure 1, the first three eighth notes are all noteG·The tirst half note is an Eb due to the inclusion of the throe Dat symbols at the left of tha score, since we are in the key of C-minor. After the half note, the symbol is a rest of length equal to the duration of an eighth note. The next three eighth notes are all P, and the final half note is a D. You enn get the furdamental frequencies for these nates from Table 1 C, Db 2202 22022 ove Duranons DA, Eb 2202512 The durution of each vote burst is determined by whether the note is a whole note, half note, quarter nate, eighth note, etc. Obvicusly, a quarter note has twice the duration of an eighth note, and so on. Sa your half notes should be four times the duration af your eighth potes. The sbort pause you use to follow cach note should be of the same duration rcpardiess of the length of the note. 220 212 220 21 220 * 2912 220 22 220 * 2012 F#, Gb l. G#, Ab Synthusizcw picuo appearing in Figure 1. Suo below lor help on playing audio in OctaveMATLAB. You'll want to specify the sampling rate in the playback. Save the enti Table 1: Notes in the 220 440 Hz Octave generate a t vector of sample times using t-0:Ts:T] where Ts is the sampling time and T is the desired duration. The following MATLAB/Octave code plays a 0.5 second duration 500 Hz tone, then a 1.0 second duration 1000 Hz tonc, and finally a 0.5 second duration 1500 Hz tone. Each tone is separated by a one-tenth of a second of silence. Fs 8000; Ts1/Es; Tdur = 0.5; s = sin (2*pi*500* [O : Ts:Tdur)); p-audioplayer(s, Fs) playblocking (p) pause (0.1) Taur = 1 ; s = sin (2*pi*1000* [0:Ts : Tdur]); p-audioplayer(s, Fs) playblocking (p) pause (0.1) Taur = 1.5; s = sin (2+pi*1500* [ 0 :Ts:Tdur]); p= audioplayer(s, Fs); playblocking (p) pause (0.1)Explanation / Answer
Hi, Please find the atlab Code as following:
If you have any doubt please let me know.
--------------------------------------------------------------------------------------------------------------------------------------------------------
%% Part One
Fs = 8000;
Ts = 1/Fs;
Tdur = 0.5;
s = sin(2*pi*500*[0:Ts:Tdur]);
p = audioplayer(s, Fs);
playblocking(p)
pause(0.1)
Tdur = 1;
s = sin(2*pi*1000*[0:Ts:Tdur]);
p = audioplayer(s, Fs);
playblocking(p)
pause(0.1)
Tdur = 1.5;
s = sin(2*pi*1500*[0:Ts:Tdur]);
p = audioplayer(s, Fs);
playblocking(p)
pause
%% Part 2
% G note eight
Tdur = 1/8;
G_Eighth = sin(2*pi*220*2^(10/12)*[0:Ts:Tdur]);
p_g = audioplayer(s, Fs);
% Eb note half note
Tdur = 1/2;
Eb_Half = sin(2*pi*220*2^(6/12)*[0:Ts:Tdur]);
p_e = audioplayer(s, Fs);
% F note half note
Tdur = 1/8;
F_Eighth = sin(2*pi*220*2^(8/12)*[0:Ts:Tdur]);
p_f = audioplayer(s, Fs);
% D note half note
Tdur = 1/8;
D_Half = sin(2*pi*220*2^(5/12)*[0:Ts:Tdur]);
p_d = audioplayer(s, Fs);
Music_Score = [G_Eighth G_Eighth G_Eighth Eb_Half F_Eighth F_Eighth F_Eighth D_Half];
p = audioplayer(Music_Score, Fs);
playblocking(p)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.