@@ -59,6 +59,7 @@ struct MIDICCToCVInterface : Module { | |||||
// Learn | // Learn | ||||
if (learningId >= 0) { | if (learningId >= 0) { | ||||
learnedCcs[learningId] = cc; | learnedCcs[learningId] = cc; | ||||
learningId = -1; | |||||
} | } | ||||
// Set CV | // Set CV | ||||
for (int i = 0; i < 16; i++) { | for (int i = 0; i < 16; i++) { | ||||
@@ -103,8 +104,10 @@ struct MidiCcChoice : GridChoice { | |||||
color.a = 0.5; | color.a = 0.5; | ||||
} | } | ||||
else { | else { | ||||
text = stringf("%d", id); | |||||
text = stringf("%d", module->learnedCcs[id]); | |||||
color.a = 1.0; | color.a = 1.0; | ||||
if (gFocusedWidget == this) | |||||
gFocusedWidget = NULL; | |||||
} | } | ||||
} | } | ||||
@@ -41,6 +41,7 @@ struct MIDITriggerToCVInterface : Module { | |||||
// Learn | // Learn | ||||
if (learningId >= 0) { | if (learningId >= 0) { | ||||
learnedNotes[learningId] = note; | learnedNotes[learningId] = note; | ||||
learningId = -1; | |||||
} | } | ||||
// Find id | // Find id | ||||
for (int i = 0; i < 16; i++) { | for (int i = 0; i < 16; i++) { | ||||
@@ -142,6 +143,9 @@ struct MidiTrigChoice : GridChoice { | |||||
int semi = note % 12; | int semi = note % 12; | ||||
text = stringf("%s%d", noteNames[semi], oct); | text = stringf("%s%d", noteNames[semi], oct); | ||||
color.a = 1.0; | color.a = 1.0; | ||||
if (gFocusedWidget == this) | |||||
gFocusedWidget = NULL; | |||||
} | } | ||||
} | } | ||||