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.

60 lines
1.8KB

  1. /* WaveShaper Plugin Copyleft (C) 2001 Yves Usson
  2. * for SpiralSynthModular
  3. * Copyleft (C) 2001 David Griffiths <dave@pawfal.org>
  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 2 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
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #include "../SpiralPlugin.h"
  20. #include <FL/Fl_Pixmap.H>
  21. #ifndef WaveShaperPLUGIN
  22. #define WaveShaperPLUGIN
  23. class WaveShaperPlugin : public SpiralPlugin
  24. {
  25. public:
  26. WaveShaperPlugin();
  27. virtual ~WaveShaperPlugin();
  28. virtual PluginInfo& Initialise(const HostInfo *Host);
  29. virtual SpiralGUIType* CreateGUI();
  30. virtual void Execute();
  31. virtual void StreamOut(ostream &s);
  32. virtual void StreamIn(istream &s);
  33. // has to be defined in the plugin
  34. virtual void UpdateGUI() { Fl::check(); }
  35. void Calc(void);
  36. float Get(int);
  37. void SetCoef(int,float);
  38. void SetWaveType(int);
  39. float GetCoef(int);
  40. int GetWaveType(void);
  41. private:
  42. float *wt;
  43. float m_Coefs[6];
  44. int m_Wave;
  45. void set(int,float);
  46. friend istream &operator>>(istream &s, WaveShaperPlugin &o);
  47. friend ostream &operator<<(ostream &s, WaveShaperPlugin &o);
  48. };
  49. istream &operator>>(istream &s, WaveShaperPlugin &o);
  50. ostream &operator<<(ostream &s, WaveShaperPlugin &o);
  51. #endif