40 likes | 173 Views
Learn how to play music notes on your Boebot with detailed instructions on frequency adjustment, half tones, and an example melody. Follow the code snippets to create your own musical compositions.
E N D
Music notes • There are two half tones between each key except E/F and B/C • One half tone causes and increase in frequency of 21/12 • Ex.: To go from C to F, there are 5 half tones, so let C = 440, then F = 440* 25/12. • To go from C to a higher note of C, multiply by 212/12 =2.
' {$STAMP BS2} • DEBUG CLS, "i am a robot" • DEBUG CLS, "Beep!!!" • OUTPUT 2 • ode_to_joy: • FREQOUT 2, 450, 3951 • FREQOUT 2, 450, 3951 • FREQOUT 2, 450, 4186 • FREQOUT 2, 450, 4698 • FREQOUT 2, 450, 4698 'd • FREQOUT 2, 450, 4186 'c • FREQOUT 2, 450, 3951 'b • FREQOUT 2, 450, 3520 'a • FREQOUT 2, 450, 3135 'g • FREQOUT 2, 450, 3135 • FREQOUT 2, 450, 3520 • FREQOUT 2, 450, 3951 • FREQOUT 2, 675, 3951 • FREQOUT 2, 225, 3520 • FREQOUT 2, 900, 3520 'end of bar one
Example – Twinkle, Twinkle Little Star • CC GG AA GFF EE DD CGG FF EE DGG FF EE DCC GG AA GFF EE DD C