You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5KB

  1. /*
  2. All controllers of the VCV Prototype are accessed using metadata.
  3. */
  4. import("stdfaust.lib");
  5. import("rack.lib");
  6. // Using knobs ([knob:N] metadata with N from 1 to 6). Knob [0..1] range is mapped on [min..max] slider range, taking 'scale' metadata in account
  7. vol1 = hslider("volume1 [knob:1]", 0.1, 0, 1, 0.01);
  8. freq1 = hslider("freq1 [knob:2] [unit:Hz] [scale:lin]", 300, 200, 300, 1);
  9. vol2 = hslider("volume2 [knob:3]", 0.1, 0, 1, 0.01);
  10. freq2 = hslider("freq2 [knob:4] [unit:Hz] ", 300, 200, 300, 1);
  11. // Using switches ([switch:N] metadata with N from 1 to 6)
  12. gate = button("gate [switch:1]");
  13. // Checkbox can be used, the switch button will go be white when checked
  14. check = checkbox("check [switch:2]");
  15. // Using bargraph to control lights ([light_red|green|blue:N] metadata with N from 1 to 6, to control 3 colors)
  16. light_1_r = vbargraph("[light_red:1]", 0, 1);
  17. light_1_g = vbargraph("[light_green:1]", 0, 1);
  18. light_1_b = vbargraph("[light_blue:1]", 0, 1);
  19. // Using bargraph to control switchlights ([switchlight_red|green|blue:N] metadata with N from 1 to 6, to control 3 colors)
  20. swl_2_r = vbargraph("[switchlight_red:3]", 0, 1);
  21. swl_2_g = vbargraph("[switchlight_green:3]", 0, 1);
  22. swl_2_b = vbargraph("[switchlight_blue:3]", 0, 1);
  23. process = os.osc(freq1) * vol1,
  24. os.sawtooth(freq2) * vol2 * gate,
  25. os.square(freq2) * vol2 * check,
  26. (os.osc(1):light_1_r + os.osc(1.4):light_1_g + os.osc(1.7):light_1_b),
  27. (os.osc(1):swl_2_r + os.osc(1.2):swl_2_g + os.osc(1.7):swl_2_b);