forked from s-e-a-m/faust-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_vcs3_appunti.lib
56 lines (49 loc) · 1.74 KB
/
_vcs3_appunti.lib
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
47
48
49
50
51
52
53
54
55
56
import("stdfaust.lib");
osc1_g(x) = hgroup("[001]OSCILLATOR 1", x);
osc1_lev_g(x) = osc1_g(hgroup("[003]LEVEL", x));
freq = osc1_g(vslider("[001]FREQUENCY[style:knob][scale:exp]", 100,1,10000,0.01) : si.smoo);
shape = osc1_g(vslider("[002]SHAPE[style:knob]", 5,0,10,0.1)/10 : si.smoo);
ampo = osc1_lev_g(vslider("[001]SINE[style:knob]", 0,0,10,0.1)/10 : si.smoo);
ampp = osc1_lev_g(vslider("[002]SAW[style:knob]", 0,0,10,0.01)/10 : si.smoo);
vcs3osc1(freq) = sine, saw
with{
step = freq/ma.SR;
phasor(step) = +(step)~ ma.decimal : -(step);
sine = sin(phasor(step)*2*ma.PI);
saw = phasor(step)-(0.5);
};
// SINE SHAPE
oshape = sin(shape*(ma.PI)); // 0-1-0
pshape = cos(shape*(ma.PI))*(-1); // 1-0-(-1)
//process = oshape, pshape;
sosc = *(oshape);
oabs = abs : *(pshape) : *(2) : -(pshape);
osc1c(freq) = vcs3osc1(freq) : (_<:sosc+oabs),_ : *(ampo),*(ampp) : +;
//process = osc1c(freq);
matrix(IN,OUT) = xy(IN,OUT)
with{
switch(nin) = checkbox("IN %3inn") : si.smoo
with{
inn = nin+(1);
};
outrow(N,row) = hgroup("OUT %3nrow", par(in, N, *(switch(in)) ) :> _ )
with{
nrow = row+(1);
};
xy(IN,OUT) = vgroup("Matrix %IN x %OUT", par(in, IN, _) <: par(out, OUT, outrow(IN, out)));
};
//process = no.pink_noise, os.osc(1000) <: matrix(4, 4);
matrix(IN,OUT) = (si.bus(2*IN) :> si.bus(IN) : xy(IN,OUT)) ~ (feedback(OUT))
with{
feedback(OUT) = si.bus(OUT): *(0),*(0),*(0),*(0),*(0);
switch(IN) = checkbox("IN %3inn") : si.smoo
with{
inn = IN+(1);
};
outrow(N,row) = hgroup("OUT %3nrow", par(in, N, *(switch(in))) :> _)
with{
nrow = row+(1);
};
xy(IN,OUT) = vgroup("Matrix %IN x %OUT", par(in, IN, _) <: par(out, OUT, outrow(IN, out)));
};
//process = matrix(5,5);