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:
Sun Jan 17 09:32:12 2016 +0000
Parent:
20:a44f4a024902
Child:
22:7550ceae976d
Commit message:
minor change

Changed in this revision

OSCtoCV.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/OSCtoCV.lib	Sat Jan 09 10:58:45 2016 +0000
+++ b/OSCtoCV.lib	Sun Jan 17 09:32:12 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/casiotone401/code/OSCtoCV/#f26aadbd38a8
+OSCtoCV#cd43a974c54c
--- a/main.cpp	Sat Jan 09 10:58:45 2016 +0000
+++ b/main.cpp	Sun Jan 17 09:32:12 2016 +0000
@@ -37,6 +37,8 @@
 #include "OSCtoCV_Sequencer.h"
 #include "OSCtoCV_GateSequencer.h"
 #include "OSCtoCV_Euclidean.h"
+#include "OSCtoCV_Random.h"
+#include "OSCtoCV_LFO.h"
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -49,9 +51,11 @@
 #define MODE_OSC            1        // Mode OSCtoCV 
 #define MODE_SEQ            2        // Mode Shift Sequencer
 #define MODE_185            3        // Mode M185 Sequencer
-#define MODE_EUC            4        // Mode Euclidean Sequencer 
+#define MODE_EUC            4        // Mode Euclidean Sequencer
+#define MODE_RND            5        // Mode xshift Random Generator 
+#define MODE_LFO            6        // Mode Stepped LFO 
 
-#define MODE_TOTAL          5        // Modes
+#define MODE_TOTAL          7        // Modes
 
 //-------------------------------------------------------------
 // Functions
@@ -168,6 +172,16 @@
                 EuclideanSeq(GateSeq(bpm, N16TH, GATE1, 1, NON_INVERT, GATESOUT_OFF, SYNC_OFF), gCtrlSW[0], GATESOUT_ON);
                 break;
                 
+            case MODE_RND: // Random CV Generator mode
+    
+                RandomCVGenerator(GateSeq(bpm, N32TH, GATE1, 3, NON_INVERT, GATESOUT_OFF, SYNC_ON));
+                break;
+
+            case MODE_LFO: // Stepped LFO mode
+    
+                SteppedLFO();
+                break;
+                
             default:       // CV Calibration mode
                 
                 CalibrationCV(); 
@@ -449,6 +463,7 @@
     }
     
     gCLOCKOUT = gGATES[0] = gGATES[1] = gGATES[2] = gGATES[3] = false;
+    gSubModeCount1 = gSubModeCount2 = 0;
     
     if (gMode == MODE_SEQ || gMode == MODE_185 || gMode == MODE_EUC)
     {
@@ -481,6 +496,9 @@
                     gLCD.locate( 9, 0 );
                     gLCD.printf("CLB|880");
                     
+                    gLCD.locate( 0, 1 );
+                    gLCD.printf("12345678 G>>%3.2f", gGlide);
+                    
                     sendMes.setArgs("s", "Calibration");
                     osc.sendOsc(&sendMes);
                     
@@ -834,16 +852,16 @@
                     
                 } else if (!strncmp(msg[0].address + (len - offset) - 3, "acv", 3) && (num != -1)) {
                     if (num > 3) continue;                                             
-                    gArd_cv[num] = msg[2].f * (SCALING_N);
+                    gArdCV[num] = msg[2].f * (SCALING_N);
                     continue;
                     
                 } else if (!strncmp(msg[0].address + (len - offset) - 3, "pot", 3) && (num != -1)) {
-                    if (num > 2) continue;                                             
+                    if (num > 1) continue;                                             
                     gArdPot[num] = msg[2].f;
                     continue;
                     
                 } else if (!strncmp(msg[0].address + (len - offset) - 2, "sw", 2) && (num != -1)) {
-                    if (num > 2) continue;
+                    if (num > 1) continue;
                     if (msg[2].i != 0) gArdSW[num] = true;
                     else               gArdSW[num] = false;                                       
                     continue;