DPF with Max Gen
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.

102 lines
3.0KB

  1. /*
  2. * DPF Max Gen
  3. * Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any purpose with
  6. * or without fee is hereby granted, provided that the above copyright notice and this
  7. * permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
  10. * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
  11. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  13. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED
  17. #define DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED
  18. #include "DistrhoPlugin.hpp"
  19. #include "genlib.h"
  20. START_NAMESPACE_DISTRHO
  21. // -----------------------------------------------------------------------
  22. class DistrhoPluginMaxGen : public Plugin
  23. {
  24. public:
  25. DistrhoPluginMaxGen();
  26. ~DistrhoPluginMaxGen() override;
  27. protected:
  28. // -------------------------------------------------------------------
  29. // Information
  30. const char* getLabel() const noexcept override
  31. {
  32. return DISTRHO_PLUGIN_NAME;
  33. }
  34. const char* getDescription() const noexcept override
  35. {
  36. return DISTRHO_PLUGIN_DESCRIPTION;
  37. }
  38. int64_t getUniqueId() const noexcept override
  39. {
  40. return DISTRHO_PLUGIN_VERSION;
  41. }
  42. const char* getMaker() const noexcept override
  43. {
  44. return "DISTRHO";
  45. }
  46. const char* getHomePage() const noexcept override
  47. {
  48. return "https://github.com/DISTRHO/DPF-Max-Gen";
  49. }
  50. const char* getLicense() const noexcept override
  51. {
  52. return "ISC";
  53. }
  54. uint32_t getVersion() const noexcept override
  55. {
  56. return d_version(0, 1, 0);
  57. }
  58. // -------------------------------------------------------------------
  59. // Init
  60. void initAudioPort(bool input, uint32_t index, AudioPort& port) override;
  61. void initParameter(uint32_t index, Parameter& parameter) override;
  62. // -------------------------------------------------------------------
  63. // Internal data
  64. float getParameterValue(uint32_t index) const override;
  65. void setParameterValue(uint32_t index, float value) override;
  66. // -------------------------------------------------------------------
  67. // Process
  68. void run(const float** inputs, float** outputs, uint32_t frames) override;
  69. // -------------------------------------------------------------------
  70. private:
  71. CommonState* fGenState;
  72. DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginMaxGen)
  73. };
  74. // -----------------------------------------------------------------------
  75. END_NAMESPACE_DISTRHO
  76. #endif // DISTRHO_PLUGIN_MAX_GEN_HPP_INCLUDED