# data file for the Fltk User Interface Designer (fluid) version 1.0300 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local } decl {//License: GNU GPL version 2 or later} {private local } decl {\#include "../Synth/OscilGen.h"} {public local } decl {\#include "../Misc/Util.h"} {public local } decl {\#include "ResonanceUI.h"} {public local } decl {\#include "Fl_Oscilloscope.h"} {public local } decl {\#include "Fl_OscilSpectrum.h"} {public local } decl {\#include "Fl_Osc_Interface.h"} {public local } decl {\#include } {public local } decl {\#include } {public local } decl {\#include } {public local } decl {\#include } {private local } decl {\#include } {private local } decl {\#include } {private local } decl {\#include } {private local } decl {\#include "Fl_Osc_Pane.H"} {public local } decl {\#include "Fl_Osc_Dial.H"} {public local } decl {\#include "Fl_Osc_Choice.H"} {public local } decl {\#include "Fl_Osc_Counter.H"} {public local } decl {\#include "Fl_Osc_Slider.H"} {public local } decl {\#include "PresetsUI.h"} {public local } decl {\#include } {public local } class PSlider {: {public Fl_Slider, public Fl_Osc_Widget} } { Function {PSlider(int x,int y, int w, int h, const char *label=0):Fl_Slider(x,y,w,h,label)} {open } { code {phase=false;} {} } Function {handle(int event)} {open return_type int } { code {int X=x(),Y=y(),W=w(),H=h(); if ((!Fl::event_buttons())|| (event==0)||(Fl::event_shift()==0)) return(Fl_Slider::handle(event)); if (!Fl::event_inside(X,Y,W,H)) { if (event==FL_DRAG){ Fl_Slider::handle(FL_RELEASE); Fl_Slider::handle(FL_LEAVE); deactivate(); activate(); return(1); }else{ return(Fl_Slider::handle(event)); }; } else { //Fl_Slider::handle(FL_FOCUS); Fl_Slider::handle(FL_PUSH); }; return(1);} {} } Function {OSC_value(char c)} {open return_type void } { code {if(phase) value(c); else value(127-c);} {} } decl {bool phase;} {public local } } class Oscilharmonic {: {public Fl_Group} } { Function {make_window()} {open private } { Fl_Window harmonic {open private xywh {467 756 100 225} type Double box NO_BOX class Fl_Osc_Group visible } { Fl_Slider mag { callback {int x=64; if (Fl::event_button3()) o->value(x); else x=127-(int)o->value(); if (x==64) o->selection_color(0); else o->selection_color(222); o->osc->writeValue(o->loc+"magnitude"+to_s(n), (char)x); if (x==64) { o->osc->writeValue(o->loc+"phase"+to_s(n), (char)64); phase->value(64); } o->osc->requestValue(o->loc+"prepare"); o->osc->requestValue(o->loc+"spectrum"); o->osc->requestValue(o->loc+"waveform"); display->redraw();} xywh {0 15 15 115} type {Vert Knob} box NO_BOX selection_color 222 maximum 127 step 1 value 64 code0 {o->phase=false;//o->value(127-oscil->Phmag[n]);} code1 {//if (oscil->Phmag[n]==64) o->selection_color(0);} class PSlider } Fl_Slider phase { callback {int x=64; if (Fl::event_button3()) o->value(x); else x=(int)o->value(); o->osc->writeValue(o->loc+"phase"+to_s(n), (char) x); o->osc->requestValue(o->loc+"prepare"); o->osc->requestValue(o->loc+"spectrum"); o->osc->requestValue(o->loc+"waveform"); display->redraw();} xywh {0 135 15 75} type {Vert Knob} box NO_BOX selection_color 222 maximum 127 step 1 value 64 code0 {o->phase=true;//o->value(oscil->Phphase[n]);} class PSlider } Fl_Box {} { xywh {15 70 5 5} box FLAT_BOX color 45 } Fl_Box {} { xywh {15 170 5 5} box FLAT_BOX color 45 } Fl_Box {} { label 01 xywh {0 210 20 15} labelfont 1 labelsize 9 align 20 code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));} } Fl_Box {} { label 01 xywh {0 0 20 15} labelfont 1 labelsize 9 align 20 code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));} } } } Function {Oscilharmonic(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {n=0; display=NULL;} {} } Function {init(int n_,Fl_Group *display_, std::string loc_, Fl_Osc_Interface *osc_)} {open } { code {assert(osc_); assert(!loc_.empty()); n=n_; display=display_; osc = osc_; loc = loc_; make_window(); mag->osc = osc; mag->loc = loc; phase->osc = osc; phase->loc = loc; osc->createLink(loc+"magnitude"+to_s(n), mag); osc->createLink(loc+"phase"+to_s(n), phase); osc->requestValue(loc+"magnitude"+to_s(n)); osc->requestValue(loc+"phase"+to_s(n)); end(); harmonic->show();} {} } Function {refresh()} {open } { code {osc->requestValue(loc+"magnitude"+to_s(n));//mag->value(127-oscil->Phmag[n]); osc->requestValue(loc+"phase"+to_s(n));//phase->value(oscil->Phphase[n]); if (mag->value()==64) mag->selection_color(0); else mag->selection_color(222);} {} } Function {~Oscilharmonic()} {open } { code {osc->removeLink(loc+"magnitude"+to_s(n), mag); osc->removeLink(loc+"phase"+to_s(n), phase); harmonic->hide(); delete harmonic;} {} } decl {Fl_Group *display;} {private local } decl {int n;} {private local } decl {Fl_Osc_Interface *osc;} {private local } decl {std::string loc;} {private local } } class OscilEditor {open : {public PresetsUI_} } { Function {make_window()} {open } { Fl_Window osceditUI { label {ADsynth Oscillator Editor} open xywh {52 100 735 595} type Double code0 {(void)o;//if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} visible } { Fl_Group dummy {open xywh {0 0 735 595} box FLAT_BOX class Fl_Osc_Group } { Fl_Button applybutton { label Apply callback {//applybutton->color(FL_GRAY); //applybutton->redraw(); //if (cbapplywidget!=NULL) { // cbapplywidget->do_callback(); // cbapplywidget->color(FL_GRAY); // cbapplywidget->redraw(); //};} xywh {305 285 60 20} box THIN_UP_BOX labelfont 1 code0 {if(adnotep) o->hide();} code1 {dummy->base = loc;} code2 {dummy->osc = osc;} } Fl_Group oscildisplaygroup {open xywh {10 10 360 300} box UP_FRAME } { Fl_Group {} {open xywh {15 90 350 190} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 code0 {oscilo=new Fl_Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} code1 {oscilo->parent(o);oscilo->init(false);} } {} Fl_Box {} { label Oscillator xywh {125 15 110 20} labelfont 1 } Fl_Value_Slider rndslider { label rnd callback {(void)o;//oscil->Prand=(int)o->value()+64; oscildisplaygroup->redraw();} tooltip {Oscilator Phase Randomness: smaller than 0 is "group", larger than 0 is for each harmonic} xywh {145 290 100 10} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {(void)o;//if (oscil->ADvsPAD) o->hide();} } Fl_Group {} {open xywh {15 35 350 50} box THIN_DOWN_BOX color 32 selection_color 218 labelcolor 63 code0 {oscils=new Fl_OscilSpectrum(o->x(),o->y(),o->w(),o->h(),"");} code1 {oscils->parent(o);oscils->init(false);} } {} Fl_Group {} {open xywh {251 282 115 25} box UP_FRAME code0 {if (!adnotep) o->hide();} } { Fl_Choice hrndtype { label {H.rnd} tooltip {Harmonic Amplitude Randomness} xywh {286 287 50 15} down_box BORDER_BOX labelsize 10 textsize 10 code0 {o->init("Pamprandtype");} class Fl_Osc_Choice } { MenuItem {} { label None xywh {65 65 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Pow xywh {75 75 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sin xywh {85 85 100 20} labelfont 1 labelsize 10 } } Fl_Dial hrnddial { tooltip {Oscillator's spectrum adjust parameter} xywh {345 285 18 18} maximum 127 step 1 code0 {o->init("Pamprandpower");} class Fl_Osc_Dial } } Fl_Choice magtype { label {Mag.Type} callback {redrawoscil();} xywh {75 285 65 20} down_box BORDER_BOX labelsize 11 when 1 textsize 11 code0 {o->init("Phmagtype");} class Fl_Osc_Choice } { MenuItem {} { label Linear xywh {10 10 100 20} labelfont 1 labelsize 11 } MenuItem {} { label {-40dB} xywh {20 20 100 20} labelfont 1 labelsize 11 } MenuItem {} { label {-60dB} xywh {30 30 100 20} labelfont 1 labelsize 11 } MenuItem {} { label {-80dB} xywh {40 40 100 20} labelfont 1 labelsize 11 } MenuItem {} { label {-100dB} xywh {50 50 100 20} labelfont 1 labelsize 11 } } } Fl_Group basefuncdisplaygroup {open xywh {370 10 360 300} box UP_FRAME code0 {o->base = loc;} code1 {o->osc = osc;} code2 {assert(osc);} class Fl_Osc_Group } { Fl_Group {} { xywh {375 90 350 190} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 code0 {oscilo_base=new Fl_Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} code1 {oscilo_base->parent(o);oscilo_base->init(true);} } {} Fl_Dial bfslider { callback {redrawoscil();} tooltip {Base Function Parameter} xywh {525 285 20 20} minimum -64 maximum 63 step 1 code0 {o->init("Pbasefuncpar");} class Fl_Osc_Dial } Fl_Choice bftype { label {Base.F..} callback {basefuncdisplaygroup->redraw(); redrawoscil(); if(!basefuncmodulation) return; if(o->value()==0||o->value()==127) basefuncmodulation->deactivate(); else basefuncmodulation->activate();} xywh {375 290 90 15} down_box BORDER_BOX labelsize 10 align 5 when 1 textsize 11 class Fl_Osc_Choice } { MenuItem {} { label Sine xywh {15 15 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Triangle xywh {25 25 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Pulse xywh {35 35 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Saw xywh {45 45 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Power xywh {55 55 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Gauss xywh {55 55 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Diode xywh {65 65 100 20} labelfont 1 labelsize 11 } MenuItem {} { label AbsSine xywh {75 75 100 20} labelfont 1 labelsize 11 } MenuItem {} { label PulseSine xywh {85 85 100 20} labelfont 1 labelsize 11 } MenuItem {} { label StrchSine xywh {95 95 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Chirp xywh {105 105 100 20} labelfont 1 labelsize 11 } MenuItem {} { label AbsStrSine xywh {107 107 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Chebyshev xywh {117 117 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Sqr xywh {127 127 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Spike xywh {127 127 100 20} labelfont 1 labelsize 11 } MenuItem {} { label Circle xywh {127 127 100 20} labelfont 1 labelsize 11 } } Fl_Box {} { label {Base Func.} xywh {485 15 110 20} labelfont 1 } Fl_Group {} {open xywh {375 35 350 50} box THIN_DOWN_BOX color 32 selection_color 218 labelcolor 63 code0 {oscils_base=new Fl_OscilSpectrum (o->x(),o->y(),o->w(),o->h(),"");} code1 {oscils_base->parent(o);oscils_base->init(true);} } {} Fl_Value_Output bfparval { label {Par.} xywh {495 290 25 15} labelsize 12 minimum -63 maximum 63 step 1 } Fl_Group basefuncmodulation {open xywh {555 281 169 25} box UP_FRAME code0 {} } { Fl_Choice bfmodtype { label {B.F.Mod.} callback {basefuncdisplaygroup->redraw(); redrawoscil();} tooltip {Base function modulation} xywh {604 286 50 15} down_box BORDER_BOX labelsize 10 when 1 textsize 10 code0 {o->init("Pbasefuncmodulation");} class Fl_Osc_Choice } { MenuItem {} { label None xywh {55 55 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Rev xywh {65 65 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sine xywh {75 75 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Pow xywh {85 85 100 20} labelfont 1 labelsize 10 } } Fl_Dial bfmodpar1 { callback {redrawoscil();} tooltip {Oscillator's modulation parameter 1} xywh {664 286 15 15} maximum 127 step 1 code0 {o->init("Pbasefuncmodulationpar1");} class Fl_Osc_Dial } Fl_Dial bfmodpar2 { callback {redrawoscil();} tooltip {Oscillator's modulation parameter 2} xywh {684 286 15 15} maximum 127 step 1 code0 {o->init("Pbasefuncmodulationpar2");} class Fl_Osc_Dial } Fl_Dial bfmodpar3 { callback {redrawoscil();} selected tooltip {Oscillator's modulation parameter 3} xywh {704 286 15 15} maximum 127 step 1 code0 {o->init("Pbasefuncmodulationpar3");} class Fl_Osc_Dial } } } Fl_Button {} { label {Use as base} callback {//oscil->useasbase(); if (autoclearbutton->value()){ for (int i=0;imag->value(64); h[i]->phase->value(64); }; harmonicshiftcounter->value(0); h[0]->mag->value(0); wshbutton->value(0); wshbutton->do_callback(); fltbutton->value(0); fltbutton->do_callback(); sabutton->value(0); sabutton->do_callback(); }; osc->requestValue(loc+"prepare"); basefuncdisplaygroup->redraw(); redrawoscil();} tooltip {Use this Oscillator as base function} xywh {10 318 85 20} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Button {} { label Close callback {osceditUI->hide();} xywh {673 570 62 25} box THIN_UP_BOX } Fl_Button {} { label Clear callback {if (!fl_choice("Clear the harmonics settings?","No","Yes",NULL)) return; for (int i=0;imag->value(64); h[i]->phase->value(64); }; h[0]->mag->value(0); //for (int i=0;iPhmag[i]==64) h[i]->mag->selection_color(0); // else h[i]->mag->selection_color(222); //}; //harmonics->redraw(); osc->requestValue(loc+"prepare"); redrawoscil();} xywh {675 510 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Group {} { xywh {140 313 150 30} box UP_FRAME } { Fl_Choice wshbutton { label {Wsh.} callback {basefuncdisplaygroup->redraw(); redrawoscil();} tooltip {Waveshaping function} xywh {170 320 55 20} down_box BORDER_BOX labelsize 10 when 1 textsize 10 code0 {o->init("Pwaveshapingfunction");} class Fl_Osc_Choice } { MenuItem {} { label None xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Atan xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Asym1 xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Pow xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sine xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Qnts xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Zigzg xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Lmt xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label LmtU xywh {110 110 100 20} labelfont 1 labelsize 10 } MenuItem {} { label LmtL xywh {120 120 100 20} labelfont 1 labelsize 10 } MenuItem {} { label ILmt xywh {132 132 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Clip xywh {142 142 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Asym2 xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Pow2 xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sgm xywh {95 95 100 20} labelfont 1 labelsize 10 } } Fl_Dial wshpar { callback {redrawoscil();} tooltip {Waveshaping Parameter} xywh {265 318 20 20} minimum -64 maximum 63 step 1 code0 {o->init("Pwaveshaping");} class Fl_Osc_Dial } Fl_Value_Output wsparval { xywh {233 321 25 15} labelsize 12 minimum -63 maximum 63 step 1 } } Fl_Light_Button autoclearbutton { label {Clr.} tooltip {Auto clear when using the oscillator as base function} xywh {100 318 35 20} box THIN_UP_BOX value 1 labelfont 1 labelsize 10 } Fl_Group {} { xywh {290 313 155 30} box UP_FRAME } { Fl_Choice fltbutton { label Filter callback {redrawoscil();} tooltip {Oscillator's filter type} xywh {320 318 50 20} down_box BORDER_BOX labelsize 10 when 1 textsize 10 code0 {o->init("Pfiltertype");} class Fl_Osc_Choice } { MenuItem {} { label None xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label LP1 xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label HP1a xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label HP1b xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label BP1 xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label BS1 xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label LP2 xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label HP2 xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label BP2 xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label BS2 xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Cos xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sin xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label LSh xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label S xywh {110 110 100 20} labelfont 1 labelsize 10 } } Fl_Dial filtervalue1 { callback {redrawoscil();} tooltip {Oscillator's filter parameter1} xywh {372 318 20 20} maximum 127 step 1 code0 {o->init("Pfilterpar1");} class Fl_Osc_Dial } Fl_Check_Button filterpref { label p callback {redrawoscil();} tooltip {Apply the filter before the waveshaping} xywh {420 318 20 20} down_box DOWN_BOX labelsize 10 align 24 } Fl_Dial filtervalue2 { callback {redrawoscil();} tooltip {Oscillator's filter parameter2} xywh {395 318 20 20} maximum 127 step 1 code0 {o->init("Pfilterpar2");} class Fl_Osc_Dial } } Fl_Group {} { xywh {595 313 135 30} box UP_FRAME } { Fl_Choice sabutton { label {Sp.adj.} callback {redrawoscil();} tooltip {Oscillator's spectrum adjust} xywh {635 318 60 20} down_box BORDER_BOX labelsize 10 when 1 textsize 10 code0 {o->init("Psatype");} class Fl_Osc_Choice } { MenuItem {} { label None xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Pow xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label ThrsD xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label ThrsU xywh {90 90 100 20} labelfont 1 labelsize 10 } } Fl_Dial sadjpar { callback {redrawoscil();} tooltip {Oscillator's spectrum adjust parameter} xywh {700 318 20 20} maximum 127 step 1 code0 {o->init("Psapar");} class Fl_Osc_Dial } } Fl_Group {} { xywh {670 345 65 65} box UP_FRAME } { Fl_Counter harmonicshiftcounter { label {Harmonic Shift} callback {redrawoscil();} code0 {o->init("Pharmonicshift");} xywh {675 370 55 15} type Simple labelsize 10 align 129 minimum -64 maximum 64 step 1 textfont 1 textsize 10 class Fl_Osc_Counter } Fl_Check_Button harmonicshiftpre { label preH callback {redrawoscil();} code0 {o->init("Pharmonicshiftfirst");} tooltip {Apply the harmonic shift before the waveshaping and filtering} xywh {695 390 34 15} down_box DOWN_BOX labelsize 10 align 24 class Fl_Osc_Check } Fl_Button {} { label R callback {//oscil->Pharmonicshift=0; harmonicshiftcounter->value(0); redrawoscil();} xywh {675 390 20 15} box THIN_UP_BOX labelfont 1 labelsize 10 } } Fl_Group {} { xywh {670 415 65 90} box UP_FRAME } { Fl_Choice adhrtype { label {Adpt.Harm.} callback {redrawoscil();} tooltip {The type of the addaptive harmonics} xywh {675 430 55 15} down_box BORDER_BOX labelsize 10 align 129 when 3 textsize 10 code0 {o->init("Padaptiveharmonics");} class Fl_Osc_Choice } { MenuItem {} { label OFF xywh {85 85 100 20} labelfont 1 labelsize 10 } MenuItem {} { label ON xywh {95 95 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Square xywh {105 105 100 20} labelfont 1 labelsize 10 } MenuItem {} { label 2xSub xywh {115 115 100 20} labelfont 1 labelsize 10 } MenuItem {} { label 2xAdd xywh {125 125 100 20} labelfont 1 labelsize 10 } MenuItem {} { label 3xSub xywh {125 125 100 20} labelfont 1 labelsize 10 } MenuItem {} { label 3xAdd xywh {135 135 100 20} labelfont 1 labelsize 10 } MenuItem {} { label 4xSub xywh {135 135 100 20} labelfont 1 labelsize 10 } MenuItem {} { label 4xAdd xywh {145 145 100 20} labelfont 1 labelsize 10 } } Fl_Dial adhrpow { label pow callback {redrawoscil();} tooltip {Adaptive harmonics power} xywh {705 465 25 25} labelsize 10 maximum 200 step 1 code0 {o->init("Padaptiveharmonicspower");} class Fl_Osc_Dial } Fl_Dial adhrbf { label baseF callback {redrawoscil();} tooltip {Adaptive harmonics base frequency} xywh {675 465 25 25} labelsize 10 maximum 255 step 1 code0 {o->init("Padaptiveharmonicsbasefreq");} class Fl_Osc_Dial } Fl_Slider adhrpar { code0 {o->init("Padaptiveharmonicspar");} callback {redrawoscil();} xywh {675 450 55 10} type {Horz Knob} box NO_BOX maximum 100 step 1 value 50 class Fl_Osc_Slider } } Fl_Group {} { xywh {445 313 150 30} box UP_FRAME } { Fl_Choice modtype { label {Mod.} callback {redrawoscil();} tooltip modulation xywh {475 320 50 15} down_box BORDER_BOX labelsize 10 when 1 textsize 10 code0 {o->init("Pmodulation");} class Fl_Osc_Choice } { MenuItem {} { label None xywh {65 65 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Rev xywh {75 75 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sine xywh {85 85 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Pow xywh {95 95 100 20} labelfont 1 labelsize 10 } } Fl_Dial modpar1 { callback {redrawoscil();} tooltip {Oscillator's modulation parameter 1} xywh {535 320 15 15} maximum 127 step 1 code0 {o->init("Pmodulationpar1");} class Fl_Osc_Dial } Fl_Dial modpar2 { callback {redrawoscil();} tooltip {Oscillator's modulation parameter 2} xywh {555 320 15 15} maximum 127 step 1 code0 {o->init("Pmodulationpar2");} class Fl_Osc_Dial } Fl_Dial modpar3 { callback {redrawoscil();} tooltip {Oscillator's modulation parameter 3} xywh {575 320 15 15} maximum 127 step 1 code0 {o->init("Pmodulationpar3");} class Fl_Osc_Dial } } Fl_Button {} { label Sine callback {if (!fl_choice("Convert to SINE?","No","Yes",NULL)) return; osc->requestValue(loc+"convert2sine"); redrawoscil(); refresh();} xywh {675 530 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Button {} { label C callback {presetsui->copy(dummy->loc());} xywh {675 550 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 } Fl_Button {} { label P callback {presetsui->paste(dummy->loc(), this);} xywh {705 550 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 } Fl_Scroll _this_has_to_be_the_last { xywh {10 345 660 250} type HORIZONTAL box FLAT_BOX } { Fl_Pack harmonics {open xywh {15 350 650 225} type HORIZONTAL code0 {for (int i=0;ih(),"");h[i]->init(i,oscildisplaygroup,loc,osc);}} } {} } } } } Function {OscilEditor(bool adnotep_, std::string loc_, Fl_Osc_Interface *osc_)} {open } { code { assert(osc_); assert(!loc_.empty()); initialized = false; adnotep = adnotep_; osc = osc_; loc = loc_; oscilo = NULL; oscilo_base = NULL; oscils = NULL; oscils_base = NULL; osceditUI = NULL; dummy = NULL; applybutton = NULL; oscildisplaygroup = NULL; rndslider = NULL; hrndtype = NULL; magtype = NULL; basefuncdisplaygroup = NULL; bfslider = NULL; bftype = NULL; make_window(); bftype->init("Pcurrentbasefunc"); initialized = true; refresh(); osceditUI->show();} {} } Function {~OscilEditor()} {open } { code {osceditUI->hide(); for (int i=0; iupdate(); for (int i=0;irefresh(); osc->requestValue(loc+"prepare"); basefuncdisplaygroup->redraw(); redrawoscil();} {} } Function {redrawoscil()} {open } { code { if(!initialized) //Must have been called during initialization return; //get data from backend osc->requestValue(loc+"prepare"); oscilo->update(); oscils->update(); oscilo_base->update(); oscils_base->update();} {} } decl {Oscilharmonic *h[MAX_AD_HARMONICS];} {private local } decl {std::string loc;} {private local } decl {Fl_Osc_Interface *osc;} {private local } decl {Fl_Oscilloscope *oscilo, *oscilo_base;} {private local } decl {Fl_OscilSpectrum *oscils, *oscils_base;} {private local } decl {bool adnotep;} {private local } decl {bool initialized;} {private local } }