Two player imu pong

Dependencies:   4DGL-uLCD-SE IMUfilter LSM9DS0 PinDetect mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers soundBuilder.h Source File

soundBuilder.h

00001 #include "Speaker.h"
00002 
00003 class Note
00004 {
00005 public:
00006     Note();
00007     Note(float, float, float);
00008     float getFreq();
00009     float getLength();
00010     float getVol();
00011     // You create your own constructors and 
00012     // member functions!!
00013 private:
00014     float freq;
00015     float length;
00016     float volume;
00017 };
00018 
00019 class SoundBuilder
00020 {
00021 public:
00022     SoundBuilder();
00023     SoundBuilder(Speaker *);
00024     void addNote(Note);
00025     void playSong();
00026     // Set Sounds
00027     // Set Songs
00028     // Play Sounds
00029     // Play Songs
00030     // Clear Songs
00031 
00032 private:
00033     Note song[20];
00034     Speaker *speaker;
00035     int ind;
00036 };