(104 intermediate revisions by 73 users not shown)
Line 1: Line 1:
<h1 align="center">Homework 1</h1>
+
= Homework 1 =
<h1 align="center">Due Wednesday January 12, 2011</h1>
+
  
<ol>
+
= Due by 6pm, Wednesday January 19, 2011  =
<li>
+
<h2>Playing music using Matlab</h2>
+
  
 +
== How to hand in  ==
  
The frequency of any note is related to the frequency of the note middle A (A4) by the following formula:<br><math>f=2^{\frac{n}{12}}\cdot f_A</math>,<br>
+
You have two options to hand in your homework.  
where <math>n</math> is the number of haft steps from A4 and <math>f_A</math> is the frequency of A4. Note that if the note is higher than A4 then <math>n</math> is a postive integer, and if it is lower than A4 <math>n</math> is a negative integer.
+
  
<!--
+
*'''Option 1''' (preferred option, by far the easiest!)
<table border="1" cellpadding="10" size="4">
+
<tr><td>C</td><td>2x</td></tr>
+
<tr><td>B</td><td>15x/8</td></tr>
+
<tr><td>A</td><td>5x/3</td></tr>
+
<tr><td>G</td><td>3x/2</td></tr>
+
<tr><td>F</td><td>4x/3</td></tr>
+
<tr><td>E</td><td>5x/4</td></tr>
+
<tr><td>D</td><td>9x/8</td></tr>
+
<tr><td>C</td><td>x</td></tr>
+
</table>
+
-->
+
  
Recall from class that a sine wave with a 440 Hz frequency is the note A4. Write a Matlab routine that plays the three following tunes consecutively.
+
:Create a Rhea page called "hw1_ECE301S11_yourname" and post a link to it below. Post all your results on that page, including all your explanations, MATLAB code and sound files. You must read this [[Disclaimer|disclaimer]] before posting. If you wish to post anonymously, please contact your instructor to get a new login name (to be used in place of your career account login).
  
<ol type="a">
+
*'''Option 2'''
<li>
+
The main melody of the song "Smoke On The Water" by Deep Purple. You have to play the melody at its original tempo (112 beats per minute). The melody transcription is [[Media:Smoke_on_the_water.pdf|here]]. The first note is G4. The notes and their corresponding timings are written above and below the staff. In case you don't know this song, you can find it on Youtube. (You can make use of the Matlab functions <b><i>wavread</i></b> or <b><i>sound</i></b>.)
+
</li>
+
  
<li>
+
:Write a report and save it in pdf format. Then zip your report along with your code and sound files, and upload these in this [https://www.projectrhea.org/rhea/index.php/Special:DropBox?forUser=ECE301S11boutin&assn=true dropbox] .
The tune of a) played 2 times faster.
+
</li>
+
  
<li>
+
<br>[[Hw1 ECE301S11 Jeff Gaines|Hw1_ECE301S11_Jeff_Gaines]]
Take the signal <math>x(t)</math> corresponding to the tune of a) and rescale it according to the transformation <math>y(t)=x(2t)</math>
+
</li>
+
</ol>
+
  
Create a page called "hw1.1 yourname" on the course wiki in Rhea. On this page, post your Matlab code and a sound file containing your results for parts a), b), and c) above. Explain your results.
+
[Hw1 ECE301S11 Berik Sairov[https://www.projectrhea.org/rhea/index.php/User:Bsairov]]
  
If you cannot get this problem to work, then just post what you get along with your Matlab code on Rhea. We will then use your results to illustrate what can go wrong when one tries to play music with Matlab and how to fix it.
+
[[Hw1 ECE301S11 Jiaqi Jiang]]
</li>
+
  
<li>
+
[[Hw1 ECE301S11 travis rother]]
<h2>Hidden Backward Message</h2>
+
  
This extract [[Media:beatles.wav|beatles.wav]] of a song by The Beatles is said to have a subliminal message that is repeated several times.
+
[[Hw1 ECE301S11 Richard Gieseck]]  
<ol type="a">
+
<li>
+
What is the forward repeated phrase. Create a Rhea page called "hw1.2_yourname" and write your answer there.
+
</li>
+
<li>
+
Write a Matlab routine to extract the subliminal message by playing the extract backwards. On the Rhea page "hw1.2_yourname", post your code along with a sound file containing the output of your routine (i.e. the reversed version of the song). Then answer the question: Does the reverse song contain a message? If so, what is it?  (You can make use of the Matlab functions <b><i>wavread</i></b>, <b><i>wavwrite</i></b>, and <b><i>flipud</i></b>.)
+
</li>
+
</li>
+
  
 +
[[Hw1 ECE301S11 Zachary Graber]]
  
 +
[[Hw1 ECE301S11 Shannon Rigney|Hw1_ECE301S11_Shannon_Rigney]]
  
 +
[[HW1 ECE301S11 Shi Jia|HW1_ECE301S11_Shi_Jia]]
  
 +
[[Hw1 ECE301S11 Derek Richards]]
  
 +
[[Hw1 ECE301S11 Dan Sabo]]
  
 +
[[Hw1 ECE301S11 Yixin Wang]]
  
----
+
[[Hw1 ECE301S11 Yimin Xiao]]
  
[[2011 Spring ECE 301 Boutin|Back to 2011 Spring ECE 301 Boutin]]  
+
[Hw1 ECE301S11 Aziz Smagulov[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Asmagulo]]
 +
 
 +
[[Hw1 ECE301S11 Michael Gardner]]<br>
 +
 
 +
[[Hw1 ECE301S11 Alberto Peralta]] <br>
 +
 
 +
[[Hw1 ECE301S11 Sachin Santhakumar]]<br>
 +
 
 +
[[Hw1 ECE301S11 Megha Reddy]]<br>
 +
 
 +
[[Hw1 ECE301S11 Carolyn McMican|Hw1_ECE301S11_Carolyn McMican]]
 +
 
 +
[[Hw1 ECE301S11 Ethan Hall]]
 +
 
 +
[[Hw1 ECE301S11 Tridib Saha|Hw1 ECE301S11 Tridib Saha‎]]
 +
 
 +
[http://www.example.com link title]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Bo_Yuan Hw1 ECE301S11 Bo Yuan]
 +
 
 +
[[HW1 ECE301S11 Matt Mabry]]
 +
 
 +
[[Hw1 ECE301S11 Zach Bright]]
 +
 
 +
[[HW1 ECE301S11 Kyle Haver]]
 +
 
 +
[[Hw1 ECE301S11 Chris Breslin]]
 +
 
 +
[[Hw1 ECE301S11 Oliver Regele]]
 +
 
 +
[[Hw1 ECE301S11 Krishna Jhajaria]]
 +
 
 +
[[Hw1 ECE301S11 Jitbhat Patmastana]]<br>
 +
 
 +
[[Hw1 ECE301S11 Plengrapin Buason]]
 +
 
 +
[[Hw1 ECE301S11 Michael Meyer]]
 +
 
 +
[[Hw1 ECE301S11 Jordan Ramer]]
 +
 
 +
[[Hw1 ECE301S11 Ben Winski]]
 +
 
 +
[[Hw1 ECE301S11 David Baer]]
 +
 
 +
[[Hw1 ECE301S11 Zachary Flohr]]
 +
 
 +
[[Hw1 ECE301S11 Brian Epp]]
 +
 
 +
[[Hw1 ECE301S11 Ellen Fissel]]
 +
 
 +
[[Hw1 ECE301S11 Sharifah Fareena Aljunid]]
 +
 
 +
[[Hw1 ECE301S11 Nicole Samuelson]]
 +
 
 +
<br>[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Charles_Peak HW1 ECE301S11 Charles Peak]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Josh_OMeara HW1 ECE301S11 Josh O'Meara]
 +
 
 +
[[Hw1 ECE301S11 Justin Clark]]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Alexander_Szewczyk Hw1_ECE301S11_Alexander_Szewczyk]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Kaylee_Joseph Hw1_ECE301S11_Kaylee_Joseph]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Caitlin_Wippich Hw1_ECE301S11_Caitlin_Wippich]
 +
 
 +
[https://kiwi.ecn.purdue.edu/rhea/index.php/Hw1_ECE301S11_Grant_Wood Hw1_ECE301S11_Grant_Wood]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Joe_Kohnert Hw1_ECE301S11_Joe_Kohnert]
 +
 
 +
[[Hw1 ECE301S11 Michael Comasco]]
 +
 
 +
[[Hw1 ECE301S11 Artyom Melanich]]
 +
 
 +
[[HW1 ECE301S11 Jonathan Sheets]]
 +
 
 +
[[Hw1 ECE301S11 Kara Ellspermann]]
 +
 
 +
[[Hw1 ECE301S11 Christian Rivera]]
 +
 
 +
[[Hw1 ECE301S11 Shishir Biswas]]
 +
 
 +
[[Hw1 ECE301S11 Chris Romanoff]]
 +
 
 +
[[Hw1 ECE301S11 Kyle Richmond]]
 +
 
 +
[[Hw1 ECE301S11 John Frey]]
 +
 
 +
[[Hw1 ECE301S11 Joe Katz]]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/HW1_ECE301S11_Hale_Petersen HW1_ECE301S11_Hale_Petersen]
 +
 
 +
[[Hw1 ECE301S11 Craig Lechlitner]]
 +
 
 +
[[Hw1 ECE301S11 Melanie Gauci]]
 +
 
 +
[[Hw1 ECE301S11 Phillip Luce]]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Ziyan_Wang Hw1_ECE301S11_Ziyan_Wang ]
 +
 
 +
 
 +
[[Hw1 ECE301S11 Michaela Carrieres]]
 +
 
 +
[[Hw1 ECE301S11 Michael James]]
 +
 
 +
[[Hw1 ECE301S11 Nicholas Fritz]]
 +
 
 +
[[Hw1 ECE301S11 Sarah Abraham]]
 +
 
 +
[[Hw1 ECE301S11 Allan Diaz]]
 +
 
 +
[[Hw1 ECE301S11 Bob Wujek]]
 +
 
 +
[[Hw1 ECE301S11 Bhakti Khandagale]]
 +
 
 +
HW1 ECE301S11 Wendell Mendonce[https://www.projectrhea.org/rhea/index.php/HW1_ECE301S11_WendellMendonce]
 +
 
 +
[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Wei_Wang Hw1 ECE301S11 Wei Wang]
 +
 
 +
<br>[https://www.projectrhea.org/rhea/index.php/Hw1_ECE301S11_Robert_Haake Robert Haake]
 +
 
 +
<h2>If you have questions</h2>
 +
 
 +
If you have questions or cannot get this problem to work, then just post what you get along with your Matlab code on the [[HW1 ECE301 Spring2011|hw1 discussion page]]. All students are encouraged to help each other on this page. Your TA and instructor will read this page regularly and attempt to answer your questions as soon as possible.
 +
 
 +
<ol>
 +
<li><h2>Playing Music</h2></li>
 +
 
 +
<br>The frequency of any note is related to the frequency of the note middle A (A4) by the following formula:<br><math>f=2^{\frac{n}{12}}\cdot f_A</math>,<br>where <span class="texhtml">''n''</span> is the number of haft steps from A4 and <span class="texhtml">''f''<sub>''A''</sub></span> is the frequency of A4. Note that if the note is higher than A4 then <span class="texhtml">''n''</span> is a postive integer, and if it is lower than A4 <span class="texhtml">''n''</span> is a negative integer.
 +
 
 +
Recall from class that a sine wave with a 440 Hz frequency is the note A4. Write a Matlab routine that plays the three following tunes consecutively.
 +
 
 +
<ol type="a">
 +
<li>The main melody of the song "Smoke On The Water" by Deep Purple. You have to play the melody at its original tempo (112 beats per minute). The melody transcription is [[Media:Smoke_on_the_water.pdf|here]]. The first note is G4. The notes and their corresponding timings are written above and below the staff. In case you don't know this song, you can find it on Youtube. (You can make use of the Matlab functions '''''wavplay''''' or '''''sound''''' and function '''''wavwrite'''''.)
 +
<li>The tune of a) played 2 times faster.</li>
 +
<li>Take the signal <span class="texhtml">''x''(''t'')</span> corresponding to the tune of a) and rescale it according to the transformation <math>y(t)=x(2t)</math>.</li>
 +
</ol>
 +
Hand in your Matlab code and a sound file containing your results for parts a), b), and c).
 +
 
 +
<li><h2>Hidden Backward Message</h2></li>
 +
 
 +
This extract [[Media:Beatles.wav|Beatles.wav]] of a song by The Beatles is said to have a subliminal message that is repeated several times.
 +
 
 +
<ol type="a">
 +
<li>What is the forward repeated phrase.</li>
 +
<li>Write a Matlab routine to extract the subliminal message by playing the extract backwards. Hand in your Matlab code along with a sound file containing the output of your routine (i.e. the reversed version of the song). Then answer the question: Does the reverse song contain a message? If so, what is it? (You can make use of the Matlab functions '''''wavread''''', '''''wavwrite''''', and '''''flipud'''''.)</li>
 +
 
 +
----
  
<br>  
+
[[2011 Spring ECE 301 Boutin|Back to 2011 Spring ECE 301 Boutin]] <br>
  
 
[[Category:2011_Spring_ECE_301_Boutin]]
 
[[Category:2011_Spring_ECE_301_Boutin]]

Latest revision as of 17:01, 21 January 2011

Homework 1

Due by 6pm, Wednesday January 19, 2011

How to hand in

You have two options to hand in your homework.

  • Option 1 (preferred option, by far the easiest!)
Create a Rhea page called "hw1_ECE301S11_yourname" and post a link to it below. Post all your results on that page, including all your explanations, MATLAB code and sound files. You must read this disclaimer before posting. If you wish to post anonymously, please contact your instructor to get a new login name (to be used in place of your career account login).
  • Option 2
Write a report and save it in pdf format. Then zip your report along with your code and sound files, and upload these in this dropbox .


Hw1_ECE301S11_Jeff_Gaines

[Hw1 ECE301S11 Berik Sairov[1]]

Hw1 ECE301S11 Jiaqi Jiang

Hw1 ECE301S11 travis rother

Hw1 ECE301S11 Richard Gieseck

Hw1 ECE301S11 Zachary Graber

Hw1_ECE301S11_Shannon_Rigney

HW1_ECE301S11_Shi_Jia

Hw1 ECE301S11 Derek Richards

Hw1 ECE301S11 Dan Sabo

Hw1 ECE301S11 Yixin Wang

Hw1 ECE301S11 Yimin Xiao

[Hw1 ECE301S11 Aziz Smagulov[2]]

Hw1 ECE301S11 Michael Gardner

Hw1 ECE301S11 Alberto Peralta

Hw1 ECE301S11 Sachin Santhakumar

Hw1 ECE301S11 Megha Reddy

Hw1_ECE301S11_Carolyn McMican

Hw1 ECE301S11 Ethan Hall

Hw1 ECE301S11 Tridib Saha‎

link title

Hw1 ECE301S11 Bo Yuan

HW1 ECE301S11 Matt Mabry

Hw1 ECE301S11 Zach Bright

HW1 ECE301S11 Kyle Haver

Hw1 ECE301S11 Chris Breslin

Hw1 ECE301S11 Oliver Regele

Hw1 ECE301S11 Krishna Jhajaria

Hw1 ECE301S11 Jitbhat Patmastana

Hw1 ECE301S11 Plengrapin Buason

Hw1 ECE301S11 Michael Meyer

Hw1 ECE301S11 Jordan Ramer

Hw1 ECE301S11 Ben Winski

Hw1 ECE301S11 David Baer

Hw1 ECE301S11 Zachary Flohr

Hw1 ECE301S11 Brian Epp

Hw1 ECE301S11 Ellen Fissel

Hw1 ECE301S11 Sharifah Fareena Aljunid

Hw1 ECE301S11 Nicole Samuelson


HW1 ECE301S11 Charles Peak

HW1 ECE301S11 Josh O'Meara

Hw1 ECE301S11 Justin Clark

Hw1_ECE301S11_Alexander_Szewczyk

Hw1_ECE301S11_Kaylee_Joseph

Hw1_ECE301S11_Caitlin_Wippich

Hw1_ECE301S11_Grant_Wood

Hw1_ECE301S11_Joe_Kohnert

Hw1 ECE301S11 Michael Comasco

Hw1 ECE301S11 Artyom Melanich

HW1 ECE301S11 Jonathan Sheets

Hw1 ECE301S11 Kara Ellspermann

Hw1 ECE301S11 Christian Rivera

Hw1 ECE301S11 Shishir Biswas

Hw1 ECE301S11 Chris Romanoff

Hw1 ECE301S11 Kyle Richmond

Hw1 ECE301S11 John Frey

Hw1 ECE301S11 Joe Katz

HW1_ECE301S11_Hale_Petersen

Hw1 ECE301S11 Craig Lechlitner

Hw1 ECE301S11 Melanie Gauci

Hw1 ECE301S11 Phillip Luce

Hw1_ECE301S11_Ziyan_Wang


Hw1 ECE301S11 Michaela Carrieres

Hw1 ECE301S11 Michael James

Hw1 ECE301S11 Nicholas Fritz

Hw1 ECE301S11 Sarah Abraham

Hw1 ECE301S11 Allan Diaz

Hw1 ECE301S11 Bob Wujek

Hw1 ECE301S11 Bhakti Khandagale

HW1 ECE301S11 Wendell Mendonce[3]

Hw1 ECE301S11 Wei Wang


Robert Haake

If you have questions

If you have questions or cannot get this problem to work, then just post what you get along with your Matlab code on the hw1 discussion page. All students are encouraged to help each other on this page. Your TA and instructor will read this page regularly and attempt to answer your questions as soon as possible.

  1. Playing Music


  2. The frequency of any note is related to the frequency of the note middle A (A4) by the following formula:
    $ f=2^{\frac{n}{12}}\cdot f_A $,
    where n is the number of haft steps from A4 and fA is the frequency of A4. Note that if the note is higher than A4 then n is a postive integer, and if it is lower than A4 n is a negative integer.

    Recall from class that a sine wave with a 440 Hz frequency is the note A4. Write a Matlab routine that plays the three following tunes consecutively.

    1. The main melody of the song "Smoke On The Water" by Deep Purple. You have to play the melody at its original tempo (112 beats per minute). The melody transcription is here. The first note is G4. The notes and their corresponding timings are written above and below the staff. In case you don't know this song, you can find it on Youtube. (You can make use of the Matlab functions wavplay or sound and function wavwrite.)
    2. The tune of a) played 2 times faster.
    3. Take the signal x(t) corresponding to the tune of a) and rescale it according to the transformation $ y(t)=x(2t) $.

    Hand in your Matlab code and a sound file containing your results for parts a), b), and c).

  3. Hidden Backward Message

  4. This extract Beatles.wav of a song by The Beatles is said to have a subliminal message that is repeated several times.

    1. What is the forward repeated phrase.
    2. Write a Matlab routine to extract the subliminal message by playing the extract backwards. Hand in your Matlab code along with a sound file containing the output of your routine (i.e. the reversed version of the song). Then answer the question: Does the reverse song contain a message? If so, what is it? (You can make use of the Matlab functions wavread, wavwrite, and flipud.)

    3. Back to 2011 Spring ECE 301 Boutin

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett