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.

59 lines
1.9KB

  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 "BeatMatchPluginGUI.h"
  19. #include <FL/fl_draw.h>
  20. #include <FL/fl_draw.H>
  21. ////////////////////////////////////////////
  22. BeatMatchPluginGUI::BeatMatchPluginGUI(int w, int h,BeatMatchPlugin *o,ChannelHandler *ch,const HostInfo *Info) :
  23. SpiralPluginGUI(w,h,o,ch)
  24. {
  25. m_Sense = new Fl_Knob (15, 15, 50, 50, "Sensitivity");
  26. m_Sense->color(Info->GUI_COLOUR);
  27. m_Sense->labelsize(8);
  28. m_Sense->callback((Fl_Callback*)cb_Sense);
  29. end();
  30. }
  31. void BeatMatchPluginGUI::UpdateValues(SpiralPlugin *o)
  32. {
  33. BeatMatchPlugin* Plugin = (BeatMatchPlugin*)o;
  34. m_Sense->value(Plugin->GetSensitivity());
  35. }
  36. //// Callbacks ////
  37. inline void BeatMatchPluginGUI::cb_Sense_i(Fl_Knob* o, void* v)
  38. {
  39. m_GUICH->Set("Sensitivity",(float)o->value());
  40. }
  41. void BeatMatchPluginGUI::cb_Sense(Fl_Knob* o, void* v)
  42. { ((BeatMatchPluginGUI*)(o->parent()))->cb_Sense_i(o,v);}
  43. const string BeatMatchPluginGUI::GetHelpText(const string &loc){
  44. return string("")
  45. + "Produces an output pulse that slowly syncs to the input pulses,\n"
  46. + "the sensitivity sets the time it takes to sync up.\n"
  47. + "Can be used to transition between different tempo speeds and\n"
  48. + "other stuff";
  49. }