Sunteți pe pagina 1din 5

EE 386L: Lab Assignment 2

Lab Group Members: Andy Skupen Mina Azer Nabeel Amir EE 386L M! "2:## ":$# %M

Monday& 'ebruary 28& 2#""

Lab Description
Objective
As stated in t(e te)tbook& t(e primary ob*e+ti,e o- t(is lab .as to establis( t(e +onne+tion bet.een musi+al notes& t(eir -re/uen+ies& and sinusoids0

Theory
1(e t(eory be(ind t(is lab .as to be able to take a sinusoidal input .a,e-orm and sample it in MA1LA2& simulating t(e 3 to 4 pro+ess& and t(en +on,ert t(e samples ba+k to t(e original .a,e-orm& simulating t(e 4 to 3 pro+ess

Approach
'ollo.ing t(e pro+edures outlined in t(e te)tbook& .e +reated ro. ,e+tors MA1LA2& .it( ea+( ,e+tor element representing a sample time& and t(en used t(e sin56 -un+tion in MA1LA2 to +reate t(e sampled .a,e-orm& using t(e ro. ,e+tor and a -undamental -re/uen+y as parameters0 !e t(en used t(e sound56 -un+tion in MA1LA2 to play t(e samples as an audible .a,e-orm at t(e spe+i-ied -undamental -re/uen+y0

Expected Outcomes
7ur e)pe+ted out+ome o- t(is e)periment .as a +omputer simulation o- a pie+e o- +lassi+al musi+0 !e +(ose 8'ur Elise9 by L0 :0 2eet(o,en as our pie+e to simulate0 1(e results ot(e simulation are .(at -ollo. in t(e +oming se+tions o- t(is report0 "

Results
1(e results o- t(e e)periment are listed in t(e MA1LA2 0m -iles t(at -ollo.0 1(e 0m;-iles generate sampled sinusoids t(at +an be played t(roug( t(e sound (ard.are o- a +omputer0 1(e -inal 0m;-ile represents t(e +ode to generate 'ur Elise& t(e a+tual notes o- .(i+( +ame -rom t(e -enotes0m -ile on t(e te)tbook<s 340

Discussion
1(e lab instru+tions .ere ,ery straig(t-or.ard and -ollo.ed t(e t(eory o- sampling dis+ussed in t(e te)tbook0 =n se+tion 3030202& -or >"& .e used a sample rate o- ""#2? @z instead o- 8### @z& as .e .ere using a %3 instead o- a AN=B +omputer0 7n >2& t(e se+ond ,e+tor at a -undamental -re/uen+y o- "6?# @z produ+ed a tone t(at .as a per-e+t -i-t( abo,e t(e -irst ,e+tor 5.(i+( .as at a -undamental -re/uen+y o- ""## @z60 'or >3& doubling t(e sample rate to 22#?# @z made t(e pit+( o- t(e tones go up e)a+tly one o+ta,e& and t(e duration .as +ut e)a+tly in (al-& .(i+( .as as e)pe+ted be+ause t(e samples are being played ba+k t.i+e as -ast& so t(e -re/uen+y o- t(e tones .ill double 5an in+rease o- one o+ta,e60 1(is is analogous to playing a re+orded tape ba+k at t.i+e its re+orded speed0 =n se+tion 3030203& t(e main ob*e+ti,e .as to .rite t(e note0m -ile -or produ+ing a desired tone +orresponding to a key on t(e piano keyboard0 1(e magi+ -ormula -or +omputing t(e -re/uen+y o- t(e tone .as 25key number
$C6D"2

& .(ere t(e re-eren+e tone .e used .as A;$$#0 Eey

$C on t(e keyboard is A;$$#& and multiplying t(is -ormula by $$# ga,e us t(e -re/uen+y ot(e desired key0 1(e only tri+ky part o- generating t(e tones .as using t(e sounds+56 -un+tion in MA1LA2 instead o- t(e sound56 -un+tion0 Asing sounds+56 s+aled t(e amplitude o- t(e tones so t(at t(e ma)imum ,olume .as "0 Asing sound56 +aused t(e resulting .a,e-orm to +lip& .(i+( +reated an e--e+t t(at sounded ,ery similar to aliasing and -oldo,er& so our initial response .as to try to ad*ust t(e sample rate& making it (ig(er& to eliminate t(ese e--e+ts0 =t .asn<t until .e looked at a plot o- t(e samples t(at .e sa. t(e amplitude problem0

Conclusion
1(is lab .as a good introdu+tion to sound and .a,e-orm synt(esis .it( MA1LA2& and it also ga,e us a good -oundation in t(e basi+s o- sampling and digital audio0

S-ar putea să vă placă și