# data file for the Fltk User Interface Designer (fluid)
version 1.0106
header_name {.h}
code_name {.cxx}
decl {\#include <FL/Fl_Double_Window.H>} {public
}

decl {\#include <FL/Fl_File_Chooser.H>} {}

decl {\#include <FL/Fl_Text_Display.H>} {public
}

decl {int do_exit;} {public
}

decl {int do_perf, do_util;} {public
}

decl {int do_load;} {public
}

decl {Fl_Double_Window *ew;} {public
}

decl {Fl_Double_Window *xw;} {public
}

decl {Fl_Double_Window *uw;} {public
}

decl {Fl_Double_Window *textw;} {public
}

decl {Fl_Text_Buffer *text_buffer;} {public
}

decl {\#include <FL/Fl_Pixmap.H>} {}

decl {\#include <FL/Fl_Preferences.H>} {public
}

decl {\#include "winsound.xpm"} {}

decl {\#include "csound.h"} {public
}

decl {void savetext(Fl_Text_Buffer*,int);} {public
}

decl {char *getopcodedir(void);} {public
}

decl {extern Fl_Preferences app;} {public
}

decl {extern Fl_Preferences prof;} {public
}

decl {extern Fl_Preferences prof_h,prof_l,prof_p,prof_c,prof_k,prof_n;} {public
}

decl {void cs_util_sndinfo(void);} {public
}

decl {void cs_util_opc(int full), cs_util_het(void), cs_util_lpc(void),
      cs_util_dnoise(void),cs_util_pinfo(void), cs_util_cvl(void),
      cs_util_pvc(void)} {public
}

Function {make_mainwindow()} {open
} {
  Fl_Window {} {
    label WinSound
    callback {do_exit = 1;
o->hide();} open selected
    xywh {558 232 465 535} type Double visible
  } {
    Fl_File_Input orchname {
      label {Orchestra           }
      callback {do_load = 1;}
      tooltip {File for csd or orchestra file} xywh {130 15 310 30} labeltype EMBOSSED_LABEL
      code0 {char *t; prof.get((const char*)"orchestra",t,"");}
      code1 {o->value(t); free(t);}
      code2 {do_load=1;}
    }
    Fl_File_Input scorename {
      label {Score           }
      tooltip {File for score} xywh {130 65 310 30} labeltype EMBOSSED_LABEL
      code0 {char *t; prof.get("score",t,"");}
      code1 {o->value(t); free(t);}
    }
    Fl_File_Input output {
      label {Output File           }
      callback {DAC->value(0);}
      tooltip {File for output, or dac or devaudio} xywh {130 120 310 30} labeltype EMBOSSED_LABEL
      code0 {char *t; prof.get("output",t,"");}
      code1 {o->value(t); free(t);}
    }
    Fl_Check_Button DAC {
      label DAC
      callback {if (DAC->value()) output->value("dac");}
      tooltip {Set for immediate sound} xywh {385 150 55 30} down_box DOWN_BOX labeltype EMBOSSED_LABEL
    }
    Fl_Group {} {
      label Format open
      tooltip {Set format of output file} xywh {40 180 110 155} box BORDER_BOX align 5
    } {
      Fl_Round_Button wav {
        label WAV
        callback {wav->value(1);
aiff->value(0);
ircam->value(0);
raw->value(0);}
        xywh {65 195 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("W",t, 1);wav->value(t);}
      }
      Fl_Round_Button aiff {
        label AIFF
        callback {wav->value(0);
aiff->value(1);
ircam->value(0);
raw->value(0);}
        xywh {65 230 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("A",t, 0);aiff->value(t);}
      }
      Fl_Round_Button ircam {
        label IRCAM
        callback {wav->value(0);
aiff->value(0);
ircam->value(1);
raw->value(0);}
        xywh {65 265 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("J",t, 0);ircam->value(t);}
      }
      Fl_Round_Button raw {
        label Raw
        callback {wav->value(0);
aiff->value(0);
ircam->value(0);
raw->value(1);}
        xywh {65 300 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("h",t,0); o->value(t);}
      }
    }
    Fl_Group {} {
      label Size open
      tooltip {Set sample size} xywh {175 180 105 185} box BORDER_BOX align 5
    } {
      Fl_Round_Button size_8 {
        label 8bit
        callback {size_8->value(1);
size_16->value(0);
size_24->value(0);
size_32->value(0);
size_f->value(0);}
        xywh {205 200 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("c",t,0);o->value(t);}
      }
      Fl_Round_Button size_16 {
        label 16bit
        callback {size_8->value(0);
size_16->value(1);
size_24->value(0);
size_32->value(0);
size_f->value(0);}
        xywh {205 235 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("s",t,1);o->value(t);}
      }
      Fl_Round_Button size_24 {
        label 24bit
        callback {size_8->value(0);
size_16->value(0);
size_24->value(1);
size_32->value(0);
size_f->value(0);}
        xywh {205 270 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("3",t,0);o->value(t);}
      }
      Fl_Round_Button size_32 {
        label 32bit
        callback {size_8->value(0);
size_16->value(0);
size_24->value(0);
size_32->value(1);
size_f->value(0);}
        xywh {205 305 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("l",t,0);o->value(t);}
      }
      Fl_Round_Button size_f {
        label floats
        callback {size_8->value(0);
size_16->value(0);
size_24->value(0);
size_32->value(0);
size_f->value(1);}
        xywh {205 335 25 25} down_box ROUND_DOWN_BOX
        code0 {int t; prof.get("f",t,0);o->value(t);}
      }
    }
    Fl_Check_Button mK {
      label {Peak Chunks}
      tooltip {Include peak chunks in WAV output} xywh {40 350 110 25} down_box DOWN_BOX
      code0 {int t; prof.get("K",t,1);o->value(t);}
    }
    Fl_Button {} {
      label Render
      callback {do_perf = 1;}
      tooltip {Render the piece} xywh {45 415 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 3
    }
    Fl_Button {} {
      label Env
      callback {ew->show();}
      tooltip {Set up environment variables} xywh {140 415 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 133 hotspot
    }
    Fl_Button {} {
      label Cancel
      callback {do_exit = 1;}
      tooltip {Exit winsound5} xywh {235 415 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 1
    }
    Fl_Button {} {
      label Utilities
      callback {uw->show();}
      tooltip {Dialog for utility programs} xywh {335 415 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 143
    }
    Fl_Button {} {
      label Extra
      callback {xw->show();}
      tooltip {Additional command options} xywh {335 355 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 231
    }
    Fl_Button {} {
      label Help
      tooltip {Call Help} xywh {335 295 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 251 deactivate
    }
    Fl_Button {} {
      label New
      callback {do_load = 1;}
      tooltip {Force recompilation} xywh {335 235 80 35} box ENGRAVED_BOX down_box EMBOSSED_BOX color 7
    }
    Fl_Output {} {
      label {output:}
      xywh {140 475 275 35} box NO_BOX color 49 labelfont 9 labelsize 18 align 20
      code0 {o->value("Csound5 Launcher");}
    }
    Fl_Button {} {
      label {?}
      callback {orchname->value(fl_file_chooser("Orc/Csd", "*.{orc,csd}", NULL));
      do_load = 1;}
      xywh {100 20 25 25}
    }
    Fl_Button {} {
      label {?}
      callback {scorename->value(fl_file_chooser("Score", "*.sco", NULL));}
      xywh {100 70 25 25}
    }
    Fl_Button {} {
      label {?}
      callback {output->value(fl_file_chooser("Output", "*.{wav,aif,raw,irc}", NULL));}
      xywh {100 125 25 25}
    }
    Fl_Button icon {
      xywh {65 460 65 65} box NO_BOX deactivate
      code0 {Fl_Pixmap *pixmap = new Fl_Pixmap(winsound_xpm);}
      code1 {icon->image(pixmap);}
    }
  }
}

Function {make_utils()} {open
} {
  Fl_Window {} {
    label Utilities open
    xywh {808 467 215 300} type Double visible
  } {
    Fl_Round_Button util_het {
      label {Hetrodyne Analysis}
      callback {util_lpc->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_info->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 5 150 25} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_lpc {
      label {LPC Analysis}
      callback {util_het->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_info->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 32 150 25} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_pvc {
      label {Phase Vocoding Analysis}
      callback {util_het->value(0);
util_lpc->value(0);
util_cvl->value(0);
util_info->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 60 185 25} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_cvl {
      label {Convolution Analysis}
      callback {util_het->value(0);
util_lpc->value(0);
util_pvc->value(0);
util_info->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 87 155 25} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_info {
      label {Sound File Info}
      callback {util_het->value(0);
util_lpc->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 115 150 25} down_box ROUND_DOWN_BOX
      code0 {util_info->value(1);}
    }
    Fl_Round_Button util_pinfo {
      label {Phase Vocoder File Info}
      callback {util_het->value(0);
util_lpc->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_info->value(0);
util_dnoise->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 142 180 23} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_dnoise {
      label {De Noiser}
      callback {util_het->value(0);
util_lpc->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_info->value(0);
util_pinfo->value(0);
util_opc->value(0);
util_opv->value(0);}
      xywh {25 170 150 25} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_opc {
      label {List Opcodes}
      callback {util_het->value(0);
util_lpc->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_info->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opv->value(0);}
      xywh {25 197 150 20} down_box ROUND_DOWN_BOX
    }
    Fl_Round_Button util_opv {
      label {Opcode Details}
      callback {util_het->value(0);
util_lpc->value(0);
util_pvc->value(0);
util_cvl->value(0);
util_info->value(0);
util_pinfo->value(0);
util_dnoise->value(0);
util_opc->value(0);}
      xywh {25 220 150 25} down_box ROUND_DOWN_BOX
    }
    Fl_Button {} {
      label OK
      callback {// Do the thing
uw->hide();
do_util = 0;
if (util_info->value()) cs_util_sndinfo();
else if (util_opc->value()) cs_util_opc(0);
else if (util_opv->value()) cs_util_opc(1);
else if (util_het->value()) cs_util_het();
else if (util_lpc->value()) cs_util_lpc();
else if (util_pvc->value()) cs_util_pvc();
else if (util_cvl->value()) cs_util_cvl();
else if (util_pinfo->value()) cs_util_pinfo();
else if (util_dnoise->value()) cs_util_dnoise();}
      xywh {25 260 60 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {uw->hide();}
      xywh {130 260 55 25} color 1
    }
  }
}

Function {make_extras()} {open
} {
  Fl_Window {} {
    label {Additional Arguments} open
    xywh {516 388 400 350} type Double visible
  } {
    Fl_Check_Button mI {
      label {I time only (-I)}
      xywh {15 25 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("I",t,0);o->value(t);}
    }
    Fl_Check_Button mn {
      label {No sound to disk (-n)}
      xywh {15 58 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("n",t,0);o->value(t);}
    }
    Fl_Check_Button mv {
      label {Verbose (-v)}
      xywh {15 91 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("v",t,0);o->value(t);}
    }
    Fl_Check_Button mR {
      label {Rewrite Header (-R)}
      xywh {15 124 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("R",t,0);o->value(t);}
    }
    Fl_Value_Input mH {
      label {Heartbeat (-H)}
      xywh {15 157 30 25} align 8
      code0 {int t; prof.get("H",t,0);o->value(t);}
    }
    Fl_Check_Button mN {
      label {Notify (-N)}
      xywh {15 190 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("N",t,0);o->value(t);}
    }
    Fl_Value_Input mr {
      label {SRate override (-r)}
      xywh {335 25 40 25}
      code0 {int t; prof.get("r",t,-1);o->value(t);}
    }
    Fl_Value_Input mk {
      label {KRate override (-k)}
      xywh {335 56 40 25}
      code0 {int t; prof.get("k",t,-1);o->value(t);}
    }
    Fl_Value_Input mm {
      label {Message level (-m)}
      xywh {335 87 40 25}
      code0 {int t; prof.get("m",t,7);o->value(t);}
    }
    Fl_Value_Input mt {
      label {Beats (-t)}
      xywh {335 118 40 25}
      code0 {int t; prof.get("t",t,-1);o->value(t);}
    }
    Fl_Value_Input mB {
      label {Samples/Hardware (-B)}
      xywh {335 149 40 25}
      code0 {int t; prof.get("B",t,1024);o->value(t);}
    }
    Fl_Value_Input mb {
      label {Samples/Hardware (-b)}
      xywh {335 180 40 25}
      code0 {int t; prof.get("b",t,512);o->value(t);}
    }
    Fl_File_Input mM {
      label {MIDI File input (-M)}
      xywh {20 240 160 25} align 5
      code0 {char *t; prof.get("M",t,""); o->value(t); free(t);}
    }
    Fl_File_Input mi {
      label {Sound Input (-i)}
      xywh {210 240 160 30} align 5
      code0 {char *t; prof.get("i",t,""); o->value(t); free(t);}
    }
    Fl_Check_Button mSave {
      label {Keep Sorted Score}
      xywh {20 275 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("t0",t,0);o->value(t);}
    }
    Fl_Check_Button mZ {
      label {Dither Output}
      xywh {215 280 25 25} down_box DOWN_BOX
      code0 {int t; prof.get("Z",t,0);o->value(t);}
    }
    Fl_Button {} {
      label OK
      callback {// Transfer!!!
xw->hide();prof.set("t0",mSave->value());
prof.set("Z",mZ->value());prof.set("I",mI->value());prof.set("n",mn->value());
prof.set("v",mv->value());prof.set("R",mR->value());prof.set("H",mH->value());
prof.set("N",mN->value());prof.set("r",mr->value());prof.set("k",mk->value());
prof.set("m",mm->value());prof.set("t",mt->value());prof.set("B",mB->value());
prof.set("b",mb->value());prof.set("M",mM->value());prof.set("i",mi->value());}
      xywh {65 305 75 30} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {xw->hide();}
      xywh {265 305 75 30} color 1
    }
    Fl_Button {} {
      label {?}
      callback {mM->value(fl_file_chooser("MIDI", "*.mid", NULL));}
      xywh {160 220 20 20}
    }
    Fl_Button {} {
      label {?}
      callback {mi->value(fl_file_chooser("Input", "*.{wav,aif}", NULL));}
      xywh {350 220 20 20}
    }
  }
}

Function {make_environ()} {open
} {
  Fl_Window {} {
    label Settings open
    xywh {450 322 325 230} type Double visible
  } {
    Fl_File_Input op {
      label OPCODE6DIR
      xywh {95 15 185 25}
      code0 {char *t; prof.get("envop",t, getopcodedir());}
      code1 {o->value(t);}
    }
    Fl_File_Input ss {
      label SSDIR
      xywh {95 60 185 25}
      code0 {char *t; prof.get("envss",t, getenv("SSDIR"));}
      code1 {o->value(t);}
    }
    Fl_File_Input sf {
      label SFDIR
      xywh {95 105 185 25}
      code0 {char *t; prof.get("envsf",t, getenv("SFDIR"));}
      code1 {o->value(t);}
    }
    Fl_File_Input sa {
      label SADIR
      xywh {95 145 185 25}
      code0 {char *t; prof.get("envop",t, getenv("SADIR"));}
      code1 {o->value(t);}
    }
    Fl_Button {} {
      label OK
      callback {// Transfer vales!!
csoundSetGlobalEnv("OPCODE6DIR",(char*) op->value());
csoundSetGlobalEnv("SSDIR", (char*) ss->value());
csoundSetGlobalEnv("SFDIR", (char*) sf->value());
csoundSetGlobalEnv("SADIR", (char*) sa->value());
ew->hide();}
      xywh {50 185 75 30} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {ew->hide();}
      xywh {205 185 75 30} color 1
    }
    Fl_Button {} {
      label O
      callback {op->value(fl_dir_chooser("OPCODE6DIR", NULL));}
      xywh {290 15 25 25} color 222
    }
    Fl_Button {} {
      label S
      callback {ss->value(fl_dir_chooser("SSDIR", NULL));}
      xywh {290 60 25 25} color 222
    }
    Fl_Button {} {
      label F
      callback {sf->value(fl_dir_chooser("SFDIR", NULL));}
      xywh {290 105 25 25} color 222
    }
    Fl_Button {} {
      label A
      callback {sa->value(fl_dir_chooser("SADIR", NULL));}
      xywh {290 145 25 25} color 222
    }
  }
}

Function {make_info()} {open
} {
  Fl_Window {} {
    label Sndinfo open
    xywh {314 687 260 80} type Double visible
  } {
    Fl_File_Input sndinfo_file {
      xywh {0 0 260 30}
      code0 {o->value(output->value());}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {10 40 55 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {105 40 50 25} color 1
    }
    Fl_Button {} {
      label Browse
      callback {sndinfo_file->value(fl_file_chooser("SndInfo",
                                                    "*.{wav,aif,raw,irc}", NULL));}
      xywh {205 40 50 25}
    }
  }
}

Function {make_anal()} {open
} {
  Fl_Window analw {open
    xywh {382 517 365 100} type Double visible
  } {
    Fl_File_Input analin {
      label Input
      xywh {40 10 290 25}
    }
    Fl_File_Input analout {
      label Output
      xywh {40 35 290 25}
    }
    Fl_Return_Button {} {
      label OK
      xywh {20 65 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {analw->hide();}
      xywh {310 65 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      xywh {330 10 25 25} color 5
    }
    Fl_Button {} {
      label {?}
      xywh {330 35 25 25} color 5
    }
  }
}

Function {make_textwindow()} {open
} {
  Fl_Window {} {open
    xywh {294 197 725 570} type Double resizable visible
  } {
    Fl_Text_Display text {
      label {Winsound5 Output}
      xywh {25 25 665 500} resizable
      code0 {text_buffer = new Fl_Text_Buffer(1024);}
      code1 {text->buffer(text_buffer);}
      code2 {text->textfont(FL_COURIER);}
    }
    Fl_Button {} {
      label Hide
      callback {textw->hide();}
      xywh {25 535 45 25}
    }
    Fl_Button {} {
      label Clear
      callback {text_buffer->remove(0, text_buffer->length());}
      xywh {90 535 45 25}
    }
    Fl_Button {} {
      label {Save All}
      callback {savetext(text->buffer(),0);}
      xywh {155 535 65 25}
    }
    Fl_Button {} {
      label {Save Selection}
      callback {savetext(text->buffer(),1);}
      xywh {240 535 104 25}
    }
  }
}

Function {make_saver()} {open
} {
  Fl_Window {} {
    label {Save As} open
    xywh {622 410 395 80} type Double visible
  } {
    Fl_File_Input savefile {
      label {Save as}
      xywh {60 5 285 30}
    }
    Fl_Button {} {
      label {?}
      xywh {345 5 30 30} color 5
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {20 44 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {325 47 50 25} color 1
    }
  }
}

Function {make_hetanal()} {open
} {
  Fl_Window {} {
    label {Hetrodyne Analysis}
    callback {do_util = 0;} open
    xywh {540 387 360 380} type Double
    code0 {int ct; prof_h.get("c",ct,0);
het_ac->value(ct==0);het_c1->value(ct==1);het_c2->value(ct==2);
het_c3->value(ct==3);het_c4->value(ct==4);} visible
  } {
    Fl_File_Input het_analin {
      label Input
      xywh {50 5 280 30}
      code0 {char *t; prof_h.get("input", t, ""); o->value(t);free(t);}
    }
    Fl_File_Input het_analout {
      label Output
      xywh {50 35 280 30}
      code0 {char *t; prof_h.get("output", t, "test.ads"); o->value(t);free(t);}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {10 330 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {290 325 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      callback {het_analin->value(fl_file_chooser("HETRO", "*.wav", NULL));}
      xywh {330 5 25 30} color 5
    }
    Fl_Button {} {
      label {?}
      callback {het_analout->value(fl_file_chooser("Output", "*.ads", NULL));}
      xywh {330 35 25 30} color 5
    }
    Fl_Group {} {open
      xywh {205 80 140 105} box THIN_DOWN_FRAME
    } {
      Fl_Round_Button het_ac {
        label {All Channels}
        callback {het_c1->value(0);
het_c2->value(0);
het_c3->value(0);
het_c4->value(0);}
        xywh {220 80 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button het_c1 {
        label {Channel 1}
        callback {het_ac->value(0);
het_c2->value(0);
het_c3->value(0);
het_c4->value(0);}
        xywh {220 100 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button het_c2 {
        label {Channel 2}
        callback {het_ac->value(0);
het_c1->value(0);
het_c3->value(0);
het_c4->value(0);}
        xywh {220 120 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button het_c3 {
        label {Channel 3}
        callback {het_ac->value(0);
het_c1->value(0);
het_c2->value(0);
het_c4->value(0);}
        xywh {220 140 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button het_c4 {
        label {Channel 4}
        callback {het_ac->value(0);
het_c1->value(0);
het_c2->value(0);
het_c3->value(0);}
        xywh {220 155 110 30} down_box ROUND_DOWN_BOX
      }
    }
    Fl_Value_Input het_s {
      label {Sample rate (-s)}
      xywh {30 75 55 25} align 8
      code0 {int t; prof_h.get("s",t,0); o->value(t);}
    }
    Fl_Value_Input het_b {
      label {Begin time (-b)}
      xywh {30 115 55 25} align 8
      code0 {int t; prof_h.get("b",t,0); o->value(t);}
    }
    Fl_Value_Input het_d {
      label {Duration (-d)}
      xywh {30 155 55 25} align 8
      code0 {int t; prof_h.get("d",t,0); o->value(t);}
    }
    Fl_Value_Input het_f {
      label {Fundamental (-f)}
      xywh {30 195 55 25} align 8
      code0 {int t; prof_h.get("f",t,100); o->value(t);}
    }
    Fl_Value_Input het_h {
      label {Harmonic (-h)}
      xywh {30 240 55 25} align 8
      code0 {int t; prof_h.get("h",t,0); o->value(t);}
    }
    Fl_Value_Input het_M {
      label {Maxumum (-M)}
      xywh {30 280 70 25} align 8
      code0 {int t; prof_h.get("M",t,32767); o->value(t);}
    }
    Fl_Value_Input het_n {
      label {Number (-n)}
      xywh {205 195 40 25} align 8
      code0 {int t; prof_h.get("s",t,256); o->value(t);}
    }
    Fl_Value_Input het_I {
      label {Filter (-I)}
      xywh {205 240 40 25} align 8
      code0 {int t; prof_h.get("I",t,0); o->value(t);}
    }
    Fl_Value_Input het_m {
      label {Minimum (-m)}
      xywh {205 280 40 25} align 8
      code0 {int t; prof_h.get("m",t,64); o->value(t);}
    }
  }
}

Function {make_lpcanal()} {open
} {
  Fl_Window {} {
    label {LPC Analysis}
    callback {do_util = 0;} open
    xywh {613 447 410 320} type Double
    code0 {int ct; prof_l.get("c",ct,1);
lpc_c1->value(ct==1);lpc_c2->value(ct==2);lpc_c3->value(ct==3);lpc_c4->value(ct==4);} visible
  } {
    Fl_File_Input lpc_analin {
      label Input
      xywh {50 10 320 30}
      code0 {char *t; prof_l.get("input", t, ""); o->value(t);free(t);}
    }
    Fl_File_Input lpc_analout {
      label Output
      xywh {50 40 320 30}
      code0 {char *t; prof_l.get("output", t, "test.lpc"); o->value(t);free(t);}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {10 280 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {340 275 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      callback {lpc_analin->value(fl_file_chooser("LPC", "*.wav", NULL));}
      xywh {370 10 30 30} color 5
    }
    Fl_Button {} {
      label {?}
      callback {lpc_analout->value(fl_file_chooser("LPCout", "*.lpc", NULL));}
      xywh {370 40 30 30} color 5
    }
    Fl_Group {} {open
      xywh {230 80 170 85} box THIN_DOWN_FRAME
    } {
      Fl_Round_Button lpc_c1 {
        label {Channel 1}
        callback {lpc_c2->value(0);
lpc_c3->value(0);
lpc_c4->value(0);}
        xywh {245 80 145 20} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
      Fl_Round_Button lpc_c2 {
        label {Channel 2}
        callback {lpc_c1->value(0);
lpc_c3->value(0);
lpc_c4->value(0);}
        xywh {245 100 125 20} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
      Fl_Round_Button lpc_c3 {
        label {Channel 3}
        callback {lpc_c1->value(0);
lpc_c2->value(0);
lpc_c4->value(0);}
        xywh {245 120 125 25} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
      Fl_Round_Button lpc_c4 {
        label {Channel 4}
        callback {lpc_c1->value(0);
lpc_c2->value(0);
lpc_c3->value(0);}
        xywh {245 140 90 25} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
    }
    Fl_Value_Input lpc_s {
      label {Sample rate (-s)}
      xywh {30 75 55 25} align 8
      code0 {int t; prof_l.get("s",t,0); o->value(t);}
    }
    Fl_Value_Input lpc_b {
      label {Begin time (-b)}
      xywh {30 115 55 25} align 8
      code0 {int t; prof_l.get("b",t,0); o->value(t);}
    }
    Fl_Value_Input lpc_d {
      label {Duration (-d)}
      xywh {30 155 55 25} align 8
      code0 {int t; prof_l.get("d",t,0); o->value(t);}
    }
    Fl_Value_Input lpc_p {
      label {Number of Poles (-p)}
      xywh {30 195 55 25} align 8
      code0 {int t; prof_l.get("b",t,34); o->value(t);}
    }
    Fl_Value_Input lpc_h {
      label {Hopsize (-h)}
      xywh {230 195 55 25} align 8
      code0 {int t; prof_l.get("h",t,200); o->value(t);}
    }
    Fl_Value_Input lpc_P {
      label {Low Pitch (-P)}
      xywh {30 240 60 25} align 8
      code0 {int t; prof_l.get("P",t,70); o->value(t);}
    }
    Fl_Value_Input lpc_Q {
      label {High Pitch (-Q)}
      xywh {230 240 55 25} align 8
      code0 {int t; prof_l.get("b",t,200); o->value(t);}
    }
    Fl_Check_Button lpc_g {
      label Graphics
      xywh {230 165 95 20} down_box DOWN_BOX deactivate
    }
  }
}

Function {make_pvanal()} {open
} {
  Fl_Window {} {
    label {Phase Vocoding Analysis}
    callback {do_util = 0;} open
    xywh {454 457 450 310} type Double
    code0 {int ct; prof_p.get("c",ct,1);
pvc_c1->value(ct==1);pvc_c2->value(ct==2);pvc_c3->value(ct==3);pvc_c4->value(ct==4);} visible
  } {
    Fl_File_Input pvc_analin {
      label Input
      xywh {50 10 320 30}
      code0 {char *t; prof_p.get("input", t, ""); o->value(t);free(t);}
    }
    Fl_File_Input pvc_analout {
      label Output
      xywh {50 40 320 30}
      code0 {char *t; prof_l.get("output", t, "test.pv"); o->value(t);free(t);}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {15 275 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {349 280 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      callback {pvc_analin->value(fl_file_chooser("PVC", "*.wav", NULL));}
      xywh {370 10 30 30} color 5
    }
    Fl_Button {} {
      label {?}
      callback {pvc_analout->value(fl_file_chooser("PVCout", "*.pv", NULL));}
      xywh {370 40 30 30} color 5
    }
    Fl_Group {} {open
      xywh {230 80 170 85} box THIN_DOWN_FRAME
    } {
      Fl_Round_Button pvc_c1 {
        label {Channel 1}
        callback {pvc_c2->value(0);
pvc_c3->value(0);
pvc_c4->value(0);}
        xywh {245 80 145 20} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
      Fl_Round_Button pvc_c2 {
        label {Channel 2}
        callback {pvc_c1->value(0);
pvc_c3->value(0);
pvc_c4->value(0);}
        xywh {245 100 125 20} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
      Fl_Round_Button pvc_c3 {
        label {Channel 3}
        callback {pvc_c1->value(0);
pvc_c2->value(0);
pvc_c4->value(0);}
        xywh {245 120 125 25} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
      Fl_Round_Button pvc_c4 {
        label {Channel 4}
        callback {pvc_c1->value(0);
pvc_c2->value(0);
pvc_c3->value(0);}
        xywh {245 140 90 25} down_box ROUND_DOWN_BOX
        code0 {o->value(0);}
      }
    }
    Fl_Value_Input pvc_s {
      label {Sample rate (-s)}
      xywh {30 75 55 25} align 8
      code0 {int t; prof_p.get("s",t,0); o->value(t);}
    }
    Fl_Value_Input pvc_b {
      label {Begin time (-b)}
      xywh {30 115 55 25} align 8
      code0 {int t; prof_p.get("b",t,0); o->value(t);}
    }
    Fl_Value_Input pvc_d {
      label {Duration (-d)}
      xywh {30 155 55 25} align 8
      code0 {int t; prof_p.get("d",t,0); o->value(t);}
    }
    Fl_Value_Input pvc_w {
      label {Wind factor (-w)}
      xywh {30 195 55 25} align 8
      code0 {int t; prof_p.get("w",t,0); o->value(t);}
    }
    Fl_Value_Input pvc_h {
      label {Hopsize (-h)}
      xywh {230 195 55 25} align 8
      code0 {int t; prof_p.get("h",t,0); o->value(t);}
    }
    Fl_Check_Button pvc_g {
      label Graphics
      xywh {230 165 95 20} down_box DOWN_BOX deactivate
    }
    Fl_Group {} {
      label Window open
      xywh {15 225 405 55} box DOWN_BOX align 17
    } {
      Fl_Round_Button pvc_H {
        label {Hamming (-H)}
        callback {pvc_K->value(0);
pvc_V->value(0);}
        xywh {175 240 110 35} down_box ROUND_DOWN_BOX
        code0 {int t; prof_p.get("H",t,1);o->value(t);}
      }
      Fl_Round_Button pvc_K {
        label {Kaiser (-K)}
        callback {pvc_H->value(0);
pvc_V->value(0);}
        xywh {320 240 100 35} down_box ROUND_DOWN_BOX
        code0 {int t;prof_p.get("K",t,0);o->value(t);}
      }
      Fl_Round_Button pvc_V {
        label {von Hann}
        callback {pvc_K->value(0);
pvc_H->value(0);}
        xywh {40 240 85 35} down_box ROUND_DOWN_BOX
        code0 {int t;prof_p.get("V",t,1);o->value(t);}
      }
    }
  }
}

Function {make_cvlanal()} {open
} {
  Fl_Window {} {
    label {Convolution Analysis}
    callback {do_util = 0;} open
    xywh {484 353 360 245} type Double
    code0 {int ct; prof_c.get("c",ct,0);
cvl_ac->value(ct==0);cvl_c1->value(ct==1);cvl_c2->value(ct==2);
cvl_c3->value(ct==3);cvl_c4->value(ct==4);} visible
  } {
    Fl_File_Input cvl_analin {
      label Input
      xywh {50 5 280 30}
      code0 {char *t; prof_c.get("input", t, ""); o->value(t);free(t);}
    }
    Fl_File_Input cvl_analout {
      label Output
      xywh {50 35 280 30}
      code0 {char *t; prof_c.get("output", t, "test.cv"); o->value(t);free(t);}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {10 205 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {295 205 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      callback {cvl_analin->value(fl_file_chooser("CONVOLVE", "*.wav", NULL));}
      xywh {330 5 25 30} color 5
    }
    Fl_Button {} {
      label {?}
      callback {cvl_analout->value(fl_file_chooser("Output", "*.cv", NULL));}
      xywh {330 35 25 30} color 5
    }
    Fl_Group {} {open
      xywh {205 80 140 105} box THIN_DOWN_FRAME
    } {
      Fl_Round_Button cvl_ac {
        label {All Channels}
        callback {cvl_c1->value(0);
cvl_c2->value(0);
cvl_c3->value(0);
cvl_c4->value(0);}
        xywh {220 80 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button cvl_c1 {
        label {Channel 1}
        callback {cvl_ac->value(0);
cvl_c2->value(0);
cvl_c3->value(0);
cvl_c4->value(0);}
        xywh {220 100 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button cvl_c2 {
        label {Channel 2}
        callback {cvl_ac->value(0);
cvl_c1->value(0);
cvl_c3->value(0);
cvl_c4->value(0);}
        xywh {220 120 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button cvl_c3 {
        label {Channel 3}
        callback {cvl_ac->value(0);
cvl_c1->value(0);
cvl_c2->value(0);
cvl_c4->value(0);}
        xywh {220 140 110 25} down_box ROUND_DOWN_BOX
      }
      Fl_Round_Button cvl_c4 {
        label {Channel 4}
        callback {cvl_ac->value(0);
cvl_c1->value(0);
cvl_c2->value(0);
cvl_c3->value(0);}
        xywh {220 155 110 30} down_box ROUND_DOWN_BOX
      }
    }
    Fl_Value_Input cvl_s {
      label {Sample rate (-s)}
      xywh {30 75 55 25} align 8
      code0 {int t; prof_c.get("s",t,0); o->value(t);}
    }
    Fl_Value_Input cvl_b {
      label {Begin time (-b)}
      xywh {30 115 55 25} align 8
      code0 {int t; prof_c.get("b",t,0); o->value(t);}
    }
    Fl_Value_Input cvl_d {
      label {Duration (-d)}
      xywh {30 155 55 25} align 8
      code0 {int t; prof_c.get("d",t,0); o->value(t);}
    }
  }
}

Function {make_pvlook()} {open
} {
  Fl_Window {} {
    label {Phase Vocoder Decoder}
    callback {do_util = 0;} open
    xywh {477 304 410 225} type Double visible
  } {
    Fl_File_Input plk_analin {
      label Input
      xywh {50 10 320 30}
      code0 {char *t; prof_k.get("input", t, ""); o->value(t);free(t);}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {35 185 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {335 185 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      callback {plk_analin->value(fl_file_chooser("PV", "*.pv", NULL));}
      xywh {370 10 30 30} color 5
    }
    Fl_Value_Input plk_bb {
      label {Begin Bin (-bb)}
      xywh {30 75 55 25} align 8
      code0 {int t; prof_k.get("bb",t,0); o->value(t);}
    }
    Fl_Value_Input plk_bf {
      label {Begin frame (-bf)}
      xywh {30 115 55 25} align 8
      code0 {int t; prof_k.get("bf",t,0); o->value(t);}
    }
    Fl_Value_Input plk_eb {
      label {End Bin (-eb)}
      xywh {220 75 55 25} align 8
      code0 {int t; prof_k.get("eb",t,0); o->value(t);}
    }
    Fl_Value_Input plk_ef {
      label {End Frame (-ef)}
      xywh {220 115 55 25} align 8
      code0 {int t; prof_k.get("ef",t,0); o->value(t);}
    }
    Fl_Check_Button plk_i {
      label {Integer output}
      xywh {100 155 115 20} down_box DOWN_BOX
      code0 {int t; prof_k.get("i",t,0); o->value(t);}
    }
  }
}

Function {make_dnoise()} {open
} {
  Fl_Window {} {
    label Dnoiser
    callback {do_util = 0;} open
    xywh {513 109 455 430} type Double visible
  } {
    Fl_File_Input dns_analin {
      label Input
      xywh {50 5 360 30}
      code0 {char *t; prof_n.get("input", t, ""); o->value(t);free(t);}
    }
    Fl_File_Input dns_analout {
      label Output
      xywh {50 35 360 30}
      code0 {char *t; prof_n.get("output", t, "test.wav"); o->value(t);free(t);}
    }
    Fl_File_Input dns_noise {
      label Noise
      xywh {50 65 360 30}
      code0 {char *t; prof_n.get("noise", t, "noise.wav"); o->value(t);free(t);}
    }
    Fl_Return_Button {} {
      label OK
      callback {do_util = 1;}
      xywh {35 395 50 25} color 3
    }
    Fl_Button {} {
      label Cancel
      callback {do_util = -1;}
      xywh {380 395 50 25} color 1
    }
    Fl_Button {} {
      label {?}
      callback {dns_analin->value(fl_file_chooser("DNOISER", "*.wav", NULL));}
      xywh {410 5 25 30} color 5
    }
    Fl_Button {} {
      label {?}
      callback {dns_analout->value(fl_file_chooser("Output", "*.wav", NULL));}
      xywh {410 35 25 30} color 5
    }
    Fl_Button {} {
      label {?}
      callback {dns_analout->value(fl_file_chooser("Noise", "*.wav", NULL));}
      xywh {410 65 25 30} color 5
    }
    Fl_Value_Input dns_t {
      label {Threshold (t)}
      xywh {35 115 55 25} align 8
      code0 {int t; prof_n.get("t",t,30); o->value(t);}
    }
    Fl_Value_Input dns_b {
      label {Begin time (-b)}
      xywh {35 155 55 25} align 8
      code0 {int t; prof_n.get("b",t,0); o->value(t);}
    }
    Fl_Value_Input dns_e {
      label {End time (-e)}
      xywh {35 195 55 25} align 8
      code0 {int t; prof_n.get("e",t,0); o->value(t);}
    }
    Fl_Value_Input dns_B {
      label {Begin sample (-B)}
      xywh {35 235 55 25} align 8
      code0 {int t; prof_n.get("B",t,0); o->value(t);}
    }
    Fl_Value_Input dns_E {
      label {End sample (-E)}
      xywh {35 275 55 25} align 8
      code0 {int t; prof_n.get("E",t,0); o->value(t);}
    }
    Fl_Value_Input dns_N {
      label {\# of filters (-N)}
      xywh {35 315 55 25} align 8
      code0 {int t; prof_n.get("M",t,1024); o->value(t);}
    }
    Fl_Value_Input dns_S {
      label {Sharpness (-S)}
      xywh {210 115 55 25} align 8
      code0 {int t; prof_n.get("S",t,1); o->value(t);}
    }
    Fl_Value_Input dns_w {
      label {Filter overlap (-w)}
      xywh {210 155 55 25} align 8
      code0 {int t; prof_n.get("w",t,2); o->value(t);}
    }
    Fl_Value_Input dns_M {
      label {Anal window size(-M)}
      xywh {210 195 55 25} align 8
      code0 {int t; prof_n.get("N",t,1024);prof_n.get("M",t,t-1); o->value(t);}
    }
    Fl_Value_Input dns_L {
      label {Synth window size (-L)}
      xywh {210 235 55 25} align 8
      code0 {int t; prof_n.get("L",t,(int)dns_M->value()); o->value(t);}
    }
    Fl_Value_Input dns_n {
      label {Frames to average over (-n)}
      xywh {210 275 55 25} align 8
      code0 {int t; prof_n.get("n",t,5); o->value(t);}
    }
    Fl_Value_Input dns_m {
      label {Min gain of noise-gate (-m)}
      xywh {210 315 55 25} align 8
      code0 {int t; prof_n.get("m",t,-40); o->value(t);}
    }
    Fl_Value_Input dns_D {
      label {Decimation factor (-D)}
      xywh {210 355 55 25} align 8
      code0 {int t; prof_n.get("D",t,0); o->value(t);}
    }
    Fl_Check_Button dns_V {
      label {Verbose (-V)}
      xywh {35 350 125 30} down_box DOWN_BOX
    }
  }
}
