change tone sounds by altering the waveforms

Dependencies:   mbed

Fork of 5_songs by MakingMusicWorkshop

Revision:
9:bf01a27b649f
Parent:
8:77227ecac915
diff -r 77227ecac915 -r bf01a27b649f main.cpp
--- a/main.cpp	Sat May 21 16:13:12 2016 +0000
+++ b/main.cpp	Sat May 21 17:20:54 2016 +0000
@@ -14,7 +14,7 @@
 static void play_tone(int tone, int duration) {
 
    int tone_period_us = 1000000/tone;
-/*    
+    
    for (long i = 0; i < duration * 1000L; i += tone_period_us * 2) {
 
         // let's change the buzzer's volume depending on how far we are
@@ -25,7 +25,7 @@
         buzzer = 0.0f;
         wait_us(tone_period_us);
     }
-*/
+/*
 #define PI 3.14159265
 
     for (long i = 0; i < duration * 1000L; i += tone_period_us * 2) {
@@ -41,7 +41,7 @@
     }
 
     buzzer = 0.0f;
-
+*/
 }
 
 static void play_song(int notes_left, int* melody, int* duration) {