Audio plugin host https://kx.studio/carla
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.

Fl_Osc_Dial.H 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Fl_Osc_Dial.H - OSC Controlled Knob
  4. Copyright (C) 2016 Mark McCurry
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. */
  10. #pragma once
  11. #include <FL/Fl_Dial.H>
  12. #include "WidgetPDial.h"
  13. #include "Fl_Osc_Widget.H"
  14. #include <string>
  15. class Fl_Osc_Dial:public WidgetPDial, public Fl_Osc_Widget
  16. {
  17. public:
  18. Fl_Osc_Dial(int X, int Y, int W, int H, const char *label = NULL);
  19. virtual ~Fl_Osc_Dial(void);
  20. //Hack to get non-local controls up and running
  21. void alt_init(std::string base, std::string path_);
  22. //Normal Initialization
  23. void init(std::string path);
  24. //void OSC_value(float);
  25. void OSC_value(int);
  26. void OSC_value(char);
  27. using Fl_Osc_Widget::OSC_value;
  28. //Refetch parameter information
  29. void update(void);
  30. void callback(Fl_Callback *cb, void *p = NULL);
  31. //Midi learn handler
  32. int handle(int);
  33. void mark_dead(void);
  34. virtual void rebase(std::string new_base) override;
  35. void cb(void);
  36. private:
  37. bool alt_style;
  38. bool dead;
  39. std::pair<Fl_Callback*, void*> cb_data;
  40. };