Music Notes and your Boebot
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, 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, 675, 3951 FREQOUT 2, 225, 3520 FREQOUT 2, 900, 3520 'end of bar one
Example – Twinkle, Twinkle Little Star CC GG AA G FF EE DD C GG FF EE D GG FF EE D CC GG AA G FF EE DD C