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.

66 lines
2.2KB

  1. /* SpiralPlugin
  2. * Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. */
  18. #include "RingModPluginGUI.h"
  19. #include <FL/fl_draw.h>
  20. #include <FL/fl_draw.H>
  21. static const int GUI_COLOUR = 179;
  22. static const int GUIBG_COLOUR = 144;
  23. static const int GUIBG2_COLOUR = 145;
  24. ////////////////////////////////////////////
  25. RingModPluginGUI::RingModPluginGUI(int w, int h,RingModPlugin *o,ChannelHandler *ch,const HostInfo *Info) :
  26. SpiralPluginGUI(w,h,o,ch)
  27. {
  28. m_Amount = new Fl_Knob(34, 24, 50, 50, "Amount");
  29. m_Amount->color(GUI_COLOUR);
  30. m_Amount->type(Fl_Knob::DOTLIN);
  31. m_Amount->labelsize(10);
  32. m_Amount->maximum(3);
  33. m_Amount->step(0.0001);
  34. m_Amount->value(1);
  35. m_Amount->callback((Fl_Callback*)cb_Amount);
  36. end();
  37. }
  38. void RingModPluginGUI::UpdateValues(SpiralPlugin *o)
  39. {
  40. RingModPlugin* Plugin = (RingModPlugin*)o;
  41. m_Amount->value(Plugin->GetAmount());
  42. }
  43. inline void RingModPluginGUI::cb_Amount_i(Fl_Knob* o, void* v)
  44. {
  45. m_GUICH->Set("Amount",(float)o->value());
  46. }
  47. void RingModPluginGUI::cb_Amount(Fl_Knob* o, void* v)
  48. { ((RingModPluginGUI*)(o->parent()))->cb_Amount_i(o,v); }
  49. const string RingModPluginGUI::GetHelpText(const string &loc){
  50. return string("")
  51. + "A ring modulator, multiplies two inputs together.\n"
  52. + "An extra dial sets the amount of modulation. The\n"
  53. + "ring modulation effect creates an extra harmonic\n"
  54. + "in the signal, although this is often out of tune\n"
  55. + "with the other signals, its useful for creating bell\n"
  56. + "or struck metallic sounds.\n";
  57. }