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.

57 lines
1.7KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Fl_Resonance_Graph.H - OSC Resonance Graph View
  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. // generated by Fast Light User Interface Designer (fluid) version 1.0302
  11. #ifndef Fl_Resonance_Graph_H
  12. #define Fl_Resonance_Graph_H
  13. #include <FL/Fl_Box.H>
  14. #include "../Synth/Resonance.h"
  15. #include "Fl_Osc_Widget.H"
  16. class Fl_Value_Output;
  17. class Fl_Widget;
  18. class Fl_Resonance_Graph : public Fl_Box, public Fl_Osc_Widget {
  19. public:
  20. Fl_Resonance_Graph(int x,int y, int w, int h, const char *label=0);
  21. virtual ~Fl_Resonance_Graph(void);
  22. void init(Fl_Value_Output *khzvalue_,Fl_Value_Output *dbvalue_);
  23. void draw_freq_line(float freq,int type);
  24. void draw();
  25. int handle(int event);
  26. void setcbwidget(Fl_Widget *cbwidget,Fl_Widget *applybutton);
  27. void update(void);
  28. float khzval;
  29. void OSC_raw(const char *msg);
  30. private:
  31. float getfreqx(float x) const;
  32. float getfreqpos(float freq) const;
  33. float getcenterfreq() const;
  34. float getoctavesfreq() const;
  35. void setPoint(int idx, int val);
  36. Fl_Value_Output *khzvalue;
  37. Fl_Value_Output *dbvalue;
  38. int oldx,oldy;
  39. Fl_Widget *cbwidget,*applybutton;
  40. //duplicate data required to render response
  41. unsigned char Prespoints[N_RES_POINTS];
  42. char Pcenterfreq;
  43. char Poctavesfreq;
  44. char PmaxdB;
  45. };
  46. #endif