Bluetooth Enabled Keyboard/Synthesizer for mbed

Dependencies:   mbed 4DGL-uLCD-SE SDFileSystem mbed-rtos

Revision:
25:5a312725710a
Parent:
24:3bd4e691ae59
Child:
26:d4000870deab
--- a/main.cpp	Sun May 01 00:25:02 2016 +0000
+++ b/main.cpp	Sun May 01 00:26:52 2016 +0000
@@ -50,41 +50,6 @@
 
 float attackVals1[4] = {0 , 0.33 , 0.66 , 1};    //Approaches the mamimum amplitude the slowest, in a linear fashion - corresponds to an attackValue of 1
 
-
-/* Coefficient Matrices Corresponding to Different Decay Values
-each matrix is comprised of 4 elements (32/8). The first matrix corresponds
-to a decay value of 5.
-*/
-
-float decayVals5[4] = {0.67 , 0.63 , 0.62 , 0.6};  //Approaches the sustain amplitude the quickest - corresponds to a decay value of 5
-float decayVals4[4] = {0.73 , 0.675 , 0.63 , 0.60};   // Decay value of 4
-float decayVals3[4] = {0.77 , 0.7 , 0.63 , 0.60};   // Decay value of 3
-float decayVals2[4] = {0.84 , 0.73 , 0.65 , 0.6}; // Decay value of 2
-float decayVals1[4] = {0.9 , 0.8 , 0.7 , 0.6};   // Decays the slowest, in a linear fashion - corresponds to a decay value of 1
-
-/* Coefficient Matrices Corresponding to Different sustain values
-each matrix is comprised of 20 elements 5 * (32/8). The first matrix corresponds
-to a sustain value of 5. The matrices get initialized later in a for loop due to their size.
-*/
-
-float sustainVals5[20]; 
-float sustainVals4[20];
-float sustainVals3[20];
-float sustainVals2[20];
-float sustainVals1[20];
-
-/* Coefficient Matrices Corresponding to Different release values
-each matrix is comprised of 32 elements (256/8). The first matrix corresponds
-to a release value of 5.
-*/
-
-float releaseVals5[4] = {0.1 , 0.03 , 0.01 , 0};     // Releases (goes to 0 amplitude) the quickest - corresponds to a release value of 5
-float releaseVals4[4] = {0.2 , 0.1 , .04 , 0};     // Release value of 4
-float releaseVals3[4] = {0.33 , 0.16 , 0.08 , 0};     // Release value of 3
-float releaseVals2[4] = {0.4 , 0.23 , 0.1 , 0};     // Release value of 2
-float releaseVals1[4] = {0.45 , 0.30 , 0.15 , 0};     // Release value of 1 - proceeds slowest, in a linear fashion
-
-
 int noteArray[7][7] = { // Array holding different note frequencies
   C1 , D1 , E1 , F1 , G1 , A1 , B1 ,
   C2 , D2 , E2 , F2 , G2 , A2 , B2,
@@ -112,10 +77,7 @@
         break;
         }
         uLCD.printf("Octave: %i\r\n",currentOctave);        // displays octave
-        uLCD.printf("Attack: %i\r\n",currentAttackVal);     // displays attack value
-        uLCD.printf("Decay: %i\r\n",currentDecayVal);       // displays decay value
-        uLCD.printf("Sustain: %i\r\n",currentSustainVal);   // displays sustain value
-        uLCD.printf("Release: %i\r\n",currentReleaseVal);   // displays release value
+        uLCD.printf("Current ADSR Preset: %i\r\n",currentADSR);     // displays attack value
     }
 }