Skip to content

Commit 4ace0a1

Browse files
committed
minor bug
1 parent ead1dad commit 4ace0a1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/DiatonicCV.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct DiatonicCV : Module {
3838
int polyChannels = 0;
3939
int inversion = 0;
4040
int voicing = 0;
41+
bool hasChord = false;
4142
struct chord playing_chord;
4243
struct scale cmajor;
4344

@@ -127,6 +128,7 @@ void DiatonicCV::process(const ProcessArgs &args){
127128

128129
//Make the chord
129130
playing_chord = get_diatonic_chord(polyNotes, polyChannels, octave, chord, chord_type, inversion, voicing);
131+
hasChord = true;
130132
}
131133

132134
if (refresh.processLights()) {
@@ -164,7 +166,7 @@ struct DiatonicCVWidget : ModuleWidget {
164166
Vec textPos = Vec(box.size.x/2, 21.0f);
165167
nvgFillColor(args.vg, textColor);
166168

167-
if (module != NULL && module->playing_chord.num_notes > 2){
169+
if (module != NULL && module->hasChord){
168170
detect_chord_name_simple(module->playing_chord,text);
169171
}else{
170172
snprintf(text, 13, " ");

0 commit comments

Comments
 (0)