Roessler.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. Roessler.h
  3. Copyright 2004-11 Tim Goetze <tim@quitte.de>
  4. http://quitte.de/dsp/
  5. turns a Roessler fractal into sound.
  6. */
  7. /*
  8. This program is free software; you can redistribute it and/or
  9. modify it under the terms of the GNU General Public License
  10. as published by the Free Software Foundation; either version 2
  11. of the License, or (at your option) any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  19. 02111-1307, USA or point your web browser to http://www.gnu.org.
  20. */
  21. #ifndef _ROESSLER_H_
  22. #define _ROESSLER_H_
  23. #include "dsp/Roessler.h"
  24. class Roessler
  25. : public Plugin
  26. {
  27. public:
  28. sample_t h, gain;
  29. DSP::Roessler roessler;
  30. template <sample_func_t F>
  31. void one_cycle (int frames);
  32. public:
  33. static PortInfo port_info [];
  34. sample_t adding_gain;
  35. void init();
  36. void activate()
  37. { gain = getport(4); }
  38. void run (int n)
  39. {
  40. one_cycle<store_func> (n);
  41. }
  42. void run_adding (int n)
  43. {
  44. one_cycle<adding_func> (n);
  45. }
  46. };
  47. #endif /* _ROESSLER_H_ */