(→Sound Files) |
|||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
[[Media:serekson_hailpurdue1_ECE301Fall2008mboutin.wav]] | [[Media:serekson_hailpurdue1_ECE301Fall2008mboutin.wav]] | ||
[[Media:serekson_hailpurdue2_ECE301Fall2008mboutin.wav]] | [[Media:serekson_hailpurdue2_ECE301Fall2008mboutin.wav]] | ||
+ | [[Media:serekson_hailpurdue3_ECE301Fall2008mboutin.wav]] | ||
==Matlab Code== | ==Matlab Code== | ||
Line 38: | Line 39: | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
− | A = sin( | + | A = sin(2*pi*(0:delta:.5)*220.000); |
− | Bb = sin( | + | Bb = sin(2*pi*(0:delta:.5)*233.082); |
− | B = sin( | + | B = sin(2*pi*(0:delta:.5)*246.942); |
− | C = sin( | + | C = sin(2*pi*(0:delta:.5)*261.626); |
− | Db = sin( | + | Db = sin(2*pi*(0:delta:.5)*277.183); |
− | D = sin( | + | D = sin(2*pi*(0:delta:.5)*293.665); |
− | Eb = sin( | + | Eb = sin(2*pi*(0:delta:.5)*311.127); |
− | E = sin( | + | E = sin(2*pi*(0:delta:.5)*329.628); |
− | F = sin( | + | F = sin(2*pi*(0:delta:.5)*349.228); |
− | Gb = sin( | + | Gb = sin(2*pi*(0:delta:.5)*369.994); |
− | G = sin( | + | G = sin(2*pi*(0:delta:.5)*391.995); |
notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; | notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; | ||
Line 60: | Line 61: | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
− | A = sin(2*pi*(0:delta:1)*220.000); | + | A = sin(2*2*pi*(0:delta:1)*220.000); |
− | Bb = sin(2*pi*(0:delta:1)*233.082); | + | Bb = sin(2*2*pi*(0:delta:1)*233.082); |
− | B = sin(2*pi*(0:delta:1)*246.942); | + | B = sin(2*2*pi*(0:delta:1)*246.942); |
− | C = sin(2*pi*(0:delta:1)*261.626); | + | C = sin(2*2*pi*(0:delta:1)*261.626); |
− | Db = sin(2*pi*(0:delta:1)*277.183); | + | Db = sin(2*2*pi*(0:delta:1)*277.183); |
− | D = sin(2*pi*(0:delta:1)*293.665); | + | D = sin(2*2*pi*(0:delta:1)*293.665); |
− | Eb = sin(2*pi*(0:delta:1)*311.127); | + | Eb = sin(2*2*pi*(0:delta:1)*311.127); |
− | E = sin(2*pi*(0:delta:1)*329.628); | + | E = sin(2*2*pi*(0:delta:1)*329.628); |
− | F = sin(2*pi*(0:delta:1)*349.228); | + | F = sin(2*2*pi*(0:delta:1)*349.228); |
− | Gb = sin(2*pi*(0:delta:1)*369.994); | + | Gb = sin(2*2*pi*(0:delta:1)*369.994); |
− | G = sin(2*pi*(0:delta:1)*391.995); | + | G = sin(2*2*pi*(0:delta:1)*391.995); |
notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; | notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; |
Latest revision as of 16:01, 5 September 2008
Sound Files
Media:serekson_hailpurdue1_ECE301Fall2008mboutin.wav Media:serekson_hailpurdue2_ECE301Fall2008mboutin.wav Media:serekson_hailpurdue3_ECE301Fall2008mboutin.wav
Matlab Code
%Spencer Erekson %ECE 301 Homework 1 Problem 1 %September 4, 2008 delta=1/20000; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Normal Speed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A = sin(2*pi*(0:delta:1)*220.000); Bb = sin(2*pi*(0:delta:1)*233.082); B = sin(2*pi*(0:delta:1)*246.942); C = sin(2*pi*(0:delta:1)*261.626); Db = sin(2*pi*(0:delta:1)*277.183); D = sin(2*pi*(0:delta:1)*293.665); Eb = sin(2*pi*(0:delta:1)*311.127); E = sin(2*pi*(0:delta:1)*329.628); F = sin(2*pi*(0:delta:1)*349.228); Gb = sin(2*pi*(0:delta:1)*369.994); G = sin(2*pi*(0:delta:1)*391.995); %an array of the notes notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; sound(notes,1/delta); wavwrite(notes,1/delta,32,'serekson_hailpurdue1.wav'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Twice Speed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A = sin(2*pi*(0:delta:.5)*220.000); Bb = sin(2*pi*(0:delta:.5)*233.082); B = sin(2*pi*(0:delta:.5)*246.942); C = sin(2*pi*(0:delta:.5)*261.626); Db = sin(2*pi*(0:delta:.5)*277.183); D = sin(2*pi*(0:delta:.5)*293.665); Eb = sin(2*pi*(0:delta:.5)*311.127); E = sin(2*pi*(0:delta:.5)*329.628); F = sin(2*pi*(0:delta:.5)*349.228); Gb = sin(2*pi*(0:delta:.5)*369.994); G = sin(2*pi*(0:delta:.5)*391.995); notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; sound(notes,1/delta); wavwrite(notes,1/delta,32,'serekson_hailpurdue2.wav'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Twice Frequency %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A = sin(2*2*pi*(0:delta:1)*220.000); Bb = sin(2*2*pi*(0:delta:1)*233.082); B = sin(2*2*pi*(0:delta:1)*246.942); C = sin(2*2*pi*(0:delta:1)*261.626); Db = sin(2*2*pi*(0:delta:1)*277.183); D = sin(2*2*pi*(0:delta:1)*293.665); Eb = sin(2*2*pi*(0:delta:1)*311.127); E = sin(2*2*pi*(0:delta:1)*329.628); F = sin(2*2*pi*(0:delta:1)*349.228); Gb = sin(2*2*pi*(0:delta:1)*369.994); G = sin(2*2*pi*(0:delta:1)*391.995); notes=[A,B,Db,D,E,Gb,Gb,G,G,G,D,E,F,Gb]; sound(notes,1/delta); wavwrite(notes,1/delta,32,'serekson_hailpurdue3.wav');