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.

104 lines
2.8KB

  1. /*
  2. * DISTRHO PingPongPan Plugin, based on PingPongPan 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 doc/LGPL.txt file.
  16. */
  17. #ifndef DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED
  18. #define DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED
  19. #include "DistrhoPlugin.hpp"
  20. START_NAMESPACE_DISTRHO
  21. // -----------------------------------------------------------------------
  22. class DistrhoPluginPingPongPan : public Plugin
  23. {
  24. public:
  25. enum Parameters
  26. {
  27. paramFreq = 0,
  28. paramWidth,
  29. paramCount
  30. };
  31. DistrhoPluginPingPongPan();
  32. ~DistrhoPluginPingPongPan() override;
  33. protected:
  34. // -------------------------------------------------------------------
  35. // Information
  36. const char* d_getLabel() const noexcept override
  37. {
  38. return "PingPongPan";
  39. }
  40. const char* d_getMaker() const noexcept override
  41. {
  42. return "DISTRHO";
  43. }
  44. const char* d_getLicense() const noexcept override
  45. {
  46. return "LGPL";
  47. }
  48. uint32_t d_getVersion() const noexcept override
  49. {
  50. return 0x1000;
  51. }
  52. long d_getUniqueId() const noexcept override
  53. {
  54. return d_cconst('D', 'P', 'P', 'P');
  55. }
  56. // -------------------------------------------------------------------
  57. // Init
  58. void d_initParameter(uint32_t index, Parameter& parameter) override;
  59. void d_initProgramName(uint32_t index, d_string& programName) override;
  60. // -------------------------------------------------------------------
  61. // Internal data
  62. float d_getParameterValue(uint32_t index) const override;
  63. void d_setParameterValue(uint32_t index, float value) override;
  64. void d_setProgram(uint32_t index) override;
  65. // -------------------------------------------------------------------
  66. // Process
  67. void d_activate() override;
  68. void d_deactivate() override;
  69. void d_run(float** inputs, float** outputs, uint32_t frames) override;
  70. // -------------------------------------------------------------------
  71. private:
  72. float fFreq;
  73. float fWidth;
  74. float waveSpeed;
  75. float pan, wavePos;
  76. };
  77. // -----------------------------------------------------------------------
  78. END_NAMESPACE_DISTRHO
  79. #endif // DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED