r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / freeverb / Components / revmodel.hpp
bloba332e252b3e6806491352a66814f94b5c7ece6af
1 // Reverb model declaration
2 //
3 // Written by Jezar at Dreampoint, June 2000
4 // http://www.dreampoint.co.uk
5 // This code is public domain
7 #ifndef _revmodel_
8 #define _revmodel_
10 #include "comb.hpp"
11 #include "allpass.hpp"
12 #include "tuning.h"
14 class revmodel
16 public:
17 revmodel();
18 void mute();
19 void processmix(float *inputL, float *inputR, float *outputL, float *outputR, long numsamples, int skip);
20 void processreplace(float *inputL, float *inputR, float *outputL, float *outputR, long numsamples, int skip);
21 void setroomsize(float value);
22 float getroomsize();
23 void setdamp(float value);
24 float getdamp();
25 void setwet(float value);
26 float getwet();
27 void setdry(float value);
28 float getdry();
29 void setwidth(float value);
30 float getwidth();
31 void setmode(float value);
32 float getmode();
33 private:
34 void update();
35 private:
36 float gain;
37 float roomsize,roomsize1;
38 float damp,damp1;
39 float wet,wet1,wet2;
40 float dry;
41 float width;
42 float mode;
44 // The following are all declared inline
45 // to remove the need for dynamic allocation
46 // with its subsequent error-checking messiness
48 // Comb filters
49 comb combL[numcombs];
50 comb combR[numcombs];
52 // Allpass filters
53 allpass allpassL[numallpasses];
54 allpass allpassR[numallpasses];
56 // Buffers for the combs
57 float bufcombL1[combtuningL1];
58 float bufcombR1[combtuningR1];
59 float bufcombL2[combtuningL2];
60 float bufcombR2[combtuningR2];
61 float bufcombL3[combtuningL3];
62 float bufcombR3[combtuningR3];
63 float bufcombL4[combtuningL4];
64 float bufcombR4[combtuningR4];
65 float bufcombL5[combtuningL5];
66 float bufcombR5[combtuningR5];
67 float bufcombL6[combtuningL6];
68 float bufcombR6[combtuningR6];
69 float bufcombL7[combtuningL7];
70 float bufcombR7[combtuningR7];
71 float bufcombL8[combtuningL8];
72 float bufcombR8[combtuningR8];
74 // Buffers for the allpasses
75 float bufallpassL1[allpasstuningL1];
76 float bufallpassR1[allpasstuningR1];
77 float bufallpassL2[allpasstuningL2];
78 float bufallpassR2[allpasstuningR2];
79 float bufallpassL3[allpasstuningL3];
80 float bufallpassR3[allpasstuningR3];
81 float bufallpassL4[allpasstuningL4];
82 float bufallpassR4[allpasstuningR4];
85 #endif//_revmodel_
87 //ends