Browse Source

Renaming.

faust
Stephane Letz Andrew Belt 4 years ago
parent
commit
b39913297f
2 changed files with 8 additions and 8 deletions
  1. +4
    -4
      examples/test1.dsp
  2. +4
    -4
      src/FaustEngine.cpp

+ 4
- 4
examples/test1.dsp View File

@@ -16,9 +16,9 @@ gate = button("gate [switch:1]");

// Using bargraph to control leds (from 1 to 6 with 3 colors)

led_1_r = vbargraph("[led_red:1]", 0, 1);
led_1_g = vbargraph("[led_green:1]", 0, 1);
led_1_b = vbargraph("[led_blue:1]", 0, 1);
light_1_r = vbargraph("[light_red:1]", 0, 1);
light_1_g = vbargraph("[light_green:1]", 0, 1);
light_1_b = vbargraph("[light_blue:1]", 0, 1);

// Using bargraph to control switch leds (from 1 to 6 with 3 colors)

@@ -28,5 +28,5 @@ switch_2_b = vbargraph("[switch_blue:2]", 0, 1);

process = os.osc(freq1) * vol1,
os.sawtooth(freq2) * vol2 * gate,
(os.osc(1):led_1_r + os.osc(1.4):led_1_g + os.osc(1.7):led_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);

+ 4
- 4
src/FaustEngine.cpp View File

@@ -108,11 +108,11 @@ struct RackUI : public GenericUI
void addBarGraph(FAUSTFLOAT* zone)
{
int index = getIndex(fValue);
if ((fKey == "led_red") && (index != -1)) {
if ((fKey == "light_red") && (index != -1)) {
fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][0] = *zone; });
} else if ((fKey == "led_green") && (index != -1)) {
} else if ((fKey == "light_green") && (index != -1)) {
fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][1] = *zone; });
} else if ((fKey == "led_blue") && (index != -1)) {
} else if ((fKey == "light_blue") && (index != -1)) {
fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->lights[index-1][2] = *zone; });
} else if ((fKey == "switch_red") && (index != -1)) {
fUpdateFunOut.push_back([=] (ProcessBlock* block) { block->switchLights[index-1][0] = *zone; });
@@ -134,7 +134,7 @@ struct RackUI : public GenericUI
void declare(FAUSTFLOAT* zone, const char* key, const char* val)
{
static vector<string> keys = {"switch", "knob", "led_red", "led_green", "led_blue", "switch_red", "switch_green", "switch_blue"};
static vector<string> keys = {"switch", "knob", "light_red", "light_green", "light_blue", "switch_red", "switch_green", "switch_blue"};
if (find(keys.begin(), keys.end(), key) != keys.end()) {
fKey = key;
fValue = val;


Loading…
Cancel
Save