Music works yo

Dependencies:   m3pi_ng m3pimaze mbed

Committer:
mmpeter
Date:
Mon Jun 02 09:00:25 2014 +0000
Revision:
0:c480ffb2a60f
Child:
1:278526f1dabc
Music's working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mmpeter 0:c480ffb2a60f 1 #include "mbed.h"
mmpeter 0:c480ffb2a60f 2 #include "m3pi_ng.h"
mmpeter 0:c480ffb2a60f 3 #include "cmath"
mmpeter 0:c480ffb2a60f 4 #include "iostream"
mmpeter 0:c480ffb2a60f 5
mmpeter 0:c480ffb2a60f 6 m3pi thinggy;
mmpeter 0:c480ffb2a60f 7
mmpeter 0:c480ffb2a60f 8 int main() {
mmpeter 0:c480ffb2a60f 9 // V=volume max is 15::O5=octave5::G16=G16th note::R24=rest24th note...a rest is needed between any two note that are the same
mmpeter 0:c480ffb2a60f 10 char dixie[]={'V','1','5','O','5','G','1','6','E','1','6','C','8','R','2','4','C','8','R','2','4','C','1','6','D','1','6','E','1','6','F','1','6','G','8','R','2','4','G','8','R','2','4','G','8','E','1','6'};
mmpeter 0:c480ffb2a60f 11 //the number of characters in the array
mmpeter 0:c480ffb2a60f 12 int numb=49;
mmpeter 0:c480ffb2a60f 13 thinggy.playtune(dixie,numb);
mmpeter 0:c480ffb2a60f 14
mmpeter 0:c480ffb2a60f 15 }
mmpeter 0:c480ffb2a60f 16