LMMS
Loading...
Searching...
No Matches
plugins
LadspaEffect
cmt
cmt
src
freeverb
Components
comb.h
Go to the documentation of this file.
1
// Comb filter class declaration
2
//
3
// Written by Jezar at Dreampoint, June 2000
4
// http://www.dreampoint.co.uk
5
// This code is public domain
6
7
#ifndef _comb_
8
#define _comb_
9
10
#include "
denormals.h
"
11
12
class
comb
13
{
14
public
:
15
comb
();
16
void
setbuffer
(
float
*buf,
int
size
);
17
inline
float
process
(
float
inp);
18
void
mute
();
19
void
setdamp
(
float
val
);
20
float
getdamp
();
21
void
setfeedback
(
float
val
);
22
float
getfeedback
();
23
private
:
24
float
feedback
;
25
float
filterstore
;
26
float
damp1
;
27
float
damp2
;
28
float
*
buffer
;
29
int
bufsize
;
30
int
bufidx
;
31
};
32
33
34
// Big to inline - but crucial for speed
35
36
inline
float
comb::process
(
float
input)
37
{
38
float
output;
39
40
output =
buffer
[
bufidx
];
41
undenormalise
(output);
42
43
filterstore
= (output*
damp2
) + (
filterstore
*
damp1
);
44
undenormalise
(
filterstore
);
45
46
buffer
[
bufidx
] = input + (
filterstore
*
feedback
);
47
48
if
(++
bufidx
>=
bufsize
)
bufidx
= 0;
49
50
return
output;
51
}
52
53
#endif
//_comb_
54
55
//ends
comb::setbuffer
void setbuffer(float *buf, int size)
Definition
comb.cpp:15
comb::filterstore
float filterstore
Definition
comb.h:25
comb::process
float process(float inp)
Definition
comb.h:36
comb::buffer
float * buffer
Definition
comb.h:28
comb::getfeedback
float getfeedback()
Definition
comb.cpp:43
comb::bufsize
int bufsize
Definition
comb.h:29
comb::comb
comb()
Definition
comb.cpp:9
comb::feedback
float feedback
Definition
comb.h:24
comb::getdamp
float getdamp()
Definition
comb.cpp:33
comb::damp1
float damp1
Definition
comb.h:26
comb::setdamp
void setdamp(float val)
Definition
comb.cpp:27
comb::damp2
float damp2
Definition
comb.h:27
comb::setfeedback
void setfeedback(float val)
Definition
comb.cpp:38
comb::mute
void mute()
Definition
comb.cpp:21
comb::bufidx
int bufidx
Definition
comb.h:30
val
int val
Definition
jpeglib.h:956
denormals.h
undenormalise
#define undenormalise(sample)
Definition
denormals.h:14
size
ulg size
Definition
extract.c:2350
Generated on
for LMMS by
1.16.1