Scribbler Music Web Design Notes Your robot can play music by “beeping” the correct notes. Every...

6
Scribbler Music Web Design

Transcript of Scribbler Music Web Design Notes Your robot can play music by “beeping” the correct notes. Every...

Scribbler Music

Scribbler MusicWeb DesignNotesYour robot can play music by beeping the correct notes.Every note in music has a frequencyPhysics of Frequencies:(http://www.phy.mtu.edu/~suits/notefreqs.html)Notes can be controlled by beeping the correct frequency.beep(1, 440) -- Beep note A4Scribbler MusicProgramming music by frequency is difficult!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

Scribbler musicThat is also the default octave which is the 5th octave.You can create a song in python/scribbler by simply giving the note and length of the note:e .25d .25c .25d .25e .25e .25e .25d .25d .25d .25e .25g .25g .25e .25d .25c .25d .25e .25e .25e .25e .25d .25d .25e .25d .25c .254SongsOnce you have the notes you need to add the timing. Easiest is to default a whole note to 1 and the .5 for half note, etc.Now you create a song!

Playing a songfrom myro import *robot=Scribbler()s=readSong("chariots of fire.txt")robot.playSong(s)

Titles (clip)VangelisChariots of Fire1981Soundtrack29423.615