Browse Source

Fix MIDI-TRIG/CC learn mode

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
c97a69666e
2 changed files with 8 additions and 1 deletions
  1. +4
    -1
      src/Core/MIDICCToCVInterface.cpp
  2. +4
    -0
      src/Core/MIDITriggerToCVInterface.cpp

+ 4
- 1
src/Core/MIDICCToCVInterface.cpp View File

@@ -59,6 +59,7 @@ struct MIDICCToCVInterface : Module {
// Learn
if (learningId >= 0) {
learnedCcs[learningId] = cc;
learningId = -1;
}
// Set CV
for (int i = 0; i < 16; i++) {
@@ -103,8 +104,10 @@ struct MidiCcChoice : GridChoice {
color.a = 0.5;
}
else {
text = stringf("%d", id);
text = stringf("%d", module->learnedCcs[id]);
color.a = 1.0;
if (gFocusedWidget == this)
gFocusedWidget = NULL;
}
}



+ 4
- 0
src/Core/MIDITriggerToCVInterface.cpp View File

@@ -41,6 +41,7 @@ struct MIDITriggerToCVInterface : Module {
// Learn
if (learningId >= 0) {
learnedNotes[learningId] = note;
learningId = -1;
}
// Find id
for (int i = 0; i < 16; i++) {
@@ -142,6 +143,9 @@ struct MidiTrigChoice : GridChoice {
int semi = note % 12;
text = stringf("%s%d", noteNames[semi], oct);
color.a = 1.0;

if (gFocusedWidget == this)
gFocusedWidget = NULL;
}
}



Loading…
Cancel
Save