Synthesizer / Mbed 2 deprecated DBSMUSICPROJ4

Dependencies:   mbed

Revision:
17:6b7a31fb7702
Parent:
16:f2d46570f0e6
--- a/trigger.hpp	Thu Jul 25 11:14:24 2019 +0000
+++ b/trigger.hpp	Thu Jul 25 11:23:42 2019 +0000
@@ -10,7 +10,7 @@
 }
 
 void loopFall(){
-    loop = (!loop);
+    loop = !loop;
     pc.printf("button press \n\r");
 }
 
@@ -53,10 +53,12 @@
   //getfaderdata  
   if(clockcount == 1 && storedduration == 1){
   if (loop == 1){
+        allledoff(); 
         ToPlay = (dataTail + PlayPos)% (MAX_SAMPLES-1);      
         note = loopBuffer[ToPlay].note();
         octive = loopBuffer[ToPlay].octave();
         duration = loopBuffer[ToPlay].duration();
+        outputdecision();
         senddacout();
         pc.printf("Looping, PlayPos: %i, pos: %i, note: %i, octave: %i, duration: %i \n\r", PlayPos, ToPlay, note, octive, duration);
         if (PlayPos >= MAX_SAMPLES){
@@ -67,7 +69,7 @@
             }
         }
   else{
-  //allledoff();
+  allledoff();
   getfaderdata(); 
   gettempodata();
   //pc.printf("TEMPO %f \n\r",tempoval);
@@ -87,7 +89,7 @@
   outputdecision();
   }    
   if(clockcount == storedduration-1){
-  //allledoff();
+  allledoff();
   getfaderdata(); 
   //tempo calculations
   gettempodata();
@@ -117,8 +119,7 @@
       clockcount = 0;
     }
     }
-    allledoff();
-    outputdecision(); 
+    
     
   if(clockcount == 1 && storedduration == 1){