Project for playing a song on 2 meeds sending notes over I2C

Dependencies:   C12832 mbed

Committer:
jad19925
Date:
Thu Feb 13 23:29:28 2014 +0000
Revision:
7:b8f4ab589d16
Parent:
6:84c34161559e
Republished

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jad19925 1:feca2dfd8753 1 #include "music.h"
jad19925 6:84c34161559e 2 #ifndef MARIO
jad19925 6:84c34161559e 3 #define MARIO
jad19925 6:84c34161559e 4 const float marioTempo = 100;
jad19925 5:432203c226ed 5
jad19925 1:feca2dfd8753 6 //mario theme song
jad19925 1:feca2dfd8753 7 NoteName marioNotes[]={E5,E5,E5,R,C5,E5,G5,R,G4,R,
jad19925 1:feca2dfd8753 8 C5,R,G4,R,E4,R,A4,R,B4,R,Bb4,A4,
jad19925 1:feca2dfd8753 9 G4,E5,G5,A5,F5,G5,R,E5,R,C5,D5,B4,R,
jad19925 1:feca2dfd8753 10 C5,R,G4,R,E4,R,A4,R,B4,R,Bb4,A4,
jad19925 1:feca2dfd8753 11 G4,E5,G5,A5,F5,G5,R,E5,R,C5,D5,B4,R,
jad19925 1:feca2dfd8753 12 R,G5,Fs5,F5,Eb5,E5,R,Gs4,A4,C5,R,A4,C5,D5,
jad19925 1:feca2dfd8753 13 R,G5,Fs5,F5,Eb5,E5,R,C6,R,C6,C6,R,
jad19925 1:feca2dfd8753 14 R,G5,Fs5,F5,Eb5,E5,R,Gs4,A4,C5,R,A4,C5,D5,
jad19925 1:feca2dfd8753 15 R,Eb5,R,D5,R,C5,R,
jad19925 1:feca2dfd8753 16 R,G5,Fs5,F5,Eb5,E5,R,Gs4,A4,C5,R,A4,C5,D5,
jad19925 1:feca2dfd8753 17 R,G5,Fs5,F5,Eb5,E5,R,C6,R,C6,C6,R,
jad19925 1:feca2dfd8753 18 R,G5,Fs5,F5,Eb5,E5,R,Gs4,A4,C5,R,A4,C5,D5,
jad19925 1:feca2dfd8753 19 R,Eb5,R,D5,R,C5,R,
jad19925 1:feca2dfd8753 20 C5,C5,C5,R,C5,D5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 21 C5,C5,C5,R,C5,D5,E5,R,
jad19925 1:feca2dfd8753 22 C5,C5,C5,R,C5,D5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 23 E5,E5,E5,R,C5,E5,G5,G4,
jad19925 1:feca2dfd8753 24 C5,R,G4,R,E4,R,A4,R,B4,R,Bb4,A4,
jad19925 1:feca2dfd8753 25 G4,E5,G5,A5,F5,G5,R,E5,R,C5,D5,B4,R,
jad19925 1:feca2dfd8753 26 C5,R,G4,R,E4,R,A4,R,B4,R,Bb4,A4,
jad19925 1:feca2dfd8753 27 G4,E5,G5,A5,F5,G5,R,E5,R,C5,D5,B4,R,
jad19925 1:feca2dfd8753 28 E5,C5,G4,R,Gs4,A4,F5,F5,A4,
jad19925 1:feca2dfd8753 29 B4,A5,A5,A5,G5,F5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 30 E5,C5,G4,R,Gs4,A4,F5,F5,A4,
jad19925 1:feca2dfd8753 31 B4,F5,F5,F5,E5,D5,C5,G4,G4,C4,
jad19925 1:feca2dfd8753 32 E5,C5,G4,R,Gs4,A4,F5,F5,A4,
jad19925 1:feca2dfd8753 33 B4,A5,A5,A5,G5,F5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 34 E5,C5,G4,R,Gs4,A4,F5,F5,A4,
jad19925 1:feca2dfd8753 35 B4,F5,F5,F5,E5,D5,C5,G4,G4,C4,
jad19925 1:feca2dfd8753 36 C5,C5,C5,R,C5,D5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 37 C5,C5,C5,R,C5,D5,E5,R,
jad19925 1:feca2dfd8753 38 C5,C5,C5,R,C5,D5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 39 E5,E5,E5,R,C5,E5,G5,G4,
jad19925 1:feca2dfd8753 40 E5,C5,G4,R,Gs4,A4,F5,F5,A4,
jad19925 1:feca2dfd8753 41 B4,A5,A5,A5,G5,F5,E5,C5,A4,G4,
jad19925 1:feca2dfd8753 42 E5,C5,G4,R,Gs4,A4,F5,F5,A4,
jad19925 1:feca2dfd8753 43 B4,F5,F5,F5,E5,D5,C5,G4,G4,C4,
jad19925 1:feca2dfd8753 44 C5,G4,E4,A4,B4,A4,Gs4,Bb4,Gs4,
jad19925 1:feca2dfd8753 45 E4,D4,E4};
jad19925 1:feca2dfd8753 46
jad19925 1:feca2dfd8753 47 //16th note = 3
jad19925 1:feca2dfd8753 48 //8th note trip = 4
jad19925 1:feca2dfd8753 49 //8th note = 6
jad19925 1:feca2dfd8753 50 //quarter note trip = 8
jad19925 1:feca2dfd8753 51 //quarter note = 12
jad19925 1:feca2dfd8753 52 //half note = 24
jad19925 1:feca2dfd8753 53 //whole note = 48
jad19925 1:feca2dfd8753 54
jad19925 4:bd0675c58f5e 55 char marioBeats[]={3,6,3,3,3,6,6,6,6,6,
jad19925 1:feca2dfd8753 56 6,3,3,6,6,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 57 4,4,4,6,3,3,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 58 6,3,3,6,6,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 59 4,4,4,6,3,3,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 60 6,3,3,3,6,3,3,3,3,3,3,3,3,3,
jad19925 1:feca2dfd8753 61 6,3,3,3,6,3,3,3,3,3,6,6,
jad19925 1:feca2dfd8753 62 6,3,3,3,6,3,3,3,3,3,3,3,3,3,
jad19925 1:feca2dfd8753 63 6,6,3,3,6,12,12,
jad19925 1:feca2dfd8753 64 6,3,3,3,6,3,3,3,3,3,3,3,3,3,
jad19925 1:feca2dfd8753 65 6,3,3,3,6,3,3,3,3,3,6,6,
jad19925 1:feca2dfd8753 66 6,3,3,3,6,3,3,3,3,3,3,3,3,3,
jad19925 1:feca2dfd8753 67 6,6,3,3,6,12,12,
jad19925 1:feca2dfd8753 68 3,6,3,3,3,6,3,6,3,12,
jad19925 1:feca2dfd8753 69 3,6,3,3,3,3,3,24,
jad19925 1:feca2dfd8753 70 3,6,3,3,3,6,3,6,3,12,
jad19925 1:feca2dfd8753 71 3,6,3,3,3,6,12,12,
jad19925 1:feca2dfd8753 72 6,3,3,6,6,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 73 4,4,4,6,3,3,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 74 6,3,3,6,6,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 75 4,4,4,6,3,3,3,3,3,3,3,3,6,
jad19925 1:feca2dfd8753 76 3,6,3,6,6,3,6,3,12,
jad19925 1:feca2dfd8753 77 4,4,4,4,4,4,3,6,3,12,
jad19925 1:feca2dfd8753 78 3,6,3,6,6,3,6,3,12,
jad19925 1:feca2dfd8753 79 3,6,3,4,4,4,3,6,3,12,
jad19925 1:feca2dfd8753 80 3,6,3,6,6,3,6,3,12,
jad19925 1:feca2dfd8753 81 4,4,4,4,4,4,3,6,3,12,
jad19925 1:feca2dfd8753 82 3,6,3,6,6,3,6,3,12,
jad19925 1:feca2dfd8753 83 3,6,3,4,4,4,3,6,3,12,
jad19925 1:feca2dfd8753 84 3,6,3,3,3,6,3,6,3,12,
jad19925 1:feca2dfd8753 85 3,6,3,3,3,3,3,24,
jad19925 1:feca2dfd8753 86 3,6,3,3,3,6,3,6,3,12,
jad19925 1:feca2dfd8753 87 3,6,3,3,3,6,12,12,
jad19925 1:feca2dfd8753 88 3,6,3,6,6,3,6,3,12,
jad19925 1:feca2dfd8753 89 4,4,4,4,4,4,3,6,3,12,
jad19925 1:feca2dfd8753 90 3,6,3,6,6,3,6,3,12,
jad19925 1:feca2dfd8753 91 3,6,3,4,4,4,3,6,3,12,
jad19925 1:feca2dfd8753 92 9,9,6,4,4,4,4,4,4,
jad19925 6:84c34161559e 93 3,3,18};
jad19925 6:84c34161559e 94 #endif