Changes up to 1.6.0
This commit is contained in:
parent
c8bd07799a
commit
1a543a6734
11 changed files with 507 additions and 196 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
.vscode/ipch
|
.vscode/ipch
|
||||||
*.o
|
*.o
|
||||||
|
.DS_STORE
|
||||||
|
|
177
NuEVI/NuEVI.ino
177
NuEVI/NuEVI.ino
|
@ -92,6 +92,7 @@ unsigned short extraCT2; // OFF:1-127
|
||||||
unsigned short levelCC; // 0-127
|
unsigned short levelCC; // 0-127
|
||||||
unsigned short levelVal; // 0-127
|
unsigned short levelVal; // 0-127
|
||||||
unsigned short fingering; // 0-4 EWI,EWX,SAX,EVI,EVR
|
unsigned short fingering; // 0-4 EWI,EWX,SAX,EVI,EVR
|
||||||
|
unsigned short rollerMode; //0-2
|
||||||
unsigned short lpinky3; // 0-25 (OFF, -12 - MOD - +12)
|
unsigned short lpinky3; // 0-25 (OFF, -12 - MOD - +12)
|
||||||
unsigned short batteryType; // 0-2 ALK,NIM,LIP
|
unsigned short batteryType; // 0-2 ALK,NIM,LIP
|
||||||
unsigned short harmSetting; // 0-7
|
unsigned short harmSetting; // 0-7
|
||||||
|
@ -151,10 +152,16 @@ byte ccList[11] = {0,1,2,7,11,1,2,7,11,74,20}; // OFF, Modulation, Breath, Volu
|
||||||
int pbDepthList[13] = {8192,8192,4096,2731,2048,1638,1365,1170,1024,910,819,744,683};
|
int pbDepthList[13] = {8192,8192,4096,2731,2048,1638,1365,1170,1024,910,819,744,683};
|
||||||
|
|
||||||
#if defined(NURAD)
|
#if defined(NURAD)
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
int calOffsetRollers[6] = {-70,20,20,20,20,120};
|
||||||
|
int calOffsetRH[12] = {0,0,0,0,0,-50,121,0,0,50,0,120};
|
||||||
|
int calOffsetLH[12] = {120,0,120,0,50,115,118,0,50,0,0,0};
|
||||||
|
#else
|
||||||
int calOffsetRollers[6] = {16,10,8,21,24,41};
|
int calOffsetRollers[6] = {16,10,8,21,24,41};
|
||||||
int calOffsetRH[12] = {-88,-68,-31,13,4,120,121,-68,-85,-34,23,87};
|
int calOffsetRH[12] = {-88,-68,-31,13,4,120,121,-68,-85,-34,23,87};
|
||||||
int calOffsetLH[12] = {90,-13,-33,-93,-82,115,118,2,4,-40,-75,-94};
|
int calOffsetLH[12] = {90,-13,-33,-93,-82,115,118,2,4,-40,-75,-94};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
int battMeasured[50];
|
int battMeasured[50];
|
||||||
int battAvg = 0;
|
int battAvg = 0;
|
||||||
|
@ -191,6 +198,7 @@ uint16_t legacy = 0;
|
||||||
uint16_t legacyBrAct = 0;
|
uint16_t legacyBrAct = 0;
|
||||||
byte halfTime = 0;
|
byte halfTime = 0;
|
||||||
boolean programonce = false;
|
boolean programonce = false;
|
||||||
|
boolean oneroll;
|
||||||
byte widiOn = 0;
|
byte widiOn = 0;
|
||||||
|
|
||||||
int breathLevel=0; // breath level (smoothed) not mapped to CC value
|
int breathLevel=0; // breath level (smoothed) not mapped to CC value
|
||||||
|
@ -248,6 +256,7 @@ byte vibLedOff = 0;
|
||||||
byte oldpkey = 0;
|
byte oldpkey = 0;
|
||||||
|
|
||||||
byte lap = 0;
|
byte lap = 0;
|
||||||
|
byte rSum = 0;
|
||||||
|
|
||||||
static const float vibDepth[10] = {0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.40,0.45}; // max pitch bend values (+/-) for the vibrato settings
|
static const float vibDepth[10] = {0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.40,0.45}; // max pitch bend values (+/-) for the vibrato settings
|
||||||
static const short vibMaxBiteList[17] = {1600,1400,1200,1000,900,800,700,600,500,400,300,250,200,150,100,50,25};
|
static const short vibMaxBiteList[17] = {1600,1400,1200,1000,900,800,700,600,500,400,300,250,200,150,100,50,25};
|
||||||
|
@ -550,6 +559,7 @@ byte R2;
|
||||||
byte R3;
|
byte R3;
|
||||||
byte R4;
|
byte R4;
|
||||||
byte R5;
|
byte R5;
|
||||||
|
byte R6;
|
||||||
|
|
||||||
byte octaveR = 0;
|
byte octaveR = 0;
|
||||||
byte lastOctaveR = 0;
|
byte lastOctaveR = 0;
|
||||||
|
@ -557,7 +567,8 @@ byte lastOctaveR = 0;
|
||||||
byte halfPitchBendKey;
|
byte halfPitchBendKey;
|
||||||
byte quarterToneTrigger;
|
byte quarterToneTrigger;
|
||||||
byte specialKey;
|
byte specialKey;
|
||||||
byte pinkyKey;
|
byte patchKey = 0;
|
||||||
|
byte pinkyKey = 0;
|
||||||
byte lastSpecialKey = 0;
|
byte lastSpecialKey = 0;
|
||||||
byte lastPinkyKey = 0;
|
byte lastPinkyKey = 0;
|
||||||
int pitchlatch;
|
int pitchlatch;
|
||||||
|
@ -571,6 +582,7 @@ byte lastpcc2 = 0;
|
||||||
byte slurSustain = 0;
|
byte slurSustain = 0;
|
||||||
byte parallelChord = 0;
|
byte parallelChord = 0;
|
||||||
byte subOctaveDouble = 0;
|
byte subOctaveDouble = 0;
|
||||||
|
byte slurSostenuto = 0;
|
||||||
|
|
||||||
#if defined(NURAD)
|
#if defined(NURAD)
|
||||||
Adafruit_MPR121 touchSensorRollers = Adafruit_MPR121();
|
Adafruit_MPR121 touchSensorRollers = Adafruit_MPR121();
|
||||||
|
@ -844,6 +856,7 @@ void loop() {
|
||||||
lastpcc1=pcCombo1;
|
lastpcc1=pcCombo1;
|
||||||
lastpcc2=pcCombo2;
|
lastpcc2=pcCombo2;
|
||||||
if (
|
if (
|
||||||
|
patchKey ||
|
||||||
(bothPB && legacy) ||
|
(bothPB && legacy) ||
|
||||||
(brSuck && legacyBrAct && justPbUp) ||
|
(brSuck && legacyBrAct && justPbUp) ||
|
||||||
(brSuck && legacyBrAct && bcasMode && noPb)
|
(brSuck && legacyBrAct && bcasMode && noPb)
|
||||||
|
@ -956,6 +969,7 @@ void loop() {
|
||||||
if (K4) {
|
if (K4) {
|
||||||
if (!slurSustain) {
|
if (!slurSustain) {
|
||||||
slurSustain = 1;
|
slurSustain = 1;
|
||||||
|
slurSostenuto = 0;
|
||||||
parallelChord = 0;
|
parallelChord = 0;
|
||||||
rotatorOn = 0;
|
rotatorOn = 0;
|
||||||
} else slurSustain = 0;
|
} else slurSustain = 0;
|
||||||
|
@ -973,11 +987,19 @@ void loop() {
|
||||||
rotatorOn = 0;
|
rotatorOn = 0;
|
||||||
} else subOctaveDouble = 0;
|
} else subOctaveDouble = 0;
|
||||||
}
|
}
|
||||||
if (!K1 && !K4 && !K5) {
|
if (K2) {
|
||||||
|
if (!slurSostenuto) {
|
||||||
|
slurSostenuto = 1;
|
||||||
|
slurSustain = 0;
|
||||||
|
//rotatorOn = 0;
|
||||||
|
} else slurSostenuto = 0;
|
||||||
|
}
|
||||||
|
if (!K1 && !K4 && !K5 && !K2 && !pinkyKey) {
|
||||||
slurSustain = 0;
|
slurSustain = 0;
|
||||||
parallelChord = 0;
|
parallelChord = 0;
|
||||||
subOctaveDouble = 0;
|
subOctaveDouble = 0;
|
||||||
rotatorOn = 0;
|
rotatorOn = 0;
|
||||||
|
slurSostenuto = 0;
|
||||||
}
|
}
|
||||||
if (pinkyKey) {
|
if (pinkyKey) {
|
||||||
if (!rotatorOn) {
|
if (!rotatorOn) {
|
||||||
|
@ -996,6 +1018,7 @@ void loop() {
|
||||||
slurSustain = 0;
|
slurSustain = 0;
|
||||||
parallelChord = 0;
|
parallelChord = 0;
|
||||||
subOctaveDouble = 0;
|
subOctaveDouble = 0;
|
||||||
|
slurSostenuto = 0;
|
||||||
}
|
}
|
||||||
if ((pinkySetting == LVL) || (pinkySetting == LVLP)){
|
if ((pinkySetting == LVL) || (pinkySetting == LVLP)){
|
||||||
if (pinkyKey && K7){
|
if (pinkyKey && K7){
|
||||||
|
@ -1145,6 +1168,9 @@ void loop() {
|
||||||
if (!priority) { // mono prio to base note
|
if (!priority) { // mono prio to base note
|
||||||
midiSendNoteOn(fingeredNote, velocitySend); // send Note On message for new note
|
midiSendNoteOn(fingeredNote, velocitySend); // send Note On message for new note
|
||||||
}
|
}
|
||||||
|
if (slurSostenuto) {
|
||||||
|
midiSendControlChange(66, 127);
|
||||||
|
}
|
||||||
activeNote = fingeredNote;
|
activeNote = fingeredNote;
|
||||||
mainState = NOTE_ON;
|
mainState = NOTE_ON;
|
||||||
}
|
}
|
||||||
|
@ -1220,6 +1246,9 @@ void loop() {
|
||||||
if (slurSustain) {
|
if (slurSustain) {
|
||||||
midiSendControlChange(64, 0);
|
midiSendControlChange(64, 0);
|
||||||
}
|
}
|
||||||
|
if (slurSostenuto) {
|
||||||
|
midiSendControlChange(66, 0);
|
||||||
|
}
|
||||||
breathLevel = 0;
|
breathLevel = 0;
|
||||||
mainState = NOTE_OFF;
|
mainState = NOTE_OFF;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1429,7 +1458,7 @@ void loop() {
|
||||||
// even if we just alter a pixel, the whole display is redrawn (35ms of MPU lockup) and we can't do that all the time
|
// even if we just alter a pixel, the whole display is redrawn (35ms of MPU lockup) and we can't do that all the time
|
||||||
// this is one of the big reasons the display is for setup use only
|
// this is one of the big reasons the display is for setup use only
|
||||||
drawSensorPixels(); // live sensor monitoring for the setup screens
|
drawSensorPixels(); // live sensor monitoring for the setup screens
|
||||||
if (rotatorOn || slurSustain || parallelChord || subOctaveDouble || gateOpen) {
|
if (rotatorOn || slurSustain || parallelChord || subOctaveDouble || slurSostenuto || gateOpen) {
|
||||||
statusLedFlip();
|
statusLedFlip();
|
||||||
} else {
|
} else {
|
||||||
statusLedOn();
|
statusLedOn();
|
||||||
|
@ -1903,9 +1932,15 @@ void portamento_() {
|
||||||
if (2 == leverControl) {
|
if (2 == leverControl) {
|
||||||
// Portamento is controlled with thumb lever
|
// Portamento is controlled with thumb lever
|
||||||
leverPortRead = touchRead(vibratoPin);
|
leverPortRead = touchRead(vibratoPin);
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
if (portamento && ((leverPortRead) >= leverThrVal)) { // if we are enabled and over the threshold, send portamento
|
||||||
|
portSumCC += map(constrain((leverPortRead), leverThrVal, leverMaxVal), leverThrVal, leverMaxVal, 0, portLimit);
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (portamento && ((3000-leverPortRead) >= leverThrVal)) { // if we are enabled and over the threshold, send portamento
|
if (portamento && ((3000-leverPortRead) >= leverThrVal)) { // if we are enabled and over the threshold, send portamento
|
||||||
portSumCC += map(constrain((3000-leverPortRead), leverThrVal, leverMaxVal), leverThrVal, leverMaxVal, 0, portLimit);
|
portSumCC += map(constrain((3000-leverPortRead), leverThrVal, leverMaxVal), leverThrVal, leverMaxVal, 0, portLimit);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
portSumCC = constrain(portSumCC, 0, portLimit); // Total output glide rate limited to glide max setting
|
portSumCC = constrain(portSumCC, 0, portLimit); // Total output glide rate limited to glide max setting
|
||||||
if (portSumCC) { // there is a portamento level, so go for it
|
if (portSumCC) { // there is a portamento level, so go for it
|
||||||
|
@ -2111,13 +2146,15 @@ void readSwitches() {
|
||||||
//touchValueRollers[i]=touchSensorRollers.filteredData(i) - calOffsetRollers[i];
|
//touchValueRollers[i]=touchSensorRollers.filteredData(i) - calOffsetRollers[i];
|
||||||
touchValueRollers[i]=touchSensorRollers.filteredData(i) * (300-calOffsetRollers[i])/300;
|
touchValueRollers[i]=touchSensorRollers.filteredData(i) * (300-calOffsetRollers[i])/300;
|
||||||
}
|
}
|
||||||
// 6-pin version
|
#if defined(SEAMUS)
|
||||||
|
/*
|
||||||
|
// 5-pin version
|
||||||
octaveR = 0;
|
octaveR = 0;
|
||||||
if (touchValueRollers[rPin6] < ctouchThrVal) octaveR = 6; //R6
|
if ((R5=(touchValueRollers[rPin5] < ctouchThrVal)) && ((touchValueRollers[rPin1] < ctouchThrVal))) octaveR = 6; //R6 = R5 && R1
|
||||||
else if (R5=(touchValueRollers[rPin5] < ctouchThrVal)) octaveR = 5; //R5 (store for combo check)
|
else if (R5=(touchValueRollers[rPin5] < ctouchThrVal)) octaveR = 5; //R5
|
||||||
else if (R4=(touchValueRollers[rPin4] < ctouchThrVal)) octaveR = 4; //R4 (store for combo check)
|
else if (R4=(touchValueRollers[rPin4] < ctouchThrVal)) octaveR = 4; //R4
|
||||||
else if (R3=(touchValueRollers[rPin3] < ctouchThrVal)) octaveR = 3; //R3 (store for combo check)
|
else if ((R3=(touchValueRollers[rPin3] < ctouchThrVal)) && lastOctaveR) octaveR = 3; //R3
|
||||||
else if (R2=(touchValueRollers[rPin2] < ctouchThrVal)) octaveR = 2; //R2 (store for combo check)
|
else if (R2=(touchValueRollers[rPin2] < ctouchThrVal)) octaveR = 2; //R2
|
||||||
else if (touchValueRollers[rPin1] < ctouchThrVal) octaveR = 1; //R1
|
else if (touchValueRollers[rPin1] < ctouchThrVal) octaveR = 1; //R1
|
||||||
else if (lastOctaveR > 1) {
|
else if (lastOctaveR > 1) {
|
||||||
octaveR = lastOctaveR;
|
octaveR = lastOctaveR;
|
||||||
|
@ -2125,18 +2162,70 @@ void readSwitches() {
|
||||||
if (mainState == NOTE_OFF) currentRotation = 3; //rotator reset by releasing rollers
|
if (mainState == NOTE_OFF) currentRotation = 3; //rotator reset by releasing rollers
|
||||||
}
|
}
|
||||||
//if rollers are released and we are not coming down from roller 1, stay at the higher octave
|
//if rollers are released and we are not coming down from roller 1, stay at the higher octave
|
||||||
|
//CV filter leak prevention when putting NuEVI aside
|
||||||
lastOctaveR = octaveR;
|
|
||||||
/*
|
|
||||||
//5-pin version
|
|
||||||
octaveR = 0;
|
|
||||||
if ((touchValueRollers[rPin5] < ctouchThrVal) && (touchValueRollers[rPin3] < ctouchThrVal)) octaveR = 6; //R6
|
|
||||||
else if (touchValueRollers[rPin5] < ctouchThrVal) octaveR = 5; //R5
|
|
||||||
else if (touchValueRollers[rPin4] < ctouchThrVal) octaveR = 4; //R4
|
|
||||||
else if (touchValueRollers[rPin3] < ctouchThrVal) octaveR = 3; //R3
|
|
||||||
else if (touchValueRollers[rPin2] < ctouchThrVal) octaveR = 2; //R2
|
|
||||||
else if (touchValueRollers[rPin1] < ctouchThrVal) octaveR = 1; //R1
|
|
||||||
*/
|
*/
|
||||||
|
// 5-pin version, 1 & 6 common
|
||||||
|
|
||||||
|
R1=(touchValueRollers[rPin1] < ctouchThrVal);
|
||||||
|
R2=(touchValueRollers[rPin2] < ctouchThrVal);
|
||||||
|
R3=(touchValueRollers[rPin3] < ctouchThrVal);
|
||||||
|
R4=(touchValueRollers[rPin4] < ctouchThrVal);
|
||||||
|
R5=(touchValueRollers[rPin5] < ctouchThrVal);
|
||||||
|
rSum = R1+R2+R3+R4+R5;
|
||||||
|
|
||||||
|
octaveR = 0;
|
||||||
|
oneroll = (rollerMode < 2);
|
||||||
|
if (R5 && R1) octaveR = 6; //R6 = R5 && R1
|
||||||
|
else if (R5 && (R4 || oneroll)) octaveR = 5; //R5
|
||||||
|
else if (R4 && (R3 || oneroll)) octaveR = 4; //R4
|
||||||
|
else if (R3 && (R2 || oneroll)) octaveR = 3; //R3
|
||||||
|
else if (R2 && (R1 || oneroll)) octaveR = 2; //R2
|
||||||
|
else if (R1) octaveR = 1; //R1
|
||||||
|
else if (lastOctaveR > 1) {
|
||||||
|
if (rollerMode) octaveR = lastOctaveR; //if rollers are released and we are not coming down from roller 1, stay at the higher octave
|
||||||
|
if (otfKey && !rSum && polySelect && (polySelect<RT1) && rotatorOn && (mainState == NOTE_OFF)) hmzKey = fingeredNote%12;
|
||||||
|
if (mainState == NOTE_OFF) currentRotation = 3; //rotator reset by releasing rollers
|
||||||
|
}
|
||||||
|
if ((3 == rollerMode) && R1 && !R5 && (6 == lastOctaveR)) octaveR = 7; // Bonus octave on top
|
||||||
|
// Roller modes
|
||||||
|
// 0: Highest touched roller, no release memory (legacy style), 1 in menu
|
||||||
|
// 1: Highest touched roller, release memory, 2 in menu
|
||||||
|
// 2: Touched roller pair, release memory, 3 in menu
|
||||||
|
// 3: Touched roller pair, release memory, bonus octave on top, 4 in menu
|
||||||
|
|
||||||
|
#else
|
||||||
|
// 6-pin version, NuRAD
|
||||||
|
|
||||||
|
R1=(touchValueRollers[rPin1] < ctouchThrVal);
|
||||||
|
R2=(touchValueRollers[rPin2] < ctouchThrVal);
|
||||||
|
R3=(touchValueRollers[rPin3] < ctouchThrVal);
|
||||||
|
R4=(touchValueRollers[rPin4] < ctouchThrVal);
|
||||||
|
R5=(touchValueRollers[rPin5] < ctouchThrVal);
|
||||||
|
R6=(touchValueRollers[rPin6] < ctouchThrVal);
|
||||||
|
rSum = R1+R2+R3+R4+R5+R6;
|
||||||
|
|
||||||
|
octaveR = 0;
|
||||||
|
oneroll = (rollerMode < 2);
|
||||||
|
if (R6 && (R5 || oneroll)) octaveR = 6; //R6
|
||||||
|
else if (R5 && (R4 || oneroll)) octaveR = 5; //R5
|
||||||
|
else if (R4 && (R3 || oneroll)) octaveR = 4; //R4
|
||||||
|
else if (R3 && (R2 || oneroll)) octaveR = 3; //R3
|
||||||
|
else if (R2 && (R1 || oneroll)) octaveR = 2; //R2
|
||||||
|
else if (R1) octaveR = 1; //R1
|
||||||
|
else if (lastOctaveR > 1) {
|
||||||
|
if (rollerMode) octaveR = lastOctaveR; //if rollers are released and we are not coming down from roller 1, stay at the higher octave
|
||||||
|
if (otfKey && !rSum && polySelect && (polySelect<RT1) && rotatorOn && (mainState == NOTE_OFF)) hmzKey = fingeredNote%12;
|
||||||
|
if (mainState == NOTE_OFF) currentRotation = 3; //rotator reset by releasing rollers
|
||||||
|
}
|
||||||
|
if ((3 == rollerMode) && R6 && !R5 && (6 == lastOctaveR)) octaveR = 7; // Bonus octave on top
|
||||||
|
// Roller modes
|
||||||
|
// 0: Highest touched roller, no release memory (legacy style), 1 in menu
|
||||||
|
// 1: Highest touched roller, release memory, 2 in menu
|
||||||
|
// 2: Touched roller pair, release memory, 3 in menu
|
||||||
|
// 3: Touched roller pair, release memory, bonus octave on top, 4 in menu
|
||||||
|
#endif
|
||||||
|
lastOctaveR = octaveR;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// RH keys
|
// RH keys
|
||||||
|
@ -2152,7 +2241,12 @@ void readSwitches() {
|
||||||
RHp1=(touchValueRH[RHp1Pin] < ctouchThrVal);
|
RHp1=(touchValueRH[RHp1Pin] < ctouchThrVal);
|
||||||
RHp2=(touchValueRH[RHp2Pin] < ctouchThrVal);
|
RHp2=(touchValueRH[RHp2Pin] < ctouchThrVal);
|
||||||
RHp3=(touchValueRH[RHp3Pin] < ctouchThrVal);
|
RHp3=(touchValueRH[RHp3Pin] < ctouchThrVal);
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
specialKey=(touchValueRH[spec1Pin] < ctouchThrVal);
|
||||||
|
#else
|
||||||
specialKey=(touchValueRH[spec1Pin] < ctouchThrVal) && (touchValueRH[spec2Pin] < ctouchThrVal);
|
specialKey=(touchValueRH[spec1Pin] < ctouchThrVal) && (touchValueRH[spec2Pin] < ctouchThrVal);
|
||||||
|
#endif
|
||||||
|
patchKey=(touchValueRH[patchPin] < ctouchThrVal);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// LH keys
|
// LH keys
|
||||||
|
@ -2172,6 +2266,15 @@ void readSwitches() {
|
||||||
}
|
}
|
||||||
if (lap<2) lap++; else lap=0;
|
if (lap<2) lap++; else lap=0;
|
||||||
|
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
K1=RH1;
|
||||||
|
K2=RH2;
|
||||||
|
K3=RH3;
|
||||||
|
K4=LHp1;
|
||||||
|
K5=RHs;
|
||||||
|
K6=LHp2;
|
||||||
|
K7=RHp3;
|
||||||
|
#else
|
||||||
K1=RHp2;
|
K1=RHp2;
|
||||||
K2=LHp2;
|
K2=LHp2;
|
||||||
K3=LHp3;
|
K3=LHp3;
|
||||||
|
@ -2179,7 +2282,7 @@ void readSwitches() {
|
||||||
K5=RHp1;
|
K5=RHp1;
|
||||||
K6=RHp2;
|
K6=RHp2;
|
||||||
K7=RHp3;
|
K7=RHp3;
|
||||||
|
#endif
|
||||||
pinkyKey = LHs || ((lpinky3==MOD) && LHp3);
|
pinkyKey = LHs || ((lpinky3==MOD) && LHp3);
|
||||||
|
|
||||||
int qTransp = ((pinkyKey && (pinkySetting < 25)) ? pinkySetting-12 : 0) + ((LHp3 && lpinky3) ? lpinky3-13 : 0);
|
int qTransp = ((pinkyKey && (pinkySetting < 25)) ? pinkySetting-12 : 0) + ((LHp3 && lpinky3) ? lpinky3-13 : 0);
|
||||||
|
@ -2219,12 +2322,22 @@ void readSwitches() {
|
||||||
}
|
}
|
||||||
if (matched<11 && combo==17) fingeredNoteUntransposed=lastFingering; else fingeredNoteUntransposed = startNote+1+saxFingerResult[combo-1]-LHp2+RHs-(RHp2 && (1 == combo) && LHp2)+octaveR*12;
|
if (matched<11 && combo==17) fingeredNoteUntransposed=lastFingering; else fingeredNoteUntransposed = startNote+1+saxFingerResult[combo-1]-LHp2+RHs-(RHp2 && (1 == combo) && LHp2)+octaveR*12;
|
||||||
} else if (3==fingering) { // EVI fingering
|
} else if (3==fingering) { // EVI fingering
|
||||||
|
|
||||||
fingeredNoteUntransposed = startNote
|
fingeredNoteUntransposed = startNote
|
||||||
- 2*RH1 - RH2 - 3*RH3 //"Trumpet valves"
|
- 2*RH1 - RH2 - 3*RH3 //"Trumpet valves"
|
||||||
- 5*LH1 //Fifth key
|
- 5*LH1 //Fifth key
|
||||||
+ 2*RHs + 4*RHp3 //Trill keys +2 and +4
|
+ 2*RHs + 4*RHp3 //Trill keys +2 and +4
|
||||||
+ (!LH2 || !LH3 || LHp2) // Trill +1 achieved by lifting finger from LH2 or LH3, or touching LHp2
|
+ (!LH2 || !LH3 || LHp2) // Trill +1 achieved by lifting finger from LH2 or LH3, or touching LHp2
|
||||||
+ octaveR*12; //Octave rollers
|
+ octaveR*12; //Octave rollers
|
||||||
|
|
||||||
|
/*
|
||||||
|
//Evan special fingering test
|
||||||
|
fingeredNoteUntransposed = startNote
|
||||||
|
- 2*RH1 - RH2 - 3*RH3 //"Trumpet valves"
|
||||||
|
- 5*LH1 //Fifth key
|
||||||
|
- 12*LH3 - 24*LH2 //Octaves on LH2 and LH3
|
||||||
|
+ octaveR*12; //Octave rollers
|
||||||
|
*/
|
||||||
} else { // EVI fingering with reversed octave rollers
|
} else { // EVI fingering with reversed octave rollers
|
||||||
fingeredNoteUntransposed = startNote
|
fingeredNoteUntransposed = startNote
|
||||||
- 2*RH1 - RH2 - 3*RH3 //"Trumpet valves"
|
- 2*RH1 - RH2 - 3*RH3 //"Trumpet valves"
|
||||||
|
@ -2253,21 +2366,27 @@ void readSwitches() {
|
||||||
R3 = touchKeys[R3Pin];
|
R3 = touchKeys[R3Pin];
|
||||||
R4 = touchKeys[R4Pin];
|
R4 = touchKeys[R4Pin];
|
||||||
R5 = touchKeys[R5Pin];
|
R5 = touchKeys[R5Pin];
|
||||||
|
rSum = R1+R2+R3+R4+R5;
|
||||||
|
|
||||||
octaveR = 0;
|
octaveR = 0;
|
||||||
|
oneroll = (rollerMode < 2);
|
||||||
if (R5 && R3) octaveR = 6; //R6 = R5 && R3
|
if (R5 && R3) octaveR = 6; //R6 = R5 && R3
|
||||||
else if (R5) octaveR = 5; //R5
|
else if (R5 && (R4 || oneroll)) octaveR = 5; //R5
|
||||||
else if (R4) octaveR = 4; //R4
|
else if (R4 && (R3 || oneroll)) octaveR = 4; //R4
|
||||||
else if (R3 && lastOctaveR) octaveR = 3; //R3
|
else if (R3 && (R2 || (oneroll && lastOctaveR))) octaveR = 3; //R3
|
||||||
else if (R2) octaveR = 2; //R2
|
else if (R2 && (R1 || oneroll)) octaveR = 2; //R2
|
||||||
else if (R1) octaveR = 1; //R1
|
else if (R1) octaveR = 1; //R1
|
||||||
else if (lastOctaveR > 1) {
|
else if (lastOctaveR > 1) {
|
||||||
octaveR = lastOctaveR;
|
if (rollerMode) octaveR = lastOctaveR; //if rollers are released and we are not coming down from roller 1, stay at the higher octave (CV filter leak prevention when putting NuEVI aside)
|
||||||
if (otfKey && polySelect && (polySelect<RT1) && rotatorOn && (mainState == NOTE_OFF)) hmzKey = fingeredNote%12;
|
if (otfKey && !rSum && polySelect && (polySelect<RT1) && rotatorOn && (mainState == NOTE_OFF)) hmzKey = fingeredNote%12;
|
||||||
if (mainState == NOTE_OFF) currentRotation = 3; //rotator reset by releasing rollers
|
if (mainState == NOTE_OFF) currentRotation = 3; //rotator reset by releasing rollers
|
||||||
}
|
}
|
||||||
//if rollers are released and we are not coming down from roller 1, stay at the higher octave
|
if ((3 == rollerMode) && R3 && !R5 && (6 == lastOctaveR)) octaveR = 7; // Bonus octave on top
|
||||||
//CV filter leak prevention when putting NuEVI aside
|
// Roller modes
|
||||||
|
// 0: Highest touched roller, no release memory (legacy style), 1 in menu
|
||||||
|
// 1: Highest touched roller, release memory, 2 in menu
|
||||||
|
// 2: Touched roller pair, release memory, 3 in menu
|
||||||
|
// 3: Touched roller pair, release memory, bonus octave on top, 4 in menu
|
||||||
|
|
||||||
lastOctaveR = octaveR;
|
lastOctaveR = octaveR;
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,11 @@ void autoCalSelected() {
|
||||||
}
|
}
|
||||||
// Lever
|
// Lever
|
||||||
if(adjustOption == 5) {
|
if(adjustOption == 5) {
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
calRead = touchRead(vibratoPin);
|
||||||
|
#else
|
||||||
calRead = 3000-touchRead(vibratoPin);
|
calRead = 3000-touchRead(vibratoPin);
|
||||||
|
#endif
|
||||||
leverThrVal = constrain(calRead+60, leverLoLimit, leverHiLimit);
|
leverThrVal = constrain(calRead+60, leverLoLimit, leverHiLimit);
|
||||||
leverMaxVal = constrain(calRead+120, leverLoLimit, leverHiLimit);
|
leverMaxVal = constrain(calRead+120, leverLoLimit, leverHiLimit);
|
||||||
writeSetting(LEVER_THR_ADDR, leverThrVal);
|
writeSetting(LEVER_THR_ADDR, leverThrVal);
|
||||||
|
@ -419,7 +423,11 @@ void plotSensorPixels(){
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if(adjustOption == 5) {
|
else if(adjustOption == 5) {
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
int pos = map(constrain(touchRead(vibratoPin), leverLoLimit, leverHiLimit), leverLoLimit, leverHiLimit, 28, 118);
|
||||||
|
#else
|
||||||
int pos = map(constrain(3000-touchRead(vibratoPin), leverLoLimit, leverHiLimit), leverLoLimit, leverHiLimit, 28, 118);
|
int pos = map(constrain(3000-touchRead(vibratoPin), leverLoLimit, leverHiLimit), leverLoLimit, leverHiLimit, 28, 118);
|
||||||
|
#endif
|
||||||
redraw = updateSensorPixel(pos, -1);
|
redraw = updateSensorPixel(pos, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// Compile options, comment/uncomment to change
|
// Compile options, comment/uncomment to change
|
||||||
|
|
||||||
#define FIRMWARE_VERSION "1.5b8" // FIRMWARE VERSION NUMBER HERE <<<<<<<<<<<<<<<<<<<<<<<
|
#define FIRMWARE_VERSION "1.6.0" // FIRMWARE VERSION NUMBER HERE <<<<<<<<<<<<<<<<<<<<<<<
|
||||||
|
|
||||||
#define ON_Delay 20 // Set Delay after ON threshold before velocity is checked (wait for tounging peak)
|
#define ON_Delay 20 // Set Delay after ON threshold before velocity is checked (wait for tounging peak)
|
||||||
#define CCN_Port 5 // Controller number for portamento level
|
#define CCN_Port 5 // Controller number for portamento level
|
||||||
|
|
|
@ -100,6 +100,7 @@ extern unsigned short extraCT2; // OFF:1-127
|
||||||
extern unsigned short levelCC; // 0-127
|
extern unsigned short levelCC; // 0-127
|
||||||
extern unsigned short levelVal; // 0-127
|
extern unsigned short levelVal; // 0-127
|
||||||
extern unsigned short fingering; // 0-4 EWI,EWX,SAX,EVI,EVR
|
extern unsigned short fingering; // 0-4 EWI,EWX,SAX,EVI,EVR
|
||||||
|
extern unsigned short rollerMode; //0-2
|
||||||
extern unsigned short lpinky3; // 0-25 (OFF, -12 - MOD - +12)
|
extern unsigned short lpinky3; // 0-25 (OFF, -12 - MOD - +12)
|
||||||
extern unsigned short batteryType; // 0-2 ALK,NIM,LIP
|
extern unsigned short batteryType; // 0-2 ALK,NIM,LIP
|
||||||
extern unsigned short harmSetting; // 0-7
|
extern unsigned short harmSetting; // 0-7
|
||||||
|
@ -219,6 +220,7 @@ extern byte halfPitchBendKey;
|
||||||
extern byte quarterToneTrigger;
|
extern byte quarterToneTrigger;
|
||||||
extern byte specialKey;
|
extern byte specialKey;
|
||||||
extern byte pinkyKey;
|
extern byte pinkyKey;
|
||||||
|
extern byte patchKey;
|
||||||
|
|
||||||
extern unsigned int multiMap(unsigned short val, const unsigned short * _in, const unsigned short * _out, uint8_t size);
|
extern unsigned int multiMap(unsigned short val, const unsigned short * _in, const unsigned short * _out, uint8_t size);
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#define REVB
|
#define REVB
|
||||||
//#define NURAD
|
//#define NURAD
|
||||||
|
//#define SEAMUS
|
||||||
|
|
||||||
//#define I2CSCANNER
|
//#define I2CSCANNER
|
||||||
|
|
||||||
|
@ -72,6 +73,7 @@
|
||||||
#define RHp3Pin 7
|
#define RHp3Pin 7
|
||||||
#define spec1Pin 10
|
#define spec1Pin 10
|
||||||
#define spec2Pin 9
|
#define spec2Pin 9
|
||||||
|
#define patchPin 5
|
||||||
|
|
||||||
// MPR121 LH 0x5B
|
// MPR121 LH 0x5B
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,30 @@
|
||||||
// Do things with status LED.
|
// Do things with status LED.
|
||||||
void statusLedOn() {
|
void statusLedOn() {
|
||||||
digitalWrite(statusLedPin, HIGH);
|
digitalWrite(statusLedPin, HIGH);
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
analogWrite(sLedPin, SPCKEY_LED_BRIGHTNESS);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void statusLedOff() {
|
void statusLedOff() {
|
||||||
digitalWrite(statusLedPin, LOW);
|
digitalWrite(statusLedPin, LOW);
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
analogWrite(sLedPin, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void statusLed(bool state) {
|
void statusLed(bool state) {
|
||||||
digitalWrite(statusLedPin, state);
|
digitalWrite(statusLedPin, state);
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
analogWrite(sLedPin, state*SPCKEY_LED_BRIGHTNESS);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void statusLedFlip() {
|
void statusLedFlip() {
|
||||||
digitalWrite(statusLedPin, !digitalRead(statusLedPin));
|
digitalWrite(statusLedPin, !digitalRead(statusLedPin));
|
||||||
|
#if defined(SEAMUS)
|
||||||
|
if (digitalRead(statusLedPin)) analogWrite(sLedPin, SPCKEY_LED_BRIGHTNESS); else analogWrite(sLedPin, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void statusLedFlash(uint16_t delayTime) {
|
void statusLedFlash(uint16_t delayTime) {
|
||||||
|
|
161
NuEVI/menu.cpp
161
NuEVI/menu.cpp
|
@ -19,6 +19,9 @@ enum CursorIdx {
|
||||||
ERotator,
|
ERotator,
|
||||||
EVibrato,
|
EVibrato,
|
||||||
EExtras,
|
EExtras,
|
||||||
|
ERotSubA,
|
||||||
|
ERotSubB,
|
||||||
|
ERotSubC,
|
||||||
// NEVER ADD ANYTHING AFTER THIS, ONLY ABOVE
|
// NEVER ADD ANYTHING AFTER THIS, ONLY ABOVE
|
||||||
NUM_CURSORS
|
NUM_CURSORS
|
||||||
};
|
};
|
||||||
|
@ -546,6 +549,10 @@ static void clearFPS(int trills) {
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
// Poly Play menu
|
// Poly Play menu
|
||||||
|
|
||||||
|
const MenuEntryStateCh rotSubAMenu = { MenuType::EStateChange, "ROTATOR A", ROTA_MENU };
|
||||||
|
const MenuEntryStateCh rotSubBMenu = { MenuType::EStateChange, "ROTATOR B", ROTB_MENU };
|
||||||
|
const MenuEntryStateCh rotSubCMenu = { MenuType::EStateChange, "ROTATOR C", ROTC_MENU };
|
||||||
|
|
||||||
static void rotatorSave(const MenuEntrySub& __unused sub) {
|
static void rotatorSave(const MenuEntrySub& __unused sub) {
|
||||||
int16_t stored;
|
int16_t stored;
|
||||||
for(int i = 0; i < 4; ++i) {
|
for(int i = 0; i < 4; ++i) {
|
||||||
|
@ -871,6 +878,43 @@ const MenuEntrySub otfKeyMenu = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const MenuEntry* rotSubAMenuEntries[] = {
|
||||||
|
(MenuEntry*)&rotatorParaMenu,
|
||||||
|
(MenuEntry*)&rotator1Menu,
|
||||||
|
(MenuEntry*)&rotator2Menu,
|
||||||
|
(MenuEntry*)&rotator3Menu,
|
||||||
|
(MenuEntry*)&rotator4Menu
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuPage rotSubAMenuPage = {
|
||||||
|
"ROTATOR A", 0, CursorIdx::ERotSubA, ROTATOR_MENU, ARR_LEN(rotSubAMenuEntries), rotSubAMenuEntries
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuEntry* rotSubBMenuEntries[] = {
|
||||||
|
(MenuEntry*)&rotatorParaBMenu,
|
||||||
|
(MenuEntry*)&rotatorB1Menu,
|
||||||
|
(MenuEntry*)&rotatorB2Menu,
|
||||||
|
(MenuEntry*)&rotatorB3Menu,
|
||||||
|
(MenuEntry*)&rotatorB4Menu
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuPage rotSubBMenuPage = {
|
||||||
|
"ROTATOR B", 0, CursorIdx::ERotSubB, ROTATOR_MENU, ARR_LEN(rotSubBMenuEntries), rotSubBMenuEntries
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuEntry* rotSubCMenuEntries[] = {
|
||||||
|
(MenuEntry*)&rotatorParaCMenu,
|
||||||
|
(MenuEntry*)&rotatorC1Menu,
|
||||||
|
(MenuEntry*)&rotatorC2Menu,
|
||||||
|
(MenuEntry*)&rotatorC3Menu,
|
||||||
|
(MenuEntry*)&rotatorC4Menu
|
||||||
|
};
|
||||||
|
|
||||||
|
const MenuPage rotSubCMenuPage = {
|
||||||
|
"ROTATOR C", 0, CursorIdx::ERotSubC, ROTATOR_MENU, ARR_LEN(rotSubCMenuEntries), rotSubCMenuEntries
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const MenuEntry* rotatorMenuEntries[] = {
|
const MenuEntry* rotatorMenuEntries[] = {
|
||||||
(MenuEntry*)&polySelectMenu,
|
(MenuEntry*)&polySelectMenu,
|
||||||
|
@ -881,7 +925,7 @@ const MenuEntry* rotatorMenuEntries[] = {
|
||||||
(MenuEntry*)&fwcLockHMenu,
|
(MenuEntry*)&fwcLockHMenu,
|
||||||
(MenuEntry*)&fwcDrop2Menu,
|
(MenuEntry*)&fwcDrop2Menu,
|
||||||
(MenuEntry*)&rotatorPrioMenu,
|
(MenuEntry*)&rotatorPrioMenu,
|
||||||
(MenuEntry*)&rotatorParaMenu,
|
/*(MenuEntry*)&rotatorParaMenu,
|
||||||
(MenuEntry*)&rotator1Menu,
|
(MenuEntry*)&rotator1Menu,
|
||||||
(MenuEntry*)&rotator2Menu,
|
(MenuEntry*)&rotator2Menu,
|
||||||
(MenuEntry*)&rotator3Menu,
|
(MenuEntry*)&rotator3Menu,
|
||||||
|
@ -895,7 +939,10 @@ const MenuEntry* rotatorMenuEntries[] = {
|
||||||
(MenuEntry*)&rotatorC1Menu,
|
(MenuEntry*)&rotatorC1Menu,
|
||||||
(MenuEntry*)&rotatorC2Menu,
|
(MenuEntry*)&rotatorC2Menu,
|
||||||
(MenuEntry*)&rotatorC3Menu,
|
(MenuEntry*)&rotatorC3Menu,
|
||||||
(MenuEntry*)&rotatorC4Menu
|
(MenuEntry*)&rotatorC4Menu */
|
||||||
|
(MenuEntry*)&rotSubAMenu,
|
||||||
|
(MenuEntry*)&rotSubBMenu,
|
||||||
|
(MenuEntry*)&rotSubCMenu
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
const MenuPage rotatorMenuPage = {
|
const MenuPage rotatorMenuPage = {
|
||||||
|
@ -917,6 +964,7 @@ const MenuPage rotatorMenuPage = {
|
||||||
//***********************************************************
|
//***********************************************************
|
||||||
|
|
||||||
// Main menu
|
// Main menu
|
||||||
|
/*
|
||||||
const MenuEntrySub transposeMenu = {
|
const MenuEntrySub transposeMenu = {
|
||||||
MenuType::ESub, "TRANSPOSE", "TRANSPOSE", &transpose, 0, 24, MenuEntryFlags::ENone,
|
MenuType::ESub, "TRANSPOSE", "TRANSPOSE", &transpose, 0, 24, MenuEntryFlags::ENone,
|
||||||
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
||||||
|
@ -925,6 +973,99 @@ const MenuEntrySub transposeMenu = {
|
||||||
[](const MenuEntrySub &sub) { writeSetting(TRANSP_ADDR,*sub.valuePtr); }
|
[](const MenuEntrySub &sub) { writeSetting(TRANSP_ADDR,*sub.valuePtr); }
|
||||||
, nullptr
|
, nullptr
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
static void transposeOptionGet(SubMenuRef __unused, char* out, const char** __unused) {
|
||||||
|
switch (transpose){
|
||||||
|
case 0:
|
||||||
|
strncpy(out, "C>", 4);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
strncpy(out, "C#>", 4);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
strncpy(out, "D>", 4);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
strncpy(out, "D#>", 4);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
strncpy(out, "E>", 4);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
strncpy(out, "F>", 4);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
strncpy(out, "F#>", 4);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
strncpy(out, "G>", 4);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
strncpy(out, "G#>", 4);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
strncpy(out, "A>", 4);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
strncpy(out, "Bb>", 4);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
strncpy(out, "B>", 4);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
strncpy(out, ">C<", 4);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
strncpy(out, "<C#", 4);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
strncpy(out, "<D", 4);
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
strncpy(out, "<D#", 4);
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
strncpy(out, "<E", 4);
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
strncpy(out, "<F", 4);
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
strncpy(out, "<F#", 4);
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
strncpy(out, "<G", 4);
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
strncpy(out, "<G#", 4);
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
strncpy(out, "<A", 4);
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
strncpy(out, "<Bb", 4);
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
strncpy(out, "<B", 4);
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
strncpy(out, "<C", 4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void transposeSave(SubMenuRef __unused) {
|
||||||
|
writeSetting(TRANSP_ADDR,transpose);
|
||||||
|
}
|
||||||
|
|
||||||
|
const MenuEntrySub transposeMenu = {
|
||||||
|
MenuType::ESub, "TRANSPOSE", "TRANSPOSE", &transpose, 0,24, MenuEntryFlags::ENone,
|
||||||
|
transposeOptionGet, transposeSave, nullptr,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const MenuEntrySub octaveMenu = {
|
const MenuEntrySub octaveMenu = {
|
||||||
MenuType::ESub, "OCTAVE", "OCTAVE", &octave, 0, 6, MenuEntryFlags::ENone,
|
MenuType::ESub, "OCTAVE", "OCTAVE", &octave, 0, 6, MenuEntryFlags::ENone,
|
||||||
|
@ -1561,6 +1702,14 @@ const MenuEntrySub fingeringMenu = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const MenuEntrySub rollerMenu = {
|
||||||
|
MenuType::ESub, "ROLLRMODE", "ROLLRMODE", &rollerMode, 0, 3, MenuEntryFlags::EMenuEntryWrap,
|
||||||
|
[](SubMenuRef __unused, char* out, const char** __unused unit) {
|
||||||
|
numToString(rollerMode+1, out);
|
||||||
|
},
|
||||||
|
[](const MenuEntrySub & __unused sub) { writeSetting(ROLLER_ADDR,rollerMode); }
|
||||||
|
, nullptr
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const MenuEntrySub lpinky3Menu = {
|
const MenuEntrySub lpinky3Menu = {
|
||||||
|
@ -1595,6 +1744,7 @@ const MenuEntry* controlMenuEntries[] = {
|
||||||
(MenuEntry*)&lvlCtrlCCMenu,
|
(MenuEntry*)&lvlCtrlCCMenu,
|
||||||
(MenuEntry*)&lpinky3Menu,
|
(MenuEntry*)&lpinky3Menu,
|
||||||
(MenuEntry*)&fingeringMenu,
|
(MenuEntry*)&fingeringMenu,
|
||||||
|
(MenuEntry*)&rollerMenu,
|
||||||
(MenuEntry*)&pitchBendMenu
|
(MenuEntry*)&pitchBendMenu
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
@ -1614,6 +1764,7 @@ const MenuEntry* controlMenuEntries[] = {
|
||||||
(MenuEntry*)&pinkyMenu,
|
(MenuEntry*)&pinkyMenu,
|
||||||
(MenuEntry*)&lvlCtrlCCMenu,
|
(MenuEntry*)&lvlCtrlCCMenu,
|
||||||
(MenuEntry*)&fingeringMenu,
|
(MenuEntry*)&fingeringMenu,
|
||||||
|
(MenuEntry*)&rollerMenu,
|
||||||
(MenuEntry*)&pitchBendMenu
|
(MenuEntry*)&pitchBendMenu
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -2291,6 +2442,12 @@ void menu() {
|
||||||
redraw |= updatePage((const MenuPage*)&aboutMenuPage, input, timeNow);
|
redraw |= updatePage((const MenuPage*)&aboutMenuPage, input, timeNow);
|
||||||
} else if (menuState == EXTRAS_MENU) {
|
} else if (menuState == EXTRAS_MENU) {
|
||||||
redraw |= updatePage((const MenuPage*)&extrasMenuPage, input, timeNow);
|
redraw |= updatePage((const MenuPage*)&extrasMenuPage, input, timeNow);
|
||||||
|
} else if (menuState == ROTA_MENU) {
|
||||||
|
redraw |= updatePage((const MenuPage*)&rotSubAMenuPage, input, timeNow);
|
||||||
|
} else if (menuState == ROTB_MENU) {
|
||||||
|
redraw |= updatePage((const MenuPage*)&rotSubBMenuPage, input, timeNow);
|
||||||
|
} else if (menuState == ROTC_MENU) {
|
||||||
|
redraw |= updatePage((const MenuPage*)&rotSubCMenuPage, input, timeNow);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(redraw) {
|
if(redraw) {
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#define VIBRATO_MENU 7
|
#define VIBRATO_MENU 7
|
||||||
#define ABOUT_MENU 8
|
#define ABOUT_MENU 8
|
||||||
#define EXTRAS_MENU 9
|
#define EXTRAS_MENU 9
|
||||||
|
#define ROTA_MENU 10
|
||||||
|
#define ROTB_MENU 11
|
||||||
|
#define ROTC_MENU 12
|
||||||
|
|
||||||
#define ARR_LEN(a) (sizeof (a) / sizeof (a[0]))
|
#define ARR_LEN(a) (sizeof (a) / sizeof (a[0]))
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,10 @@ void readEEPROM(const bool factoryReset) {
|
||||||
writeSetting(CVRATE_ADDR, CVRATE_FACTORY);
|
writeSetting(CVRATE_ADDR, CVRATE_FACTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(settingsVersion < 45) {
|
||||||
|
writeSetting(ROLLER_ADDR, ROLLER_FACTORY);
|
||||||
|
}
|
||||||
|
|
||||||
writeSetting(VERSION_ADDR, EEPROM_VERSION);
|
writeSetting(VERSION_ADDR, EEPROM_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,6 +279,7 @@ void readEEPROM(const bool factoryReset) {
|
||||||
cvTune = readSettingBounded(CVTUNE_ADDR, 1, 199, CVTUNE_FACTORY);
|
cvTune = readSettingBounded(CVTUNE_ADDR, 1, 199, CVTUNE_FACTORY);
|
||||||
cvScale = readSettingBounded(CVSCALE_ADDR, 1, 199, CVSCALE_FACTORY);
|
cvScale = readSettingBounded(CVSCALE_ADDR, 1, 199, CVSCALE_FACTORY);
|
||||||
cvVibRate = readSettingBounded(CVRATE_ADDR, 0, 8, CVRATE_FACTORY);
|
cvVibRate = readSettingBounded(CVRATE_ADDR, 0, 8, CVRATE_FACTORY);
|
||||||
|
rollerMode = readSettingBounded(ROLLER_ADDR, 0, 3, ROLLER_FACTORY);
|
||||||
|
|
||||||
//Flags stored in bit field
|
//Flags stored in bit field
|
||||||
fastBoot = (dipSwBits & (1<<DIPSW_FASTBOOT))?1:0;
|
fastBoot = (dipSwBits & (1<<DIPSW_FASTBOOT))?1:0;
|
||||||
|
|
|
@ -93,8 +93,9 @@
|
||||||
#define CVTUNE_ADDR 180
|
#define CVTUNE_ADDR 180
|
||||||
#define CVSCALE_ADDR 182
|
#define CVSCALE_ADDR 182
|
||||||
#define CVRATE_ADDR 184
|
#define CVRATE_ADDR 184
|
||||||
|
#define ROLLER_ADDR 186
|
||||||
|
|
||||||
#define EEPROM_SIZE 186 //Last address +2
|
#define EEPROM_SIZE 188 //Last address +2
|
||||||
|
|
||||||
|
|
||||||
//DAC output modes
|
//DAC output modes
|
||||||
|
@ -111,7 +112,7 @@
|
||||||
|
|
||||||
|
|
||||||
//"factory" values for settings
|
//"factory" values for settings
|
||||||
#define EEPROM_VERSION 44
|
#define EEPROM_VERSION 45
|
||||||
|
|
||||||
#define BREATH_THR_FACTORY 1400
|
#define BREATH_THR_FACTORY 1400
|
||||||
#define BREATH_MAX_FACTORY 4000
|
#define BREATH_MAX_FACTORY 4000
|
||||||
|
@ -156,7 +157,7 @@
|
||||||
#define BREATH_CC2_FACTORY 0 //OFF,1-127
|
#define BREATH_CC2_FACTORY 0 //OFF,1-127
|
||||||
#define BREATH_CC2_RISE_FACTORY 1
|
#define BREATH_CC2_RISE_FACTORY 1
|
||||||
#define VIB_SENS_BITE_FACTORY 8
|
#define VIB_SENS_BITE_FACTORY 8
|
||||||
#define VIB_SQUELCH_BITE_FACTORY 10
|
#define VIB_SQUELCH_BITE_FACTORY 15
|
||||||
#define VIB_CONTROL_FACTORY 0
|
#define VIB_CONTROL_FACTORY 0
|
||||||
#define TRILL3_INTERVAL_FACTORY 4
|
#define TRILL3_INTERVAL_FACTORY 4
|
||||||
#define DAC_MODE_FACTORY DAC_MODE_PITCH
|
#define DAC_MODE_FACTORY DAC_MODE_PITCH
|
||||||
|
@ -196,6 +197,7 @@
|
||||||
#define CVTUNE_FACTORY 100 // 100 is zero tuning
|
#define CVTUNE_FACTORY 100 // 100 is zero tuning
|
||||||
#define CVSCALE_FACTORY 100 // 100 is zero scaling
|
#define CVSCALE_FACTORY 100 // 100 is zero scaling
|
||||||
#define CVRATE_FACTORY 3 // 3 is 5.5Hz
|
#define CVRATE_FACTORY 3 // 3 is 5.5Hz
|
||||||
|
#define ROLLER_FACTORY 1
|
||||||
|
|
||||||
#define NO_CHECKSUM 0x7F007F00
|
#define NO_CHECKSUM 0x7F007F00
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue