-
Notifications
You must be signed in to change notification settings - Fork 2
/
2.0_Luca_Spanedda_Classic_KBVerb.dsp
76 lines (70 loc) · 2.4 KB
/
2.0_Luca_Spanedda_Classic_KBVerb.dsp
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
declare name "Luca Spanedda's KBVerb";
declare version "1.0.0";
declare author "Luca Spanedda";
declare copyright "Copyright(c) 2023 Luca Spanedda";
// import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");
//------- ------------- ----- -----------
//-- Luca Spanedda's KBVerb ----------------------------------------------------
//-- Reverb Model based on: Keith Barr Allpass Loop Reverb
//------- --------
// Delay Times
DX = 1251 ; // INPUT 1
DY = 1751 ; // INPUT 2
DZ = 1443 ; // INPUT 3
DW = 1343 ; // INPUT 4
D1 = 3823 ; // AP1
D2 = 4732 ; // AP2
D3 = 8501 ; // DEL OUT 1
D4 = 2204 ; // AP3
D5 = 2701 ; // AP4
D6 = 7237 ; // DEL OUT 2
D7 = 2532 ; // AP5
D8 = 2201 ; // AP6
D9 = 6337 ; // DEL OUT 3
D10 = 1553 ; // AP7
D11 = 1583 ; // AP8
D12 = 5867 ; // DEL OUT 4
// Reverb Time
KRT = hslider("KRT Decay ",.8, 0, 1, .001) : si.smoo;
// AP Coefficents
COEFF = .65;
// AP Loop
KBReverb(X, Y, Z, W) =
(X : intD1) <: _ ,
(
( loop_A <:
( (Y : intD2), _ * KRT : loop_B <:
( (Z : intD3), _ * KRT : loop_C <:
( (W : intD4), _ * KRT : loop_D <:
_ * KRT,
si.bus(2) ),
si.bus(2) ),
si.bus(2) ),
si.bus(2) ) ~ PROC :
!, si.bus(8) : outrouting ) :
!, si.bus(2)
with{
loop_A(x, y) = x + y : APF(D1) : APF(D2) : DEL(D3) ;
loop_B(x, y) = x + y : APF(D4) : APF(D5) : DEL(D6) ;
loop_C(x, y) = x + y : APF(D7) : APF(D8) : DEL(D9) ;
loop_D(x, y) = x + y : APF(D10) : APF(D11) : DEL(D12);
intD1(x) = x : APF(DX);
intD2(x) = x : APF(DY);
intD3(x) = x : APF(DZ);
intD4(x) = x : APF(DW);
outrouting(L4, R4, L3, R3, L2, R2, L1, R1) =
((L4, L2) :> _ / 2),
((R3, R1) :> _ / 2);
};
// OUTS
MIX = hslider("MIX Dry/Wet", 0, 0, 1, .001) : si.smoo;
MIXER(x) = KBReverb(x, x, x, x) : par(i, 2, x * (1-MIX) + _ * MIX);
process = MIXER;
// Allpass filter
APF(delsamples) = (+: _<: @(delsamples-1),*(COEFF))~ *(-COEFF) : mem, _ : + : _;
// Delay
DEL(delay) = _@(delay);
// DSP Process in the Feedback Loop
PROC(x) = x;