(New page: im jack williams i like pie) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | Listen to [[HailPurdue_Sound_ECE301Fall2008mboutin]] | |
+ | Or listen to [[HailPurdue_Sound2_ECE301Fall2008mboutin]]!! | ||
+ | OR listen to [[HailPurdue_Sound3_ECE301Fall2008mboutin]]!!! | ||
+ | |||
+ | <pre> | ||
+ | %Jack Williams | ||
+ | %ECE 301, Mimi Boutin | ||
+ | %HW 1 | ||
+ | %September 4, 2008 | ||
+ | |||
+ | %PART A ------------------------------------------------- | ||
+ | |||
+ | % Note Frequencies | ||
+ | A = 220; | ||
+ | B = 246.942; | ||
+ | C = 261.626; | ||
+ | Db = 277.183; | ||
+ | D = 293.665; | ||
+ | Eb = 311.127; | ||
+ | E = 329.628; | ||
+ | F = 349.228; | ||
+ | Gb = 369.994; | ||
+ | G = 391.995; | ||
+ | Ab = 415.305; | ||
+ | |||
+ | %Note Vector | ||
+ | NV = [A, B, Db, D, E, Gb, Gb, G, G, G, D, E, F, Gb]; | ||
+ | |||
+ | %Time definition and Sampling Frequency | ||
+ | delta = 0.00005; | ||
+ | stop_time = 0.4; | ||
+ | t = 0:delta:0.5; | ||
+ | |||
+ | %Sound Playing Loop | ||
+ | for i = 1:1:length(NV) | ||
+ | signal = sin(2*pi * t * NV(i)); | ||
+ | sound(signal, 1/delta); | ||
+ | end | ||
+ | |||
+ | %PART B ------------------------------------------------- | ||
+ | |||
+ | %stop_time cut in half | ||
+ | stop_time = stop_time/2; | ||
+ | t = 0:delta:stop_time; | ||
+ | |||
+ | %Sound Playing Loop | ||
+ | for i = 1:1:length(NV) | ||
+ | signal = sin(2*pi * t * NV(i)); | ||
+ | sound(signal, 1/delta); | ||
+ | end | ||
+ | |||
+ | %PART C -------------------------------------------------- | ||
+ | |||
+ | %stop_time Redifinition | ||
+ | stop_time = 2*stop_time; | ||
+ | t = 0 : delta : stop_time; | ||
+ | |||
+ | %Rescale from x(t) to x(2t) | ||
+ | for i = 1:1:length(NV) | ||
+ | signal = sin(4*pi * t * NV(i)); | ||
+ | sound(signal, 1/delta); | ||
+ | end | ||
+ | </pre> |
Latest revision as of 14:33, 4 September 2008
Listen to HailPurdue_Sound_ECE301Fall2008mboutin Or listen to HailPurdue_Sound2_ECE301Fall2008mboutin!! OR listen to HailPurdue_Sound3_ECE301Fall2008mboutin!!!
%Jack Williams %ECE 301, Mimi Boutin %HW 1 %September 4, 2008 %PART A ------------------------------------------------- % Note Frequencies A = 220; B = 246.942; C = 261.626; Db = 277.183; D = 293.665; Eb = 311.127; E = 329.628; F = 349.228; Gb = 369.994; G = 391.995; Ab = 415.305; %Note Vector NV = [A, B, Db, D, E, Gb, Gb, G, G, G, D, E, F, Gb]; %Time definition and Sampling Frequency delta = 0.00005; stop_time = 0.4; t = 0:delta:0.5; %Sound Playing Loop for i = 1:1:length(NV) signal = sin(2*pi * t * NV(i)); sound(signal, 1/delta); end %PART B ------------------------------------------------- %stop_time cut in half stop_time = stop_time/2; t = 0:delta:stop_time; %Sound Playing Loop for i = 1:1:length(NV) signal = sin(2*pi * t * NV(i)); sound(signal, 1/delta); end %PART C -------------------------------------------------- %stop_time Redifinition stop_time = 2*stop_time; t = 0 : delta : stop_time; %Rescale from x(t) to x(2t) for i = 1:1:length(NV) signal = sin(4*pi * t * NV(i)); sound(signal, 1/delta); end