OSCtoCV Library
Diff: OSCtoCV.cpp
- Revision:
- 1:981b62bb5c87
- Parent:
- 0:cd43a974c54c
- Child:
- 4:fe335dc8d53d
--- a/OSCtoCV.cpp Sun Jan 17 09:30:32 2016 +0000 +++ b/OSCtoCV.cpp Thu Jan 28 11:39:47 2016 +0000 @@ -146,9 +146,10 @@ //------------------------------------------------------------- // Global Variables -float gOSC_cv[8]; -float gSeq_cv[16]; -float gGlide; +float gOSC_cv[8]; +float gSeq_cv[16]; +float g185_cv[8]; +float gGlide; // Sub Mode Status int gSubModeCount1 = -1; @@ -157,8 +158,16 @@ // Variables for Sequencer float gPulseCount[8] = {0}; float gGateMode[16] = {0}; +float gGateMode185[8] = {0}; float gSlide[16]; +float gSlide185[8]; float gAccent[16] = {0}; +float gAccent185[8] = {0}; + +float gPulseCountBeats[16] = {0}; +float gBeatsLevel[8] = {1}; +float gBeatsDecay[8] = {1}; +unsigned int gBeatsMatrix[8][16] = {{0}}; // Euclidean SEQ Variables float gEucA[6], gEucB[6]; @@ -168,19 +177,22 @@ gCtrl[0] /ctrl1 BPM gCtrl[1] /ctrl2 Quantize mode gCtrl[3] /ctrl4 Glide -gCtrl[4] /ctrl5 M185 Reset Count +gCtrl[4] /ctrl5 Shift CV Seq Reset Count +gCtrl[5] /ctrl6 M185 Seq Reset Count +gCtrl[6] /ctrl7 Gate Length +gCtrl[7] /ctrl8 Beats Seq Reset Count gCtrlSW[0] /ctrlsw1 Sequencer STOP gCtrlSW[1] /ctrlsw2 Euclidean Sequencer reset gCtrlSW[2] /ctrlsw3 Sequencer Loop gCtrlSW[3] /ctrlsw4 Euclid Seq ON gCtrlSW[4] /ctrlsw5 ASR Analog Mode +gCtrlSW[5] /ctrlsw6 Beats Sequencer Random Vel gArdPot[0] /pot1 Arduino pot1 gArdPot[1] /pot2 Arduino pot2 gArdSW[0] /sw1 Arduino sw1 gArdSW[1] /sw2 Arduino sw2 - */ float gCtrl[8]; @@ -241,7 +253,7 @@ // SPI Transfer // DAC8568 data word length 32bit (8bit shift out) -void UpdateCV(int control, int address, const unsigned int *data) +void UpdateCV(unsigned int control, unsigned int ch, const unsigned int *data) { switch (control) @@ -250,7 +262,7 @@ gSYNCMODE = _DISABLE; gSPI.write(00000000|control); // padding at beginning of byte and control bits - gSPI.write(address << 4 | *data >> 12); // address(ch) bits + gSPI.write(ch << 4 | *data >> 12); // address(ch) bits gSPI.write((*data << 4) >> 8); // middle 8 bits of data gSPI.write((*data << 12) >> 8 | 00001111); gSYNCMODE = _ENABLE; @@ -286,7 +298,7 @@ //------------------------------------------------------------- // CV Meter TextLCD bar meter -void UpdateCVMeter(int ch, const unsigned int *level) +void UpdateCVMeter(unsigned int ch, const unsigned int *level) { gLCD.locate ( ch, 0 ); gLCD.putc(*level * 0.0002192f); // put custom char