-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfreeverb_code.h
More file actions
180 lines (134 loc) · 2.91 KB
/
freeverb_code.h
File metadata and controls
180 lines (134 loc) · 2.91 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/*
Copyright (C) 2021 BrerDawg
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
//freeverb_code.h
//---- v1.01
#ifndef freeverb_code_h
#define freeverb_code_h
#include "GCProfile.h"
using namespace std;
class freeverb_reverb
{
private:
bool inited;
unsigned int sample_rate;
unsigned int ref_id;
//left channel
float *bf_lp00; //lpf
float *bf_cb00; //comb filter
int cb_siz00;
int cb_wr00;
float *bf_lp01;
float *bf_cb01;
int cb_siz01;
int cb_wr01;
float *bf_lp02;
float *bf_cb02;
int cb_siz02;
int cb_wr02;
float *bf_lp03;
float *bf_cb03;
int cb_siz03;
int cb_wr03;
float *bf_lp04;
float *bf_cb04;
int cb_siz04;
int cb_wr04;
float *bf_lp05;
float *bf_cb05;
int cb_siz05;
int cb_rd05;
int cb_wr05;
float *bf_lp06;
float *bf_cb06;
int cb_siz06;
int cb_wr06;
float *bf_lp07;
float *bf_cb07;
int cb_siz07;
int cb_wr07;
float *bf_ap00; //all pass
int ap_siz00;
int ap_wr00;
float *bf_ap01;
int ap_siz01;
int ap_wr01;
float *bf_ap02;
int ap_siz02;
int ap_wr02;
float *bf_ap03;
int ap_siz03;
int ap_wr03;
//right channel
float *bf_lp10; //lpf
float *bf_cb10; //comb filter
int cb_siz10;
int cb_wr10;
float *bf_lp11;
float *bf_cb11;
int cb_siz11;
int cb_wr11;
float *bf_lp12;
float *bf_cb12;
int cb_siz12;
int cb_wr12;
float *bf_lp13;
float *bf_cb13;
int cb_siz13;
int cb_wr13;
float *bf_lp14;
float *bf_cb14;
int cb_siz14;
int cb_wr14;
float *bf_lp15;
float *bf_cb15;
int cb_siz15;
int cb_wr15;
float *bf_lp16;
float *bf_cb16;
int cb_siz16;
int cb_wr16;
float *bf_lp17;
float *bf_cb17;
int cb_siz17;
int cb_wr17;
float *bf_ap10; //all pass
int ap_siz10;
int ap_rd10;
int ap_wr10;
float *bf_ap11;
int ap_siz11;
int ap_wr11;
float *bf_ap12;
int ap_siz12;
int ap_wr12;
float *bf_ap13;
int ap_siz13;
int ap_wr13;
public:
bool verbose;
float room_size; //0.0-->1.0, high is larger room
float damping; //0.0-->1.0, higher add more filtering
float width; //0.0-->1.0, 1.0 sounds more natural
float effect_mix; //0.0-->1.0, 0.0 is fully dry, 1.0 is fully wet
public:
freeverb_reverb( unsigned int ref_id_in );
~freeverb_reverb();
bool create( unsigned int sample_rate_in );
void destroy();
void process( float &f0, float &f1 );
void process( float fi0, float fi1, float &fo0, float &fo1 );
void process_block( float *bf0, float *bf1, unsigned int bfsiz );
};
#endif