zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

Fl_Resonance_Graph.H (1706B)


      1 /*
      2   ZynAddSubFX - a software synthesizer
      3 
      4   Fl_Resonance_Graph.H - OSC Resonance Graph View
      5   Copyright (C) 2016 Mark McCurry
      6 
      7   This program is free software; you can redistribute it and/or
      8   modify it under the terms of the GNU General Public License
      9   as published by the Free Software Foundation; either version 2
     10   of the License, or (at your option) any later version.
     11 */
     12 // generated by Fast Light User Interface Designer (fluid) version 1.0302
     13 
     14 #ifndef Fl_Resonance_Graph_H
     15 #define Fl_Resonance_Graph_H
     16 #include <FL/Fl_Box.H>
     17 #include "../Synth/Resonance.h"
     18 #include "Fl_Osc_Widget.H"
     19 
     20 class Fl_Value_Output;
     21 class Fl_Widget;
     22 class Fl_Resonance_Graph : public Fl_Box, public Fl_Osc_Widget {
     23     public:
     24         Fl_Resonance_Graph(int x,int y, int w, int h, const char *label=0);
     25         virtual ~Fl_Resonance_Graph(void);
     26         void init(Fl_Value_Output *khzvalue_,Fl_Value_Output *dbvalue_);
     27         void draw_freq_line(float freq,int type);
     28         void draw();
     29         int handle(int event);
     30         void setcbwidget(Fl_Widget *cbwidget,Fl_Widget *applybutton);
     31         void update(void);
     32 
     33         float khzval; 
     34 
     35         void OSC_raw(const char *msg);
     36 
     37     private:
     38         float getfreqx(float x) const;
     39         float getfreqpos(float freq) const;
     40         float getcenterfreq() const;
     41         float getoctavesfreq() const;
     42 
     43         void setPoint(int idx, int val);
     44 
     45         Fl_Value_Output *khzvalue; 
     46         Fl_Value_Output *dbvalue; 
     47         int oldx,oldy; 
     48         Fl_Widget *cbwidget,*applybutton; 
     49 
     50         //duplicate data required to render response
     51         unsigned char Prespoints[N_RES_POINTS];
     52         char Pcenterfreq;
     53         char Poctavesfreq;
     54         char PmaxdB;
     55 };
     56 #endif