Browse Source

Improve documentation.

faust
Stephane Letz 4 years ago
parent
commit
79ad269d7e
4 changed files with 5 additions and 9 deletions
  1. +3
    -3
      Faust.md
  2. +2
    -0
      examples/physicalmodel.dsp
  3. +0
    -5
      examples/synth.dsp
  4. +0
    -1
      examples/vco.dsp

+ 3
- 3
Faust.md View File

@@ -2,12 +2,12 @@

The [Faust audio DSP language](https://faust.grame.fr) can be used in VCV Prototype. The compiler can be embedded in applications or plugins using [libfaust](https://faustdoc.grame.fr/manual/embedding/), and DSP code can be edited and JIT compiled on the fly.

## Compilation
## Compilation and installation

- type `make dep && make && make install` to build it
- type `make dep && make && make install` to build and install the module
- you can now add a Faust aware VCV Prototype in your Rack session and start coding in Faust

## Loading/editing/compiling .dsp files
## Loading/editing/compiling DSP files

Faust DSP files have to be loaded in VCV Prototype and edited in a external editor (Visual Studio Code, Atom...). Each time the file is saved, it will be recompiled and executed. To possibly save compilation time, the DSP machine code is saved in a cache, and possibly restored the next time the session will be loaded.



+ 2
- 0
examples/physicalmodel.dsp View File

@@ -1,6 +1,8 @@
import("stdfaust.lib");
import("rack.lib");

// Using metadata, one switch and five knobs are used to control the model

frenchBell_ui = pm.frenchBell(strikePosition,strikeCutoff,strikeSharpness,gain,gate)
with {
strikePosition = nentry("v:frenchBell/[0]strikePosition", 0,0,4,1);


+ 0
- 5
examples/synth.dsp View File

@@ -6,7 +6,6 @@ import("stdfaust.lib");
import("rack.lib");

// 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);

@@ -14,24 +13,20 @@ vol2 = hslider("volume2 [knob:3]", 0.1, 0, 1, 0.01);
freq2 = hslider("freq2 [knob:4] [unit:Hz] ", 300, 200, 300, 1);

// Using switches ([switch:N] metadata with N from 1 to 6)

gate = button("gate [switch:1]") : vbargraph("[switchlight_red:1]", 0, 1);

// Checkbox can be used, the switch button will be white when checked

check = checkbox("check [switch:2]")
: vbargraph("[switchlight_red:2]", 0, 1)
: vbargraph("[switchlight_green:2]", 0, 1)
: vbargraph("[switchlight_blue:2]", 0, 1);

// Using bargraph to control lights ([light_red:N|light_green:N|light_blue:N] metadata with N from 1 to 6, to control 3 colors)

l_red(i) = vbargraph("[light_red:%i]", 0, 1);
l_green(i) = vbargraph("[light_green:%i]", 0, 1);
l_blue(i) = vbargraph("[light_blue:%i]", 0, 1);

// Using bargraph to control switchlights ([switchlight_red:N|switchlight_green:N|switchlight_blue:N] metadata with N from 1 to 6, to control 3 colors)

swl_red(i) = vbargraph("[switchlight_red:%i]", 0, 1);
swl_green(i) = vbargraph("[switchlight_green:%i]", 0, 1);
swl_blue(i) = vbargraph("[switchlight_blue:%i]", 0, 1);


+ 0
- 1
examples/vco.dsp View File

@@ -1,5 +1,4 @@
// Voltage-controlled oscillator example

import("stdfaust.lib");

// Create a phasor with a given frequency


Loading…
Cancel
Save