Skip to content

Commit 85ccd4f

Browse files
committed
Update QuantMT to dim note buttons.
1 parent 38f754f commit 85ccd4f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/QuantMT.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,16 @@ struct QuantMT : Module {
184184
}
185185
last_mode = mode;
186186

187+
//dim buttons above notes per octave
188+
for (int i = 0; i < equal_temp; i++) {
189+
if (input_scale[i] > 0)
190+
params[NOTE_PARAMS + i].setValue(2); // bright svg
191+
}
192+
for (int i = equal_temp; i < 34; i++) {
193+
if (input_scale[i] > 0)
194+
params[NOTE_PARAMS + i].setValue(1); // dim svg
195+
}
196+
187197
// lights show root and top note
188198
for (int i = 0; i < 35; i++)
189199
if (i == 0 || i == equal_temp)
@@ -389,7 +399,7 @@ struct QuantMTWidget : ModuleWidget {
389399
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(22.24, 115.0)), module, QuantMT::TRIGGER_OUTPUT));
390400

391401
for (int i = 0; i < 34; i++)
392-
addParam(createParam<RectButton>(mm2px(Vec(5.2+0.25, 122.50 - 1.6 - 3.50*i)), module, QuantMT::NOTE_PARAMS + i));
402+
addParam(createParam<RectButtonDim>(mm2px(Vec(5.2+0.25, 122.50 - 1.6 - 3.50*i)), module, QuantMT::NOTE_PARAMS + i));
393403

394404
for (int i = 0; i < 35; i++)
395405
addChild(createLightCentered<TinyStealthLight<BlueLight>>(mm2px(Vec(4.25, 122.50 + 1.75 - 3.50*i)), module, QuantMT::OCTAVE_LIGHTS + i));

0 commit comments

Comments
 (0)