File: flanger.dsp

package info (click to toggle)
faust 2.79.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 397,496 kB
  • sloc: cpp: 278,433; ansic: 116,164; javascript: 18,529; vhdl: 14,052; sh: 13,884; java: 5,900; objc: 3,852; python: 3,222; makefile: 2,655; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 110; tcl: 26
file content (46 lines) | stat: -rw-r--r-- 1,769 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Created from flange.dsp 2015/06/21

import("stdfaust.lib");
import("layout2.dsp");

flanger_mono(dmax,curdel,depth,fb,invert,lfoshape)
  = _ <: _, (-:de.fdelay(dmax,curdel)) ~ *(fb) : _,
  *(select2(invert,depth,0-depth))
  : + : *(1/(1+depth));           // ideal for dc and reinforced sinusoids (in-phase summed signals)


process = ba.bypass1(fbp,flanger_mono_gui);

   // Kill the groups to save vertical space:
   meter_group(x) = flsg(x);
   ctl_group(x)  = flkg(x);
   del_group(x)  = flkg(x);
   lvl_group(x)  = flkf(x);

   flangeview = lfo(freq);

   flanger_mono_gui = attach(flangeview) : flanger_mono(dmax,curdel,depth,fb,invert,lfoshape);

   sinlfo(freq) = (1 + os.oscrs(freq))/2;
   trilfo(freq) = 1.0-abs(os.saw1(freq));
   lfo(f) = (lfoshape * trilfo(f)) + ((1-lfoshape) * sinlfo(f));

   dmax = 2048;
   odflange = 44; // ~1 ms at 44.1 kHz = min delay
   dflange  = ((dmax-1)-odflange)*del_group(vslider("[1] Delay [midi:ctrl 50][style:knob]", 0.22, 0, 1, 1));
   freq     = ctl_group(vslider("[1] Rate [midi:ctrl 51] [unit:Hz] [style:knob]", 0.5, 0, 10, 0.01)) : si.smooth(ba.tau2pole(freqT60/6.91));

   freqT60  = 0.15661;
   depth    = ctl_group(vslider("[3] Depth [midi:ctrl 52] [style:knob]", .75, 0, 1, 0.001)) : si.smooth(ba.tau2pole(depthT60/6.91));

   depthT60 = 0.15661;
   fb       = ctl_group(vslider("[5] Feedback [midi:ctrl 53] [style:knob]", 0, -0.995, 0.99, 0.001)) : si.smooth(ba.tau2pole(fbT60/6.91));

   fbT60    = 0.15661;
   lfoshape = ctl_group(vslider("[7] Waveshape [midi:ctrl 54] [style:knob]", 0, 0, 1, 0.001));
   curdel   = odflange+dflange*lfo(freq);

   fbp = 1-int(flsg(vslider("[0] Enable [midi:ctrl 102][style:knob]",0,0,1,1)));

   invert = flsg(vslider("[1] Invert [midi:ctrl 49][style:knob]",0,0,1,1):int);