OSCtoCV Library
Diff: OSCtoCV.cpp
- Revision:
- 6:7fb15b1b5459
- Parent:
- 4:fe335dc8d53d
diff -r abe335652add -r 7fb15b1b5459 OSCtoCV.cpp --- a/OSCtoCV.cpp Thu Feb 18 13:26:48 2016 +0000 +++ b/OSCtoCV.cpp Thu Feb 25 11:21:37 2016 +0000 @@ -13,30 +13,30 @@ // Chromatic Scale const float calibMap1[QUAN_RES1] = { -0.00076928, 0.00900736, 0.01724544, 0.02548352, 0.03372160, -0.04195968, 0.05019776, 0.05843584, 0.06667392, 0.07491200, -0.08315008, 0.09138816, 0.09962624, 0.10786432, 0.11610240, -0.12434047, 0.13258974, 0.14083999, 0.14909023, 0.15734047, -0.16559070, 0.17384095, 0.18209119, 0.19034143, 0.19859168, -0.20684192, 0.21509215, 0.22334240, 0.23159264, 0.23984288, -0.24809311, 0.25634655, 0.26460093, 0.27285531, 0.28110969, -0.28936407, 0.29761845, 0.30587283, 0.31412721, 0.32238159, -0.33063596, 0.33889034, 0.34714472, 0.35539910, 0.36365348, -0.37190786, 0.38017464, 0.38844886, 0.39672306, 0.40499726, -0.41327149, 0.42154568, 0.42981988, 0.43809411, 0.44636831, -0.45464250, 0.46291673, 0.47119093, 0.47946513, 0.48773935, -0.49601355, 0.50430328, 0.51260746, 0.52091163, 0.52921581, -0.53751999, 0.54582411, 0.55412829, 0.56243247, 0.57073665, -0.57904083, 0.58734500, 0.59564912, 0.60395330, 0.61225748, -0.62056166, 0.62890279, 0.63728637, 0.64566994, 0.65405351, -0.66243708, 0.67082065, 0.67920423, 0.68758780, 0.69597137, -0.70435494, 0.71273851, 0.72112209, 0.72950566, 0.73788923, -0.74627280, 0.75476575, 0.76334614, 0.77192658, 0.78050703, -0.78908741, 0.79766786, 0.80624831, 0.81482869, 0.82340914, -0.83198959, 0.84056997, 0.84915042, 0.85773087, 0.86631125, -0.87489170, 0.88425636, 0.89363104, 0.90300572, 0.91238040, -0.92175508, 0.93112975, 0.94050443, 0.94987911, 0.95925385, -0.96862853 +0.00076928f, 0.00900736f, 0.01724544f, 0.02548352f, 0.03372160f, +0.04195968f, 0.05019776f, 0.05843584f, 0.06667392f, 0.07491200f, +0.08315008f, 0.09138816f, 0.09962624f, 0.10786432f, 0.11610240f, +0.12434047f, 0.13258974f, 0.14083999f, 0.14909023f, 0.15734047f, +0.16559070f, 0.17384095f, 0.18209119f, 0.19034143f, 0.19859168f, +0.20684192f, 0.21509215f, 0.22334240f, 0.23159264f, 0.23984288f, +0.24809311f, 0.25634655f, 0.26460093f, 0.27285531f, 0.28110969f, +0.28936407f, 0.29761845f, 0.30587283f, 0.31412721f, 0.32238159f, +0.33063596f, 0.33889034f, 0.34714472f, 0.35539910f, 0.36365348f, +0.37190786f, 0.38017464f, 0.38844886f, 0.39672306f, 0.40499726f, +0.41327149f, 0.42154568f, 0.42981988f, 0.43809411f, 0.44636831f, +0.45464250f, 0.46291673f, 0.47119093f, 0.47946513f, 0.48773935f, +0.49601355f, 0.50430328f, 0.51260746f, 0.52091163f, 0.52921581f, +0.53751999f, 0.54582411f, 0.55412829f, 0.56243247f, 0.57073665f, +0.57904083f, 0.58734500f, 0.59564912f, 0.60395330f, 0.61225748f, +0.62056166f, 0.62890279f, 0.63728637f, 0.64566994f, 0.65405351f, +0.66243708f, 0.67082065f, 0.67920423f, 0.68758780f, 0.69597137f, +0.70435494f, 0.71273851f, 0.72112209f, 0.72950566f, 0.73788923f, +0.74627280f, 0.75476575f, 0.76334614f, 0.77192658f, 0.78050703f, +0.78908741f, 0.79766786f, 0.80624831f, 0.81482869f, 0.82340914f, +0.83198959f, 0.84056997f, 0.84915042f, 0.85773087f, 0.86631125f, +0.87489170f, 0.88425636f, 0.89363104f, 0.90300572f, 0.91238040f, +0.92175508f, 0.93112975f, 0.94050443f, 0.94987911f, 0.95925385f, +0.96862853f }; // Major Scale @@ -165,8 +165,8 @@ float gAccent185[8] = {0}; float gPulseCountBeats[16] = {0}; -float gBeatsLevel[8] = {1}; -float gBeatsDecay[8] = {1}; +float gBeatsLevel[8]; +float gBeatsDecay[8]; unsigned int gBeatsMatrix[8][16] = {{0}}; // Euclidean SEQ Variables @@ -195,12 +195,12 @@ gArdSW[1] /sw2 Arduino sw2 */ -float gCtrl[8]; +float gCtrl[8] = {0.398f, 0, 0, 0, 1.0f, 1.0f, 1.0f, 1.0f}; bool gCtrlSW[8] = {false}; // Variables for Arduino -uint16_t gArdCV[4]; -float gArdPot[2] = {408.0f, 350.0f}; +uint16_t gArdCV[4] = {0}; +float gArdPot[2] = {408.0f, 350}; bool gArdSW[2] = {false}; //------------------------------------------------------------- @@ -240,7 +240,6 @@ ); #endif - // touchOSC Address uint8_t touchOSCAddress[] = {192, 168, 1, 7}; int touchOSCPort = TOSC_PORT;