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.

DistrhoPluginStereoEnhancer.hpp 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*
  2. * DISTRHO StereoEnhancer Plugin, based on StereoEnhancer by Michael Gruhn
  3. * Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de>
  4. * Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Lesser General Public License for more details.
  14. *
  15. * For a full copy of the license see the LGPL.txt file
  16. */
  17. #ifndef __DISTRHO_PLUGIN_3BANDEQ_HPP__
  18. #define __DISTRHO_PLUGIN_3BANDEQ_HPP__
  19. #include "DistrhoPlugin.hpp"
  20. START_NAMESPACE_DISTRHO
  21. class DistrhoPluginStereoEnhancer : public Plugin
  22. {
  23. public:
  24. enum Parameters
  25. {
  26. paramWidthLows = 0,
  27. paramWidthHighs,
  28. paramCrossover,
  29. paramCount
  30. };
  31. DistrhoPluginStereoEnhancer();
  32. ~DistrhoPluginStereoEnhancer();
  33. protected:
  34. // ---------------------------------------------
  35. // Information
  36. const char* d_label() const
  37. {
  38. return "StereoEnhancer";
  39. }
  40. const char* d_maker() const
  41. {
  42. return "DISTRHO";
  43. }
  44. const char* d_license() const
  45. {
  46. return "LGPL";
  47. }
  48. uint32_t d_version() const
  49. {
  50. return 0x1000;
  51. }
  52. long d_uniqueId() const
  53. {
  54. return d_cconst('D', 'S', 't', 'E');
  55. }
  56. // ---------------------------------------------
  57. // Init
  58. void d_initParameter(uint32_t index, Parameter& parameter);
  59. void d_initProgramName(uint32_t index, d_string& programName);
  60. // ---------------------------------------------
  61. // Internal data
  62. float d_parameterValue(uint32_t index);
  63. void d_setParameterValue(uint32_t index, float value);
  64. void d_setProgram(uint32_t index);
  65. // ---------------------------------------------
  66. // Process
  67. void d_activate();
  68. void d_deactivate();
  69. void d_run(float** inputs, float** outputs, uint32_t frames, uint32_t midiEventCount, const MidiEvent* midiEvents);
  70. // ---------------------------------------------
  71. private:
  72. float widthLP, widthCoeffLP;
  73. float freqHP, freqHPFader;
  74. float widthHP, widthCoeffHP;
  75. float xHP, a0HP, b1HP;
  76. float out1HP, out2HP;
  77. float tmp1HP, tmp2HP;
  78. float monoHP, stereoHP;
  79. float monoLP, stereoLP;
  80. };
  81. END_NAMESPACE_DISTRHO
  82. #endif // __DISTRHO_PLUGIN_3BANDEQ_HPP__