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.

45 lines
1.6KB

  1. /**
  2. *
  3. * Copyright (c) 2014 Pascal Gauthier.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  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 General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software Foundation,
  17. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. *
  19. */
  20. #ifndef ENGINEOPL_H_INCLUDED
  21. #define ENGINEOPL_H_INCLUDED
  22. #include "Arduino.h"
  23. #include "synth.h"
  24. #include "aligned_buf.h"
  25. #include "fm_op_kernel.h"
  26. #include "controllers.h"
  27. #include "fm_core.h"
  28. class EngineOpl : public FmCore {
  29. public:
  30. virtual void render(int32_t *output, FmOpParams *params, int algorithm,
  31. int32_t *fb_buf, int32_t feedback_shift);
  32. void compute(int32_t *output, const int32_t *input, int32_t phase0, int32_t freq, int32_t gain1, int32_t gain2, bool add);
  33. void compute_pure(int32_t *output, int32_t phase0, int32_t freq, int32_t gain1, int32_t gain2, bool add);
  34. void compute_fb(int32_t *output, int32_t phase0, int32_t freq,
  35. int32_t gain1, int32_t gain2,
  36. int32_t *fb_buf, int fb_gain, bool add);
  37. };
  38. #endif // ENGINEOPL_H_INCLUDED