Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

revmodel.hpp 2.2KB

11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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
  6. #ifndef _revmodel_
  7. #define _revmodel_
  8. #include "comb.hpp"
  9. #include "allpass.hpp"
  10. #include "tuning.h"
  11. class revmodel
  12. {
  13. public:
  14. revmodel();
  15. void mute();
  16. void processmix(float *inputL, float *inputR, float *outputL, float *outputR, long numsamples, int skip);
  17. void processreplace(float *inputL, float *inputR, float *outputL, float *outputR, long numsamples, int skip);
  18. void setroomsize(float value);
  19. float getroomsize();
  20. void setdamp(float value);
  21. float getdamp();
  22. void setwet(float value);
  23. float getwet();
  24. void setdry(float value);
  25. float getdry();
  26. void setwidth(float value);
  27. float getwidth();
  28. void setmode(float value);
  29. float getmode();
  30. private:
  31. void update();
  32. private:
  33. float gain;
  34. float roomsize,roomsize1;
  35. float damp,damp1;
  36. float wet,wet1,wet2;
  37. float dry;
  38. float width;
  39. float mode;
  40. // The following are all declared inline
  41. // to remove the need for dynamic allocation
  42. // with its subsequent error-checking messiness
  43. // Comb filters
  44. comb combL[numcombs];
  45. comb combR[numcombs];
  46. // Allpass filters
  47. allpass allpassL[numallpasses];
  48. allpass allpassR[numallpasses];
  49. // Buffers for the combs
  50. float bufcombL1[combtuningL1];
  51. float bufcombR1[combtuningR1];
  52. float bufcombL2[combtuningL2];
  53. float bufcombR2[combtuningR2];
  54. float bufcombL3[combtuningL3];
  55. float bufcombR3[combtuningR3];
  56. float bufcombL4[combtuningL4];
  57. float bufcombR4[combtuningR4];
  58. float bufcombL5[combtuningL5];
  59. float bufcombR5[combtuningR5];
  60. float bufcombL6[combtuningL6];
  61. float bufcombR6[combtuningR6];
  62. float bufcombL7[combtuningL7];
  63. float bufcombR7[combtuningR7];
  64. float bufcombL8[combtuningL8];
  65. float bufcombR8[combtuningR8];
  66. // Buffers for the allpasses
  67. float bufallpassL1[allpasstuningL1];
  68. float bufallpassR1[allpasstuningR1];
  69. float bufallpassL2[allpasstuningL2];
  70. float bufallpassR2[allpasstuningR2];
  71. float bufallpassL3[allpasstuningL3];
  72. float bufallpassR3[allpasstuningR3];
  73. float bufallpassL4[allpasstuningL4];
  74. float bufallpassR4[allpasstuningR4];
  75. };
  76. #endif//_revmodel_
  77. //ends