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.

116 lines
2.7KB

  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 GPL.txt file
  17. */
  18. #ifndef __DISTRHO_PLUGIN_3BANDEQ_HPP__
  19. #define __DISTRHO_PLUGIN_3BANDEQ_HPP__
  20. #include "DistrhoPlugin.hpp"
  21. extern "C" {
  22. #include "nekobee-src/nekobee_types.h"
  23. }
  24. START_NAMESPACE_DISTRHO
  25. class DistrhoPluginNekobi : public Plugin
  26. {
  27. public:
  28. enum Parameters
  29. {
  30. paramWaveform = 0,
  31. paramTuning,
  32. paramCutoff,
  33. paramResonance,
  34. paramEnvMod,
  35. paramDecay,
  36. paramAccent,
  37. paramVolume,
  38. paramCount
  39. };
  40. DistrhoPluginNekobi();
  41. ~DistrhoPluginNekobi();
  42. protected:
  43. // ---------------------------------------------
  44. // Information
  45. const char* d_label() const
  46. {
  47. return "Nekobi";
  48. }
  49. const char* d_maker() const
  50. {
  51. return "DISTRHO";
  52. }
  53. const char* d_license() const
  54. {
  55. return "GPL v2+";
  56. }
  57. uint32_t d_version() const
  58. {
  59. return 0x1000;
  60. }
  61. long d_uniqueId() const
  62. {
  63. return d_cconst('D', 'N', 'e', 'k');
  64. }
  65. // ---------------------------------------------
  66. // Init
  67. void d_initParameter(uint32_t index, Parameter& parameter);
  68. // ---------------------------------------------
  69. // Internal data
  70. float d_parameterValue(uint32_t index);
  71. void d_setParameterValue(uint32_t index, float value);
  72. // ---------------------------------------------
  73. // Process
  74. void d_activate();
  75. void d_deactivate();
  76. void d_run(float** inputs, float** outputs, uint32_t frames, uint32_t midiEventCount, const MidiEvent* midiEvents);
  77. // ---------------------------------------------
  78. private:
  79. struct ParamValues {
  80. float waveform;
  81. float tuning;
  82. float cutoff;
  83. float resonance;
  84. float envMod;
  85. float decay;
  86. float accent;
  87. float volume;
  88. } fParams;
  89. nekobee_synth_t* fSynth;
  90. };
  91. END_NAMESPACE_DISTRHO
  92. #endif // __DISTRHO_PLUGIN_3BANDEQ_HPP__