forked from s-e-a-m/faust-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseam.basic.lib
82 lines (79 loc) · 2.78 KB
/
seam.basic.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// ---
// description: SEAM basic Library
// ---
//
// <!-- LICENSE: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 -->
//
// # basic.lib
//
// ```text
declare name "SEAM Basic - Library";
declare version "0.1";
declare author "Giuseppe Silvi";
declare license "CC3";
// ```
sba = library("seam.basic.lib");
//========================================================== BASIC FUNCTIONS ===
//==============================================================================
//
//---------------------------------------------------------- SWEEP FUNCTIONS ---
//----------------------------------------- FAUST BASIC FUNCTION SWEEP FIXES ---
// It truly counts from 0
// process = sba.gsweep(max+1,trigger)
sweep(m,t) = m : %(int(*(t):max(1)))~+(1');
//----------------------------------------------- LINEAR SWEEP UP TO NYQUIST ---
lsweep(sec,t) = (ma.SR/2) : %(int(*(t):max(1)))~+((1/sec)');
//------------------------------------------------------ ZERO PADDING SWEEP ---
zsweep(m) = (gsweep((m*2+1),1)<(m)) : gsweep(m);
//
//----------------------------------------- ONE SAMPLE PULSE @ ZERO CROSSING ---
zerox(x) = (x'<0) & (x>=0);//(x<0) | (x>0);
//
//----------------------------------------------------------- LIST FUNCTIONS ---
//------------------------------------------------- GENERATE A DOWNWARD LIST ---
revlist(n) = par(i,n+1,(n+1)-i);
//
//--------------------------------------------------------- SC SCALE LINENAR ---
scalel(a,b,c,d,x) = ((x-a)/(b-a))*(d-c);
//----------------------------------------------------- SC SCALE EXPONENTIAL ---
//scalexp(a,b,c,d,x) = c*((d/c)^((x-a)/(b-a)));
//------------------------------------------------------------ LAZY OPERATOR ---
mille = os.osc(1000);
cento = os.osc(100);
la = os.osc(440);
rosa = no.pink_noise;
//-------------------------------------------------------- VST INPUT MANAGER ---
vstin(y,n) = si.bus(y),si.block(n);
aa = library("aanl.lib");
sf = library("all.lib");
an = library("analyzers.lib");
ba = library("basics.lib");
co = library("compressors.lib");
de = library("delays.lib");
dm = library("demos.lib");
dx = library("dx7.lib");
en = library("envelopes.lib");
fd = library("fds.lib");
fi = library("filters.lib");
ho = library("hoa.lib");
it = library("interpolators.lib");
ma = library("maths.lib");
mi = library("mi.lib");
ef = library("misceffects.lib");
os = library("oscillators.lib");
no = library("noises.lib");
pf = library("phaflangers.lib");
pl = library("platform.lib");
pm = library("physmodels.lib");
qu = library("quantizers.lib");
rm = library("reducemaps.lib");
re = library("reverbs.lib");
ro = library("routes.lib");
sp = library("spats.lib");
si = library("signals.lib");
so = library("soundfiles.lib");
sy = library("synths.lib");
ve = library("vaeffects.lib");
vl = library("version.lib");
wa = library("webaudio.lib");
wd = library("wdmodels.lib");