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.

DistrhoPluginPingPongPan.hpp 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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-2015 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 LICENSE 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. protected:
  33. // -------------------------------------------------------------------
  34. // Information
  35. const char* getLabel() const noexcept override
  36. {
  37. return "PingPongPan";
  38. }
  39. const char* getDescription() const override
  40. {
  41. return "Ping Pong Panning.";
  42. }
  43. const char* getMaker() const noexcept override
  44. {
  45. return "DISTRHO";
  46. }
  47. const char* getHomePage() const override
  48. {
  49. return "https://github.com/DISTRHO/Mini-Series";
  50. }
  51. const char* getLicense() const noexcept override
  52. {
  53. return "LGPL";
  54. }
  55. uint32_t getVersion() const noexcept override
  56. {
  57. return d_version(1, 0, 0);
  58. }
  59. int64_t getUniqueId() const noexcept override
  60. {
  61. return d_cconst('D', 'P', 'P', 'P');
  62. }
  63. // -------------------------------------------------------------------
  64. // Init
  65. void initParameter(uint32_t index, Parameter& parameter) override;
  66. void initProgramName(uint32_t index, String& programName) override;
  67. // -------------------------------------------------------------------
  68. // Internal data
  69. float getParameterValue(uint32_t index) const override;
  70. void setParameterValue(uint32_t index, float value) override;
  71. void loadProgram(uint32_t index) override;
  72. // -------------------------------------------------------------------
  73. // Process
  74. void activate() override;
  75. void deactivate() override;
  76. void run(const float** inputs, float** outputs, uint32_t frames) override;
  77. // -------------------------------------------------------------------
  78. private:
  79. float fFreq;
  80. float fWidth;
  81. float waveSpeed;
  82. float pan, wavePos;
  83. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginPingPongPan)
  84. };
  85. // -----------------------------------------------------------------------
  86. END_NAMESPACE_DISTRHO
  87. #endif // DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED