Lawrence Quizon / Mbed OS play_wav

Dependencies:   USBMSD_BD SDFileSystem max32630fthr USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers noteplayer.h Source File

noteplayer.h

00001 #ifndef _NOTEPLAYER_H_
00002 #define _NOTEPLAYER_H_
00003 
00004 typedef enum : unsigned char {
00005     C2,Cs2,D2,Ds2,E2,F2,Fs2,G2,Gs2,A2,As2,B2,   //C2:0
00006     C3,Cs3,D3,Ds3,E3,F3,Fs3,G3,Gs3,A3,As3,B3,   //C3:12
00007     C4,Cs4,D4,Ds4,E4,F4,Fs4,G4,Gs4,A4,As4,B4,   //C4:24
00008     C5,Cs5,D5,Ds5,E5,F5,Fs5,G5,Gs5,A5,As5,B5,   //C5:36
00009     C6,Cs6,D6,Ds6,E6,F6,Fs6,G6,Gs6,             //C6:48
00010     rest,
00011     END
00012 } pitchname;
00013 
00014 typedef struct {
00015     unsigned char length;
00016     pitchname pitch;
00017 } note;
00018 
00019 int pitch2freq(pitchname pitch);
00020 
00021 #endif