@@ -15,6 +15,7 @@ namespace dsp { | |||||
static const float FREQ_C4 = 261.6256f; | static const float FREQ_C4 = 261.6256f; | ||||
static const float FREQ_A4 = 440.0000f; | static const float FREQ_A4 = 440.0000f; | ||||
static const float FREQ_SEMITONE = 1.0594630943592953f; | |||||
// Mathematical functions | // Mathematical functions | ||||
@@ -42,7 +42,7 @@ struct MIDI_Map : Module { | |||||
MIDI_Map() { | MIDI_Map() { | ||||
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); | ||||
for (int id = 0; id < MAX_CHANNELS; id++) { | for (int id = 0; id < MAX_CHANNELS; id++) { | ||||
paramHandles[id].color = nvgRGB(0xff, 0x40, 0xff); | |||||
paramHandles[id].color = nvgRGB(0xff, 0xff, 0x40); | |||||
APP->engine->addParamHandle(¶mHandles[id]); | APP->engine->addParamHandle(¶mHandles[id]); | ||||
} | } | ||||
onReset(); | onReset(); | ||||
@@ -130,7 +130,9 @@ void ParamWidget::draw(const DrawArgs &args) { | |||||
if (paramHandle) { | if (paramHandle) { | ||||
NVGcolor color = paramHandle->color; | NVGcolor color = paramHandle->color; | ||||
nvgBeginPath(args.vg); | nvgBeginPath(args.vg); | ||||
nvgCircle(args.vg, box.size.x - 3, box.size.y - 3, 3.0); | |||||
const float radius = 6; | |||||
// nvgCircle(args.vg, box.size.x / 2, box.size.y / 2, radius); | |||||
nvgRect(args.vg, box.size.x - radius, box.size.y - radius, radius, radius); | |||||
nvgFillColor(args.vg, color); | nvgFillColor(args.vg, color); | ||||
nvgFill(args.vg); | nvgFill(args.vg); | ||||
nvgStrokeColor(args.vg, color::mult(color, 0.5)); | nvgStrokeColor(args.vg, color::mult(color, 0.5)); | ||||