MicroDexed is a compatible 6-operator-FM-synth based on the Teensy(-3.6/-4.0) Microcontroller. https://www.parasitstudio.de
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.

73 lines
1.8KB

  1. /**
  2. Copyright (c) 2013 Pascal Gauthier.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  14. */
  15. #ifndef PLUGINFX_H_INCLUDED
  16. #define PLUGINFX_H_INCLUDED
  17. class PluginFx {
  18. float s1, s2, s3, s4;
  19. float sampleRate;
  20. float sampleRateInv;
  21. float d, c;
  22. float R24;
  23. float rcor24, rcor24Inv;
  24. float bright;
  25. // 24 db multimode
  26. float mm;
  27. float mmt;
  28. int mmch;
  29. inline float NR24(float sample, float g, float lpc);
  30. // preprocess values taken the UI
  31. float rCutoff;
  32. float rReso;
  33. float rGain;
  34. // thread values; if these are different from the UI,
  35. // it needs to be recalculated.
  36. float pReso;
  37. float pCutoff;
  38. float pGain;
  39. // I am still keeping the 2pole w/multimode filter
  40. inline float NR(float sample, float g);
  41. bool bandPassSw;
  42. float rcor, rcorInv;
  43. int R;
  44. float dc_id;
  45. float dc_od;
  46. float dc_r;
  47. public:
  48. PluginFx();
  49. // this is set directly by the ui / parameter
  50. float Cutoff;
  51. float Reso;
  52. float Gain;
  53. void init(int sampleRate);
  54. void process(float *work, int sampleSize);
  55. };
  56. #endif // PLUGINFX_H_INCLUDED