LMMS
Loading...
Searching...
No Matches
Reverb.h
Go to the documentation of this file.
1/*
2 ZynAddSubFX - a software synthesizer
3
4 Reverb.h - Reverberation effect
5 Copyright (C) 2002-2009 Nasca Octavian Paul
6 Author: Nasca Octavian Paul
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of version 2 of the GNU General Public License
10 as published by the Free Software Foundation.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License (version 2 or later) for more details.
16
17 You should have received a copy of the GNU General Public License (version 2)
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21*/
22
23#ifndef REVERB_H
24#define REVERB_H
25
26#include "Effect.h"
27
28#define REV_COMBS 8
29#define REV_APS 4
30
32class Reverb:public Effect
33{
34 public:
35 Reverb(bool insertion_, float *efxoutl_, float *efxoutr_, unsigned int srate, int bufsize);
36 ~Reverb();
37 void out(const Stereo<float *> &smp);
38 void cleanup(void);
39
40 void setpreset(unsigned char npreset);
41 void changepar(int npar, unsigned char value);
42 unsigned char getpar(int npar) const;
43
44 private:
45 //Parametrii
46 unsigned char Pvolume;
47 unsigned char Ptime; //duration
48 unsigned char Pidelay; //initial delay
49 unsigned char Pidelayfb; //initial feedback
50 unsigned char Plpf;
51 unsigned char Phpf;
52 unsigned char Plohidamp; //Low/HighFrequency Damping
53 unsigned char Ptype; //reverb type
54 unsigned char Proomsize; //room size
55 unsigned char Pbandwidth; //bandwidth
56
57 //parameter control
58 void setvolume(unsigned char _Pvolume);
59 void settime(unsigned char _Ptime);
60 void setlohidamp(unsigned char _Plohidamp);
61 void setidelay(unsigned char _Pidelay);
62 void setidelayfb(unsigned char _Pidelayfb);
63 void sethpf(unsigned char _Phpf);
64 void setlpf(unsigned char _Plpf);
65 void settype(unsigned char _Ptype);
66 void setroomsize(unsigned char _Proomsize);
67 void setbandwidth(unsigned char _Pbandwidth);
68 void processmono(int ch, float *output, float *inputbuf);
69
70
71 //Parameters
72 int lohidamptype; //0=disable, 1=highdamp (lowpass), 2=lowdamp (highpass)
75 float lohifb;
76 float idelayfb;
77 float roomsize;
78 float rs; //rs is used to "normalise" the volume according to the roomsize
80 int aplen[REV_APS * 2];
82
83 //Internal Variables
84 float *comb[REV_COMBS * 2];
85 int combk[REV_COMBS * 2];
86 float combfb[REV_COMBS * 2]; //feedback-ul fiecarui filtru "comb"
87 float lpcomb[REV_COMBS * 2]; //pentru Filtrul LowPass
88 float *ap[REV_APS * 2];
89 int apk[REV_APS * 2];
90 float *idelay;
91 class AnalogFilter * lpf, *hpf; //filters
92};
93
94#endif
#define REV_COMBS
Definition Reverb.h:28
#define REV_APS
Definition Reverb.h:29
Definition AnalogFilter.h:35
Definition Effect.h:35
Definition Unison.h:31
static PuglViewHint int value
Definition pugl.h:1708
float out
Definition lilv_test.c:1461
Definition tap_reverb.h:240
float lpcomb[REV_COMBS *2]
Definition Reverb.h:87
Reverb(bool insertion_, float *efxoutl_, float *efxoutr_, unsigned int srate, int bufsize)
Definition Reverb.cpp:29
float * idelay
Definition Reverb.h:90
class AnalogFilter * hpf
Definition Reverb.h:91
int comblen[REV_COMBS *2]
Definition Reverb.h:79
float roomsize
Definition Reverb.h:77
int idelayk
Definition Reverb.h:74
int aplen[REV_APS *2]
Definition Reverb.h:80
void settime(unsigned char _Ptime)
Definition Reverb.cpp:205
void settype(unsigned char _Ptype)
Definition Reverb.cpp:291
unsigned char Ptime
Definition Reverb.h:47
float * comb[REV_COMBS *2]
Definition Reverb.h:84
void cleanup(void)
Definition Reverb.cpp:83
unsigned char Phpf
Definition Reverb.h:51
float idelayfb
Definition Reverb.h:76
unsigned char Pbandwidth
Definition Reverb.h:55
float * ap[REV_APS *2]
Definition Reverb.h:88
void setidelayfb(unsigned char _Pidelayfb)
Definition Reverb.cpp:251
void setidelay(unsigned char _Pidelay)
Definition Reverb.cpp:234
int apk[REV_APS *2]
Definition Reverb.h:89
int idelaylen
Definition Reverb.h:73
void setpreset(unsigned char npreset)
Definition Reverb.cpp:391
unsigned char getpar(int npar) const
Definition Reverb.cpp:479
unsigned char Plohidamp
Definition Reverb.h:52
float combfb[REV_COMBS *2]
Definition Reverb.h:86
unsigned char Pvolume
Definition Reverb.h:46
int combk[REV_COMBS *2]
Definition Reverb.h:85
void setvolume(unsigned char _Pvolume)
Definition Reverb.cpp:191
unsigned char Pidelay
Definition Reverb.h:48
void changepar(int npar, unsigned char value)
Definition Reverb.cpp:434
unsigned char Proomsize
Definition Reverb.h:54
void processmono(int ch, float *output, float *inputbuf)
Definition Reverb.cpp:106
~Reverb()
Definition Reverb.cpp:67
void setlpf(unsigned char _Plpf)
Definition Reverb.cpp:274
void setlohidamp(unsigned char _Plohidamp)
Definition Reverb.cpp:216
unsigned char Pidelayfb
Definition Reverb.h:49
unsigned char Plpf
Definition Reverb.h:50
unsigned char Ptype
Definition Reverb.h:53
class AnalogFilter * lpf
Definition Reverb.h:91
void setbandwidth(unsigned char _Pbandwidth)
Definition Reverb.cpp:383
class Unison * bandwidth
Definition Reverb.h:81
float lohifb
Definition Reverb.h:75
int lohidamptype
Definition Reverb.h:72
void setroomsize(unsigned char _Proomsize)
Definition Reverb.cpp:370
void sethpf(unsigned char _Phpf)
Definition Reverb.cpp:257
float rs
Definition Reverb.h:78
Definition Stereo.h:25