Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: trigger.hpp
- Revision:
- 14:a352cc410078
- Parent:
- 13:bc16eec2256f
- Child:
- 15:89ff99d55466
--- a/trigger.hpp Thu Jul 25 10:48:41 2019 +0000
+++ b/trigger.hpp Thu Jul 25 11:00:50 2019 +0000
@@ -52,7 +52,7 @@
fire();
//getfaderdata
if(clockcount == 1 && storedduration == 1){
- if (loop == 1){
+ if (loop == 1){
ToPlay = (dataTail + PlayPos)% (MAX_SAMPLES-1);
note = loopBuffer[ToPlay].note();
octive = loopBuffer[ToPlay].octave();
@@ -66,11 +66,11 @@
PlayPos++;
}
}
-// else{
+ else{
allledoff();
getfaderdata();
gettempodata();
- pc.printf("TEMPO %f \n\r",tempoval);
+ //pc.printf("TEMPO %f \n\r",tempoval);
//tempo calculations
//note calculations
sumprobabilitynotes();
@@ -108,19 +108,15 @@
}
// 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);
- trigout = 0;
- wait(0.0001);
- clockcount = 0;
+ if(clockcount == storedduration && sumnotes > 1){
+ senddacout();
+ trigout = 1;
+ wait(0.0001);
+ trigout = 0;
+ wait(0.0001);
+ clockcount = 0;
}
-
+ }
if(clockcount == 1 && storedduration == 1){
updateled();
}