| @@ -14,7 +14,7 @@ freq2 = hslider("freq2 [knob:4] [unit:Hz] ", 300, 200, 300, 1); | |||||
| gate = button("gate [switch:1]"); | gate = button("gate [switch:1]"); | ||||
| // Using bargraph to control leds (from 1 to 6 with 3 colors) | |||||
| // Using bargraph to control lights (from 1 to 6 with 3 colors) | |||||
| light_1_r = vbargraph("[light_red:1]", 0, 1); | light_1_r = vbargraph("[light_red:1]", 0, 1); | ||||
| light_1_g = vbargraph("[light_green:1]", 0, 1); | light_1_g = vbargraph("[light_green:1]", 0, 1); | ||||
| @@ -22,11 +22,11 @@ light_1_b = vbargraph("[light_blue:1]", 0, 1); | |||||
| // Using bargraph to control switch leds (from 1 to 6 with 3 colors) | // Using bargraph to control switch leds (from 1 to 6 with 3 colors) | ||||
| switch_2_r = vbargraph("[switch_red:2]", 0, 1); | |||||
| switch_2_g = vbargraph("[switch_green:2]", 0, 1); | |||||
| switch_2_b = vbargraph("[switch_blue:2]", 0, 1); | |||||
| swl_2_r = vbargraph("[switchlight_red:2]", 0, 1); | |||||
| swl_2_g = vbargraph("[switchlight_green:2]", 0, 1); | |||||
| swl_2_b = vbargraph("[switchlight_blue:2]", 0, 1); | |||||
| process = os.osc(freq1) * vol1, | process = os.osc(freq1) * vol1, | ||||
| os.sawtooth(freq2) * vol2 * gate, | os.sawtooth(freq2) * vol2 * gate, | ||||
| (os.osc(1):light_1_r + os.osc(1.4):light_1_g + os.osc(1.7):light_1_b), | (os.osc(1):light_1_r + os.osc(1.4):light_1_g + os.osc(1.7):light_1_b), | ||||
| (os.osc(1):switch_2_r + os.osc(1.2):switch_2_g + os.osc(1.7):switch_2_b); | |||||
| (os.osc(1):swl_2_r + os.osc(1.2):swl_2_g + os.osc(1.7):swl_2_b); | |||||
| @@ -114,11 +114,11 @@ struct RackUI : public GenericUI | |||||
| fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][1] = *zone; }); | fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][1] = *zone; }); | ||||
| } else if ((fKey == "light_blue") && (index != -1)) { | } else if ((fKey == "light_blue") && (index != -1)) { | ||||
| fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][2] = *zone; }); | fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][2] = *zone; }); | ||||
| } else if ((fKey == "switch_red") && (index != -1)) { | |||||
| } else if ((fKey == "switchlight_red") && (index != -1)) { | |||||
| fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][0] = *zone; }); | fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][0] = *zone; }); | ||||
| } else if ((fKey == "switch_green") && (index != -1)) { | |||||
| } else if ((fKey == "switchlight_green") && (index != -1)) { | |||||
| fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][1] = *zone; }); | fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][1] = *zone; }); | ||||
| } else if ((fKey == "switch_blue") && (index != -1)) { | |||||
| } else if ((fKey == "switchlight_blue") && (index != -1)) { | |||||
| fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][2] = *zone; }); | fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][2] = *zone; }); | ||||
| } | } | ||||
| } | } | ||||
| @@ -134,7 +134,7 @@ struct RackUI : public GenericUI | |||||
| void declare(FAUSTFLOAT* zone, const char* key, const char* val) | void declare(FAUSTFLOAT* zone, const char* key, const char* val) | ||||
| { | { | ||||
| static vector<string> keys = {"switch", "knob", "light_red", "light_green", "light_blue", "switch_red", "switch_green", "switch_blue"}; | |||||
| static vector<string> keys = {"switch", "knob", "light_red", "light_green", "light_blue", "switchlight_red", "switchlight_green", "switchlight_blue"}; | |||||
| if (find(keys.begin(), keys.end(), key) != keys.end()) { | if (find(keys.begin(), keys.end(), key) != keys.end()) { | ||||
| fKey = key; | fKey = key; | ||||
| fValue = val; | fValue = val; | ||||