forked from LucaSpanedda/Digital_Reverberation_in_Faust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.11_ Riverbero_Freeverb.dsp
106 lines (86 loc) · 3.43 KB
/
1.11_ Riverbero_Freeverb.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// ----------------------------------------
// FREEVERB di Jezar at Dreampoint
// ----------------------------------------
// Importo libreria standard di FAUST
import("stdfaust.lib");
/*
Simulazione di Riverbero di Schroeder/Moorer secondo il
modello di Jezar at Dreampoint. Utilizza 4 Allpass di Schroeder in serie,
ed 8 Schroeder-Moorer Filtered-feedback comb-filters in parallelo.
-------------------------------------------
Nel 1979 nella sua pubblicazione ”About This Reverberation Business” James
Moorer, seguendo le proposte esposte da Schroeder nel suo articolo,
implementa a seguito una topologia che fa uso delle TDL (tapped delay lines)
per una simulazione delle prime riflessioni,
ed inserisce all’interno della retroazione del FBCF
(feedback comb filter) un filtro Lowpass,
creando così i filtri LBCF(lowpass feedback comb filter) per ottenere
una simulazione di assorbimento dell’aria all’interno
del suo modello di riverberazione.
*/
// ------------ FILTER SECTION ------------
// LOWPASS FEEDBACK COMB FILTER
lfbcf(delsamps, g, lowcut) =
// lfbcf(delay in samples, comb filter gain, lowcut)
(+ : @(delsamps-1) : _*lowcut : +~(_ : *(1- lowcut)))~ *(g) : mem;
// process = _ : lfbcf(3000, 0.999, 0.2) <:_,_;
// ALLPASS FILTER
apf(delaysamples, g) =
(+ : _ <: @(delaysamples-1), *(g)) ~
*(-g) : mem, _ : + : _;
// ----------------------------------------
// ------------ EARLY REFLECTIONS NETWORK -
early_reflections = reflections
with {
in_router(a,b,c,d,e,f,g) = a, b, c, d, e, f, g;
// process = in_router;
input = _ <: in_router;
//process = input;
// multitap delay lines (NO FEEDBACK)
multitap_delay(frnt,bck,sx,dx,up,dwn,direct) =
frnt@(1617) *0.4,
bck@(1557) *0.4,
sx@(1491) *0.4,
dx@(1422) *0.4,
up@(1277) *0.4,
dwn@(1356) *0.4,
direct *0.2;
//process = early_reflections;
out_router(a,b,c,d,e,f,g) = a+b+c+d+e+f+g;
//process = out_router;
// early reflections routing
reflections = input : multitap_delay :> out_router;
};
// ----------------------------------------
// ------------ LATE REFLECTIONS NETWORK --
freeverbtail = apf_section
with{
in_router(a,b,c,d,e,f,g,h) = a, b, c, d, e, f, g, h;
//process = in_router;
// COMBS FILTER SECTION
comb_section =
lfbcf(1557, 0.84, 0.2),
lfbcf(1617, 0.84, 0.2),
lfbcf(1491, 0.84, 0.2),
lfbcf(1422, 0.84, 0.2),
lfbcf(1277, 0.84, 0.2),
lfbcf(1356, 0.84, 0.2),
lfbcf(1188, 0.84, 0.2),
lfbcf(1116, 0.84, 0.2);
//process = comb_section;
out_router(a,b,c,d,e,f,g,h) = a+b+c+d+e+f+g+h;
//process = out_router;
combsrouting = early_reflections <: in_router : comb_section :> out_router;
//process = input;
apf_section = combsrouting :
apf(225, 0.5) : apf(556, 0.5) : apf(441, 0.5) : apf(341, 0.5);
//process = apf_section;
};
// ----------------------------------------
// ------------ OUT PATH ------------------
freeverb = _<: freeverbtail + early_reflections;
process = os.impulse : freeverb <: _,_;
// Freeverb mono channel.
// Processing for the second channel is obtained by adding
// an integer to each of the twelve delay-line lengths.
// This integer is called stereospread, and its default value is 23.