OSC-CV Converter

Dependencies:   Bonjour OSCReceiver TextLCD mbed mbed-rpc BurstSPI DebouncedInterrupt FastIO MIDI OSC OSCtoCV ClockControl

OSC to CV Converter

http://gtbts.tumblr.com/post/125663817741/osc-to-cv-converter-ver2-mbed-osctocv

/media/uploads/casiotone401/tumblr_nsg7y4pkfg1qlle9fo1_540.png

Files at this revision

API Documentation at this revision

Comitter:
casiotone401
Date:
Sat Feb 09 04:23:17 2013 +0000
Parent:
6:5796b63c70ef
Child:
8:fe50078d6b80
Commit message:
performance improvement

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Jan 28 12:30:15 2013 +0000
+++ b/main.cpp	Sat Feb 09 04:23:17 2013 +0000
@@ -229,10 +229,10 @@
 //-------------------------------------------------------------
 // Global Variables
 
-static float    gOSC_cv[8];
-static float    gSeq_cv1[8];
-static float    gSeq_cv2[8];
-static float    gGlide;
+float   gOSC_cv[8];
+float   gSeq_cv1[8];
+float   gSeq_cv2[8];
+float   gGlide;
 volatile static int gMode;
 
 // Variables for Control
@@ -268,7 +268,7 @@
  
 int main() 
 { 
-    static float pot, _pot;
+    float pot, _pot;
     int bpm, _bpm;
     int shift1, shift2, shift3, shift4;
     
@@ -696,16 +696,15 @@
 void SeqCV(int shift)
 {
     int i, j, k;
-    static int ch;
+    static int ch, SeqMode;
     static int cnt1, cnt2, cnt3;
     static int cntloop1, cntloop2, cntloop3;
-    static int SeqMode;
     static float glidecv[8];
     unsigned int cv[8];
     static float shiftcv[8];
     static float buffercv[9];
     static float loopcv[3];
-    static unsigned int quan;
+    int quan;
     float qcv;
         
     SeqMode = (unsigned int)(gCtrl[1] * (MODE_NUM - 3));    // Sequencer Quantize Mode (gCtrl[1])
@@ -970,7 +969,7 @@
 
 void CheckModeSW()
 {   
-    wait(0.02);
+    wait(0.05);
     
     if(gMode < MODE_NUM - 1) 
     {   
@@ -1001,7 +1000,7 @@
 
 void CVMeter(int ch, const unsigned int *level)
 {
-    static unsigned int cvmeter;
+    unsigned int cvmeter;
     
     cvmeter = *level / (SCALING_N / 7.9);
         
@@ -1113,7 +1112,7 @@
 inline void onUDPSocketEvent(UDPSocketEvent e)
 {
     union OSCarg msg[10];
-    static int num;
+    int num;
     unsigned int absv;
         
     switch(e)