From 1bd3cbc908e0ee1295f92c840e2ba1ccd3474577 Mon Sep 17 00:00:00 2001 From: Stephane Letz Date: Mon, 20 Jul 2020 08:48:47 +0200 Subject: [PATCH] Documentation. --- examples/test1.dsp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/test1.dsp b/examples/test1.dsp index c43ad2f..cf19d1a 100644 --- a/examples/test1.dsp +++ b/examples/test1.dsp @@ -1,8 +1,11 @@ +/* + All controllers of the VCV Prototype are accessed using metadata. + */ import("stdfaust.lib"); import("rack.lib"); -// Using knobs (from 1 to 6). Knob [0..1] range is mapped on [min..max] slider range, taking 'scale' metadata in account +// 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 vol1 = hslider("volume1 [knob:1]", 0.1, 0, 1, 0.01); freq1 = hslider("freq1 [knob:2] [unit:Hz] [scale:lin]", 300, 200, 300, 1); @@ -10,17 +13,17 @@ freq1 = hslider("freq1 [knob:2] [unit:Hz] [scale:lin]", 300, 200, 300, 1); vol2 = hslider("volume2 [knob:3]", 0.1, 0, 1, 0.01); freq2 = hslider("freq2 [knob:4] [unit:Hz] ", 300, 200, 300, 1); -// Using switches (from 1 to 6) +// Using switches ([switch::N] metadata with :N from 1 to 6) gate = button("gate [switch:1]"); -// Using bargraph to control lights (from 1 to 6 with 3 colors) +// Using bargraph to control lights ([light_red|green|blue:::N] metadata with :N from 1 to 6, to control 3 colors) 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) +// Using bargraph to control switchlights ([switchlight_red|green|blue:::N] metadata with :N from 1 to 6, to control 3 colors) swl_2_r = vbargraph("[switchlight_red:2]", 0, 1); swl_2_g = vbargraph("[switchlight_green:2]", 0, 1);