synth.h 482 B

123456789101112131415161718192021222324252627282930
  1. #ifndef SYNTH
  2. #define SYNTH
  3. #include "table.h"
  4. namespace synth{
  5. //const float MIN_WAVETABLE_FREQ = SystemSR/Tables::length();
  6. class WavetableSynth
  7. {
  8. public:
  9. float frequency;
  10. float phase;
  11. int current_phase;
  12. int phase_inc;
  13. sample *tbl;
  14. WavetableSynth();
  15. void setFreq(float freq);
  16. sample freqMod(float freq);
  17. virtual sample tick();
  18. protected:
  19. };
  20. } // End of synth namespace
  21. #endif // SYNTH