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.

120 lines
3.1KB

  1. /*
  2. * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others.
  3. * Copyright (C) 2004 Sean Bolton and others
  4. * Copyright (C) 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 General Public License as
  8. * published by the Free Software Foundation; either version 2 of
  9. * the License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  17. */
  18. #ifndef DISTRHO_PLUGIN_NEKOBI_HPP_INCLUDED
  19. #define DISTRHO_PLUGIN_NEKOBI_HPP_INCLUDED
  20. #include "DistrhoPlugin.hpp"
  21. extern "C" {
  22. #include "nekobee-src/nekobee_types.h"
  23. }
  24. START_NAMESPACE_DISTRHO
  25. // -----------------------------------------------------------------------
  26. class DistrhoPluginNekobi : public Plugin
  27. {
  28. public:
  29. enum Parameters
  30. {
  31. paramWaveform = 0,
  32. paramTuning,
  33. paramCutoff,
  34. paramResonance,
  35. paramEnvMod,
  36. paramDecay,
  37. paramAccent,
  38. paramVolume,
  39. paramCount
  40. };
  41. DistrhoPluginNekobi();
  42. ~DistrhoPluginNekobi() override;
  43. protected:
  44. // -------------------------------------------------------------------
  45. // Information
  46. const char* d_getLabel() const noexcept override
  47. {
  48. return "Nekobi";
  49. }
  50. const char* d_getMaker() const noexcept override
  51. {
  52. return "DISTRHO";
  53. }
  54. const char* d_getLicense() const noexcept override
  55. {
  56. return "GPL v2+";
  57. }
  58. uint32_t d_getVersion() const noexcept override
  59. {
  60. return 0x1000;
  61. }
  62. long d_getUniqueId() const noexcept override
  63. {
  64. return d_cconst('D', 'N', 'e', 'k');
  65. }
  66. // -------------------------------------------------------------------
  67. // Init
  68. void d_initParameter(uint32_t index, Parameter& parameter) override;
  69. // -------------------------------------------------------------------
  70. // Internal data
  71. float d_getParameterValue(uint32_t index) const override;
  72. void d_setParameterValue(uint32_t index, float value) override;
  73. // -------------------------------------------------------------------
  74. // Process
  75. void d_activate() override;
  76. void d_deactivate() override;
  77. void d_run(float** inputs, float** outputs, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) override;
  78. // -------------------------------------------------------------------
  79. private:
  80. struct ParamValues {
  81. float waveform;
  82. float tuning;
  83. float cutoff;
  84. float resonance;
  85. float envMod;
  86. float decay;
  87. float accent;
  88. float volume;
  89. } fParams;
  90. nekobee_synth_t* fSynth;
  91. };
  92. // -----------------------------------------------------------------------
  93. END_NAMESPACE_DISTRHO
  94. #endif // DISTRHO_PLUGIN_NEKOBI_HPP_INCLUDED