diff --git a/src/AudibleInstruments.hpp b/src/AudibleInstruments.hpp index e8df3fb..ed1f237 100644 --- a/src/AudibleInstruments.hpp +++ b/src/AudibleInstruments.hpp @@ -6,13 +6,13 @@ using namespace rack; struct TripleModeLight : ValueLight { void step() { - float v = roundf(getf(value)); - if (v == 0.0) - color = colors[COLOR_CYAN]; - else if (v == 1.0) - color = colors[COLOR_ORANGE]; + int mode = (int)roundf(getf(value)); + if (mode == 0) + color = nvgRGB(0x22, 0xe6, 0xef); + else if (mode == 1) + color = nvgRGB(0xf2, 0xb1, 0x20); else - color = colors[COLOR_RED]; + color = nvgRGB(0xed, 0x2c, 0x24); } }; diff --git a/src/Shades.cpp b/src/Shades.cpp index 9432075..d4bc55c 100644 --- a/src/Shades.cpp +++ b/src/Shades.cpp @@ -40,7 +40,7 @@ Shades::Shades() { static float getChannelOutput(const float *in, float gain, float mode) { float out = getf(in, 5.0); - if (roundf(mode) == 1) { + if ((int)roundf(mode) == 1) { // attenuverter out *= 2.0*gain - 1.0; } @@ -54,21 +54,21 @@ static float getChannelOutput(const float *in, float gain, float mode) { void Shades::step() { float out = 0.0; out += getChannelOutput(inputs[IN1_INPUT], params[GAIN1_PARAM], params[MODE1_PARAM]); - lights[0] = out; + lights[0] = out / 5.0; if (outputs[OUT1_OUTPUT]) { *outputs[OUT1_OUTPUT] = out; out = 0.0; } out += getChannelOutput(inputs[IN2_INPUT], params[GAIN2_PARAM], params[MODE2_PARAM]); - lights[1] = out; + lights[1] = out / 5.0; if (outputs[OUT2_OUTPUT]) { *outputs[OUT2_OUTPUT] = out; out = 0.0; } out += getChannelOutput(inputs[IN3_INPUT], params[GAIN3_PARAM], params[MODE3_PARAM]); - lights[2] = out; + lights[2] = out / 5.0; if (outputs[OUT3_OUTPUT]) { *outputs[OUT3_OUTPUT] = out; }