Presentation is loading. Please wait.

Presentation is loading. Please wait.

Your robot can play a note by “beeping” Every note in music has a “frequency” – Physics of Frequencies: (http://liutaiomottola.com/formulae/freqtab.htm)http://liutaiomottola.com/formulae/freqtab.htm.

Similar presentations


Presentation on theme: "Your robot can play a note by “beeping” Every note in music has a “frequency” – Physics of Frequencies: (http://liutaiomottola.com/formulae/freqtab.htm)http://liutaiomottola.com/formulae/freqtab.htm."— Presentation transcript:

1

2

3 Your robot can play a note by “beeping” Every note in music has a “frequency” – Physics of Frequencies: (http://liutaiomottola.com/formulae/freqtab.htm)http://liutaiomottola.com/formulae/freqtab.htm Notes can be controlled by beeping the correct frequency. – beep(1, 440) -- Beep note A4 (That’s an “A” in the 4 th octave)

4 Programming music by frequency is difficult! – It’s a lot of numbers! Scribbler has set of functions that help go from notes to frequencies. Scribbler has a range of 8 octaves (same as a piano) Scribbler has all the notes. They are denoted: C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B

5 That is also the default octave which is the 5 th octave. You can create a song in python/scribbler by simply giving the note and length of the note: e.25 d.25 c.25 d.25 e.25 d.25 e.25 g.25 e.25 d.25 c.25 d.25 e.25 d.25 e.25 d.25 c.25

6 Scribbler Robots can play 2 notes simultaneously. Simply list the 2 notes on the line. F G.25 E G.25 D B.25 C C6.5 C C6.25 D B.25 E A.25 F G.25 E G.25 D B.25 E A.35 D B.25 C C6.25 F G.25 C C6.25 C1.25 C6 E6.25 B D6.50 A C6.25 G B.50 F A.25 E G.25 F A.25 E G.25 D F.25 E G.25 D F.25 C E.25 D F.25 E G.25 REST.50 C6 E6.25 B D6.50 A C6.25 G B.50 F A.25 E G.25 F A.25 E G.25 D F.25 E G.25 D F.25 C E.25 F G.25 E G.25 D B.25 C C6.5 D B.25 E A.25 F G.25 E G.25 D B.25 E A.35 D B.25 C C6.25 F G.25 C C6.50

7 Once you have the notes you need to add the timing. A whole note is 1 and half note is.5, etc. Normally a whole note is about.5 secs. You can change the tempo but sending a parameter in playSong() function. Now take the notes and the timing and you create a song! Listen…

8

9

10 from myro import * robot=Scribbler() s=readSong("chariots of fire.txt") robot.playSong(s)

11 Find a song. You need the music to the song! Code a minute of the song correctly in “scribbler” music Everyone needs to do their own song! There are enough robots for everyone.

12 Whole note/rest Half note/rest Quarter note/rest Eighth note/rest

13 If you don’t understand K’s and H’s, talk to me and I’ll try and explain!


Download ppt "Your robot can play a note by “beeping” Every note in music has a “frequency” – Physics of Frequencies: (http://liutaiomottola.com/formulae/freqtab.htm)http://liutaiomottola.com/formulae/freqtab.htm."

Similar presentations


Ads by Google