Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

Revision:
22:028f1627c262
Parent:
14:9cfe0041cc4e
Child:
30:08cc4ec58d07
diff -r 60f01b17b0a6 -r 028f1627c262 Sound/Sound.h
--- a/Sound/Sound.h	Sat May 23 14:40:40 2020 +0000
+++ b/Sound/Sound.h	Sat May 23 16:12:52 2020 +0000
@@ -2,33 +2,47 @@
 #define SOUND_H
 
 #include "mbed.h"
-//#include "LUTs.h"
 
+/**Sound class
+ * @author Luke Cartwright, University of Leeds
+ * @brief fetches data from wavetables and
+ * @ itterates through to next samples
+ * @date May 2020
+*/
 
 class Sound
 {
 public: //----------------------------------------------------------------------
-//Constructor/Destructor
-    Sound();
-    
-    ~Sound();
+/**Constructor */
+Sound();
+   
+/** Destructor */ 
+~Sound();
     
 //Variables
-int waveform;
-int frequency;
+int waveform; //waveform number select
+int frequency; //frequency of note
     
-//Functions
+//Methods
+
+/**Main sound function
+* @Takes in waveform type and frequency.
+* @ Outputs Unsigned int of wavetable value.
+* @ (Self itterates)
+*/
  uint16_t sound_main(bool initial, int waveform, int frequency); //runs main sound function
 
 
 private: //---------------------------------------------------------------------
 //Variables
-uint16_t i;
-double i_d;
-
-
+uint16_t i; //itterator as an uint
+double i_d; //itterator as a double
 
 //Functions
+/**Iterator function.
+* @Itterates through wavetable values.
+* @Outputs Next i value for sound_main function.
+*/
 uint16_t wavetable_itt(uint16_t i, int frequency); //itterates wavetable
 };
 #endif
\ No newline at end of file