player 1
Dependencies: 4DGL-uLCD-SE PinDetect SparkfunAnalogJoystick mbed-rtos mbed SDFileSystem
Fork of 4180FinalLab by
Wireless 2 Player Pong game
soundBuilder.h
- Committer:
- rishibhargava1
- Date:
- 2016-04-24
- Revision:
- 3:591086e44bf9
- Parent:
- 1:839d22d423bd
File content as of revision 3:591086e44bf9:
#include "Speaker.h" class Note { public: // Constructor Note (); Note (float, float, float); // setters void setFreq(float); void setLength(float); void setVolume(float); // getters float getFreq(); float getLength(); float getVolume(); private: float freq; float length; float volume; }; class SoundBuilder { public: // Set Song SoundBuilder (float [], float [], float [], int, Speaker *); // Set sound, where int is the note number starting from 0 void setNote(float, float, float, int); // Play Sounds void playNotes(int, int); // Play Songs void playSong(); // Clear Songs void clearSong(); private: Note song[20]; Speaker *speaker; };