Synthesizer / Mbed 2 deprecated DBSMUSICPROJ4

Dependencies:   mbed

Revision:
10:778ad6af7512
Parent:
8:4719a23dad97
Child:
11:d2a8b3132be9
--- a/trigger.hpp	Thu Jul 25 10:13:45 2019 +0000
+++ b/trigger.hpp	Thu Jul 25 10:23:31 2019 +0000
@@ -11,7 +11,7 @@
 
 void loopFall(){
     loop = !loop;
-    pc.printf("button press");
+    pc.printf("button press \n\r");
 }
 
 void runonce(void){
@@ -57,7 +57,8 @@
         note = loopBuffer[ToPlay].note();
         octive = loopBuffer[ToPlay].octave();
         duration = loopBuffer[ToPlay].duration();
-        pc.printf("Loop");
+        senddacout();
+        pc.printf("Looping, pos: %i, note: %i, octave: %i, duration: %i \n\r", ToPlay, note, octive, duration);
         if (PlayPos >= MAX_SAMPLES){
             PlayPos = 0;
             }
@@ -108,8 +109,10 @@
 //  pc.printf("NOTE: %i OCTIVE: %i DURATION: %i \n\r",note,octive,duration);
 //  pc.printf("abstemmp %f \n\r",abstempo);
   if(clockcount == storedduration && sumnotes > 1){
-
+    
+    if (loop == 0){
     senddacout();
+  }
   
   trigout = 1;
   wait(0.0001);