Skip to content

Commit ead1dad

Browse files
committed
Fixes #8
1 parent e8c7072 commit ead1dad

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/ChordCV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void ChordCV::process(const ProcessArgs &args){
108108
struct ChordCVWidget : ModuleWidget {
109109
struct ChordDisplayWidget : TransparentWidget {
110110
ChordCV* module;
111-
char text[13];
111+
char text[13] = "";
112112

113113
ChordDisplayWidget(Vec _pos, Vec _size, ChordCV* _module) {
114114
box.size = _size;

src/DiatonicCV.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,19 @@ void DiatonicCV::process(const ProcessArgs &args){
132132
if (refresh.processLights()) {
133133

134134
}
135-
136-
outputs[POLY_OUTPUT].setChannels(playing_chord.num_notes);
137-
for(int t=0; t<playing_chord.num_notes; t++){
138-
outputs[POLY_OUTPUT].setVoltage(note_to_voltage(playing_chord.notes[t]),t);
135+
if(polyChannels > 0){
136+
outputs[POLY_OUTPUT].setChannels(playing_chord.num_notes);
137+
for(int t=0; t<playing_chord.num_notes; t++){
138+
outputs[POLY_OUTPUT].setVoltage(note_to_voltage(playing_chord.notes[t]),t);
139+
}
139140
}
140141
}
141142

142143

143144
struct DiatonicCVWidget : ModuleWidget {
144145
struct ChordDisplayWidget : TransparentWidget {
145146
DiatonicCV* module;
146-
char text[13];
147+
char text[13] = "";
147148

148149
ChordDisplayWidget(Vec _pos, Vec _size, DiatonicCV* _module) {
149150
box.size = _size;
@@ -168,7 +169,7 @@ struct DiatonicCVWidget : ModuleWidget {
168169
}else{
169170
snprintf(text, 13, " ");
170171
}
171-
172+
172173
nvgText(args.vg, textPos.x, textPos.y, text, NULL);
173174
}
174175
}

src/RandomNoteCV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void RandomNoteCV::process(const ProcessArgs &args){
119119
struct RandomNoteCVWidget : ModuleWidget {
120120
struct NoteDisplayWidget : TransparentWidget {
121121
RandomNoteCV* module;
122-
char text[2];
122+
char text[2] = "";
123123

124124
NoteDisplayWidget(Vec _pos, Vec _size, RandomNoteCV* _module) {
125125
box.size = _size;

src/ScaleCV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void ScaleCV::process(const ProcessArgs &args){
9999
struct ScaleCVWidget : ModuleWidget {
100100
struct ChordDisplayWidget : TransparentWidget {
101101
ScaleCV* module;
102-
char text[13];
102+
char text[13] = "";
103103

104104
ChordDisplayWidget(Vec _pos, Vec _size, ScaleCV* _module) {
105105
box.size = _size;

0 commit comments

Comments
 (0)