Luke Cartwright / Mbed 2 deprecated ELEC2645_Project_el18loc_nearlythere

Dependencies:   mbed

Revision:
31:cfdb014ff086
Parent:
30:08cc4ec58d07
Child:
33:e7635c8a58a8
--- a/Sound/Sound.cpp	Tue May 26 10:17:47 2020 +0000
+++ b/Sound/Sound.cpp	Tue May 26 14:21:36 2020 +0000
@@ -17,25 +17,25 @@
 
 uint16_t Sound::sound_main(bool initial, int waveform, int frequency)
 {
-    if (initial==true) {
+    if (initial==true) { //initiialises
         i=0;
         return(i);
     }
-    i=wavetable_itt(i,frequency);
+    i=wavetable_itt(i,frequency);//itterates i value
     
-    if (waveform==1) {
+    if (waveform==1) { //sin values
         #ifdef SLOW_TIME
         printf("SIN_wavtable[%u]\n",i);
         #endif
         return (sin_wavtable[i]);
     }
-        if (waveform==2) {
+        if (waveform==2) { //tri
         #ifdef SLOW_TIME
         printf("TRI_wavtable[%u]\n",i);
         #endif
         return (tri_wavtable[i]);
     }
-        if (waveform==3) {
+        if (waveform==3) { //pulse
         #ifdef SLOW_TIME
         printf("SQR_wavtable[%u]\n",i);
         #endif