// generated by Fast Light User Interface Designer (fluid) version 1.0300

#include "/build/infamousplugins/src/build/src/casynth/casynth_ui.h"

void CaSynthUI::cb_rule7_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule7->value())
  tmp |= 0x80;
else
  tmp &= ~0x80;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule7(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule7_i(o,v);
}

void CaSynthUI::cb_rule6_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule6->value())
  tmp |= 0x40;
else
  tmp &= ~0x40;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule6(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule6_i(o,v);
}

void CaSynthUI::cb_rule5_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule5->value())
  tmp |= 0x20;
else
  tmp &= ~0x20;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule5(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule5_i(o,v);
}

void CaSynthUI::cb_rule4_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule4->value())
  tmp |= 0x10;
else
  tmp &= ~0x10;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule4(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule4_i(o,v);
}

void CaSynthUI::cb_rule3_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule3->value())
  tmp |= 0x08;
else
  tmp &= ~0x08;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule3(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule3_i(o,v);
}

void CaSynthUI::cb_rule2_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule2->value())
  tmp |= 0x04;
else
  tmp &= ~0x04;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule2(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule2_i(o,v);
}

void CaSynthUI::cb_rule1_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule1->value())
  tmp |= 0x02;
else
  tmp &= ~0x02;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule1(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule1_i(o,v);
}

void CaSynthUI::cb_rule0_i(Button*, void*) {
  unsigned char tmp = rule;
if(rule0->value())
  tmp |= 0x01;
else
  tmp &= ~0x01;
rule = tmp;
write_function(controller,RULE,sizeof(float),0,&rule);
char s[20];
sprintf(s,"%18i",(int)rule);
value->copy_label(s);
param->copy_label("RULE");
cellgrid->rule = rule;
cellgrid->redraw();
}
void CaSynthUI::cb_rule0(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_rule0_i(o,v);
}

void CaSynthUI::cb_init15_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init15->value())
  tmp |= 0x8000;
else
  tmp &= ~0x8000;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init15(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init15_i(o,v);
}

void CaSynthUI::cb_init14_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init14->value())
  tmp |= 0x4000;
else
  tmp &= ~0x4000;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init14(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init14_i(o,v);
}

void CaSynthUI::cb_init13_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init13->value())
  tmp |= 0x2000;
else
  tmp &= ~0x2000;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init13(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init13_i(o,v);
}

void CaSynthUI::cb_init12_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init12->value())
  tmp |= 0x1000;
else
  tmp &= ~0x1000;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init12(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init12_i(o,v);
}

void CaSynthUI::cb_init11_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init11->value())
  tmp |= 0x0800;
else
  tmp &= ~0x0800;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init11(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init11_i(o,v);
}

void CaSynthUI::cb_init10_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init10->value())
  tmp |= 0x0400;
else
  tmp &= ~0x0400;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init10(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init10_i(o,v);
}

void CaSynthUI::cb_init9_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init9->value())
  tmp |= 0x0200;
else
  tmp &= ~0x0200;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init9(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init9_i(o,v);
}

void CaSynthUI::cb_init8_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init8->value())
  tmp |= 0x0100;
else
  tmp &= ~0x0100;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init8(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init8_i(o,v);
}

void CaSynthUI::cb_init7_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init7->value())
  tmp |= 0x0080;
else
  tmp &= ~0x0080;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init7(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init7_i(o,v);
}

void CaSynthUI::cb_init6_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init6->value())
  tmp |= 0x0040;
else
  tmp &= ~0x0040;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init6(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init6_i(o,v);
}

void CaSynthUI::cb_init5_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init5->value())
  tmp |= 0x0020;
else
  tmp &= ~0x0020;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init5(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init5_i(o,v);
}

void CaSynthUI::cb_init4_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init4->value())
  tmp |= 0x0010;
else
  tmp &= ~0x0010;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init4(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init4_i(o,v);
}

void CaSynthUI::cb_init3_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init3->value())
  tmp |= 0x0008;
else
  tmp &= ~0x0008;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init3(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init3_i(o,v);
}

void CaSynthUI::cb_init2_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init2->value())
  tmp |= 0x0004;
else
  tmp &= ~0x0004;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init2(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init2_i(o,v);
}

void CaSynthUI::cb_init1_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init1->value())
  tmp |= 0x0002;
else
  tmp &= ~0x0002;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init1(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init1_i(o,v);
}

void CaSynthUI::cb_init0_i(Button*, void*) {
  unsigned short tmp = initial_condition;
if(init0->value())
  tmp |= 0x0001;
else
  tmp &= ~0x0001;
initial_condition = tmp;
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
char s[20];
sprintf(s,"%18i",(int)initial_condition);
value->copy_label(s);
param->copy_label("INIT. CONDITION");
cellgrid->initial_condition = initial_condition;
cellgrid->redraw();
}
void CaSynthUI::cb_init0(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_init0_i(o,v);
}

void CaSynthUI::cb_hal_i(Button*, void*) {
  //randomize everything
float tmp;
#define MIN(a,b) (a<b?a:b)
#define MAX(a,b) (a<b?b:a)

tmp = rand()/(float)RAND_MAX;
tmp = (int)(0xFF*tmp);
set_rule(tmp);
write_function(controller,RULE,sizeof(float),0,&rule);

tmp = rand()/(float)RAND_MAX;
tmp = (int)(0xFFFF*tmp);
set_initial_condition(tmp);
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);

tmp = rand()/(float)RAND_MAX;
tmp = (int)(5*tmp);
cellwaveform->value(tmp);
cellwaveform->floatvalue = tmp;
write_function(controller,WAVE,sizeof(float),0,&cellwaveform->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp = rand()/(float)RAND_MAX;
tmp = 9.999*tmp + 0.001;
lifetime->value(tmp);
lifetime->floatvalue = tmp;
write_function(controller,CELL_LIFE,sizeof(float),0,&lifetime->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp = (int)(3*tmp);
harmgain->value(tmp);
harmgain->floatvalue = tmp;
write_function(controller,HARM_MODE,sizeof(float),0,&harmgain->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp = 1-tmp;//bias to larger values
tmp = (int)(16*tmp);
nharmonics->value(tmp);
nharmonics->floatvalue = tmp;
write_function(controller,NHARMONICS,sizeof(float),0,&nharmonics->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= 50;
harmwidth->value(tmp);
harmwidth->floatvalue = tmp;
write_function(controller,HARM_WIDTH,sizeof(float),0,&harmwidth->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp = 14.999*tmp + 0.001;
a->value(tmp);
a->floatvalue = tmp;
write_function(controller,ENV_A,sizeof(float),0,&a->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp = 14.999*tmp + 0.001;
d->value(tmp);
d->floatvalue = tmp;
write_function(controller,ENV_D,sizeof(float),0,&d->floatvalue);

tmp = rand()/(float)RAND_MAX;
b->value(tmp);
b->floatvalue = tmp;
write_function(controller,ENV_B,sizeof(float),0,&b->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp = 14.999*tmp + 0.001;
sw->value(tmp);
sw->floatvalue = tmp;
write_function(controller,ENV_SWL,sizeof(float),0,&sw->floatvalue);

tmp = rand()/(float)RAND_MAX;
su->value(tmp);
su->floatvalue = tmp;
write_function(controller,ENV_SUS,sizeof(float),0,&su->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp = 14.999*tmp + 0.001;
r->value(tmp);
r->floatvalue = tmp;
write_function(controller,ENV_R,sizeof(float),0,&r->floatvalue);

tmp = 5.0*rand()/(float)RAND_MAX;
amwave->value(tmp);
amwave->floatvalue = tmp;
write_function(controller,AMOD_WAV,sizeof(float),0,&amwave->floatvalue);

tmp = 5.0*rand()/(float)RAND_MAX;
fmwave->value(tmp);
fmwave->floatvalue = tmp;
write_function(controller,FMOD_WAV,sizeof(float),0,&fmwave->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= 110;
amfreq->value(tmp);
amfreq->floatvalue = tmp;
write_function(controller,AMOD_FREQ,sizeof(float),0,&amfreq->floatvalue);

tmp = rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= rand()/(float)RAND_MAX;
tmp *= 110;
fmfreq->value(tmp);
fmfreq->floatvalue = tmp;
write_function(controller,FMOD_FREQ,sizeof(float),0,&fmfreq->floatvalue);

tmp = 2.0*rand()/(float)RAND_MAX -1;
tmp *= 2.0*rand()/(float)RAND_MAX -1;
tmp *= 2.0*rand()/(float)RAND_MAX -1;
amgain->value(tmp);
amgain->floatvalue = tmp;
write_function(controller,AMOD_GAIN,sizeof(float),0,&amgain->floatvalue);

tmp = 2.0*rand()/(float)RAND_MAX -1;
tmp *= 2.0*rand()/(float)RAND_MAX -1;
tmp *= 2.0*rand()/(float)RAND_MAX -1;
tmp *= 4;
fmgain->value(tmp);
fmgain->floatvalue = tmp;
write_function(controller,FMOD_GAIN,sizeof(float),0,&fmgain->floatvalue);

param->copy_label("AFFIRMATIVE DAVE.");
value->copy_label("        I READ YOU.");
}
void CaSynthUI::cb_hal(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_hal_i(o,v);
}

void CaSynthUI::cb_channel_i(Dial*, void*) {
  write_function(controller,CHANNEL,sizeof(float),0,&channel->floatvalue);
char s[20];
sprintf(s,"%18i",(int)channel->floatvalue);
param->copy_label("MIDI CHANNEL");
value->copy_label(s);
}
void CaSynthUI::cb_channel(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_channel_i(o,v);
}

void CaSynthUI::cb_mastergain_i(Dial*, void*) {
  write_function(controller,MASTER_GAIN,sizeof(float),0,&mastergain->floatvalue);
char s[20];
sprintf(s,"%19.3f",mastergain->floatvalue);
param->copy_label("MASTER GAIN");
value->copy_label(s);
}
void CaSynthUI::cb_mastergain(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_mastergain_i(o,v);
}

void CaSynthUI::cb_cellwaveform_i(Dial*, void*) {
  write_function(controller,WAVE,sizeof(float),0,&cellwaveform->floatvalue);
param->copy_label("CELL WAVEFORM");
int a = cellwaveform->floatvalue; 
switch(a)
{
case 0:
  value->copy_label("              SINE");
  break;
case 1:
  value->copy_label("               SAW");
  break;
case 2:
  value->copy_label("            SQUARE");
  break;
case 3:
  value->copy_label("          TRIANGLE");
  break;
case 4:
  value->copy_label("       WHITE NOISE");
  break;
case 5:
  value->copy_label("            RANDOM");
  break;
};
}
void CaSynthUI::cb_cellwaveform(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_cellwaveform_i(o,v);
}

void CaSynthUI::cb_lifetime_i(Dial*, void*) {
  write_function(controller,CELL_LIFE,sizeof(float),0,&lifetime->floatvalue);
char s[20];
sprintf(s,"%13.3f BEATS",lifetime->floatvalue);
param->copy_label("CELL LIFETIME");
value->copy_label(s);
}
void CaSynthUI::cb_lifetime(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_lifetime_i(o,v);
}

void CaSynthUI::cb_harmgain_i(Dial*, void*) {
  write_function(controller,HARM_MODE,sizeof(float),0,&harmgain->floatvalue);
param->copy_label("HARMONIC GAINS");
int a = harmgain->floatvalue; 
switch(a)
{
case 0:
  value->copy_label("              SINC");
  break; case 1:
  value->copy_label("               SAW");
  break;
case 2:
  value->copy_label("            SQUARE");
  break;
case 3:
  value->copy_label("          TRIANGLE");
  break;
};
}
void CaSynthUI::cb_harmgain(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_harmgain_i(o,v);
}

void CaSynthUI::cb_nharmonics_i(Dial*, void*) {
  write_function(controller,NHARMONICS,sizeof(float),0,&nharmonics->floatvalue);
char s[20];
sprintf(s,"%18i",(int)nharmonics->floatvalue);
param->copy_label("NUM. HARMONICS");
value->copy_label(s);
}
void CaSynthUI::cb_nharmonics(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_nharmonics_i(o,v);
}

void CaSynthUI::cb_harmwidth_i(Dial*, void*) {
  write_function(controller,HARM_WIDTH,sizeof(float),0,&harmwidth->floatvalue);
char s[20];
sprintf(s,"%13.2f CENTS",harmwidth->floatvalue);
param->copy_label("HARMONIC WIDTH");
value->copy_label(s);
}
void CaSynthUI::cb_harmwidth(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_harmwidth_i(o,v);
}

void CaSynthUI::cb_a_i(Dial*, void*) {
  write_function(controller,ENV_A,sizeof(float),0,&a->floatvalue);
char s[20];
sprintf(s,"%17.3f S",a->floatvalue);
param->copy_label("ENV. ATTACK");
value->copy_label(s);
}
void CaSynthUI::cb_a(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_a_i(o,v);
}

void CaSynthUI::cb_d_i(Dial*, void*) {
  write_function(controller,ENV_D,sizeof(float),0,&d->floatvalue);
char s[20];
sprintf(s,"%17.3f S",d->floatvalue);
param->copy_label("ENV. DECAY");
value->copy_label(s);
}
void CaSynthUI::cb_d(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_d_i(o,v);
}

void CaSynthUI::cb_b_i(Dial*, void*) {
  write_function(controller,ENV_B,sizeof(float),0,&b->floatvalue);
char s[20];
sprintf(s,"%19.3f",b->floatvalue);
param->copy_label("ENV. BREAK POINT");
value->copy_label(s);
}
void CaSynthUI::cb_b(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_b_i(o,v);
}

void CaSynthUI::cb_sw_i(Dial*, void*) {
  write_function(controller,ENV_SWL,sizeof(float),0,&sw->floatvalue);
char s[20];
sprintf(s,"%17.3f S",sw->floatvalue);
param->copy_label("ENV. SWELL");
value->copy_label(s);
}
void CaSynthUI::cb_sw(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_sw_i(o,v);
}

void CaSynthUI::cb_su_i(Dial*, void*) {
  write_function(controller,ENV_SUS,sizeof(float),0,&su->floatvalue);
char s[20];
sprintf(s,"%19.3f",su->floatvalue);
param->copy_label("ENV. SUSTAIN");
value->copy_label(s);
}
void CaSynthUI::cb_su(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_su_i(o,v);
}

void CaSynthUI::cb_r_i(Dial*, void*) {
  write_function(controller,ENV_R,sizeof(float),0,&r->floatvalue);
char s[20];
sprintf(s,"%17.3f S",r->floatvalue);
param->copy_label("ENV. RELEASE");
value->copy_label(s);
}
void CaSynthUI::cb_r(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_r_i(o,v);
}

void CaSynthUI::cb_amwave_i(Dial*, void*) {
  write_function(controller,AMOD_WAV,sizeof(float),0,&amwave->floatvalue);
param->copy_label("AMP. MOD. WAVEFORM");
int a = amwave->floatvalue; 
switch(a)
{
case 0:
  value->copy_label("              SINE");
  break;
case 1:
  value->copy_label("               SAW");
  break;
case 2:
  value->copy_label("            SQUARE");
  break;
case 3:
  value->copy_label("          TRIANGLE");
  break;
case 4:
  value->copy_label("       WHITE NOISE");
  break;
case 5:
  value->copy_label("            RANDOM");
  break;
};
}
void CaSynthUI::cb_amwave(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_amwave_i(o,v);
}

void CaSynthUI::cb_amfreq_i(Dial*, void*) {
  write_function(controller,AMOD_FREQ,sizeof(float),0,&amfreq->floatvalue);
char s[20];
sprintf(s,"%16.2f HZ",amfreq->floatvalue);
param->copy_label("AMP. MOD. FREQ.");
value->copy_label(s);
}
void CaSynthUI::cb_amfreq(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_amfreq_i(o,v);
}

void CaSynthUI::cb_amgain_i(Dial*, void*) {
  write_function(controller,AMOD_GAIN,sizeof(float),0,&amgain->floatvalue);
char s[20];
sprintf(s,"%19.3f",amgain->floatvalue);
param->copy_label("AMP. MOD. GAIN");
value->copy_label(s);
}
void CaSynthUI::cb_amgain(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_amgain_i(o,v);
}

void CaSynthUI::cb_fmwave_i(Dial*, void*) {
  write_function(controller,FMOD_WAV,sizeof(float),0,&fmwave->floatvalue);
param->copy_label("FREQ. MOD. WAVEFORM");
int a = fmwave->floatvalue; 
switch(a)
{
case 0:
  value->copy_label("              SINE");
  break;
case 1:
  value->copy_label("               SAW");
  break;
case 2:
  value->copy_label("            SQUARE");
  break;
case 3:
  value->copy_label("          TRIANGLE");
  break;
case 4:
  value->copy_label("       WHITE NOISE");
  break;
case 5:
  value->copy_label("            RANDOM");
  break;
};
}
void CaSynthUI::cb_fmwave(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_fmwave_i(o,v);
}

void CaSynthUI::cb_fmfreq_i(Dial*, void*) {
  write_function(controller,FMOD_FREQ,sizeof(float),0,&fmfreq->floatvalue);
char s[20];
sprintf(s,"%16.2f HZ",fmfreq->floatvalue);
param->copy_label("FREQ. MOD. FREQ.");
value->copy_label(s);
}
void CaSynthUI::cb_fmfreq(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_fmfreq_i(o,v);
}

void CaSynthUI::cb_fmgain_i(Dial*, void*) {
  write_function(controller,FMOD_GAIN,sizeof(float),0,&fmgain->floatvalue);
char s[20];
sprintf(s,"%19.3f",fmgain->floatvalue);
param->copy_label("FREQ. MOD. GAIN");
value->copy_label(s);
}
void CaSynthUI::cb_fmgain(Dial* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_fmgain_i(o,v);
}

void CaSynthUI::cb_secret_rule_i(Button*, void*) {
  char n[20];
sprintf(n,"%i",(int)rule);
nonmodal((char*)"Set rule",n);
}
void CaSynthUI::cb_secret_rule(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_secret_rule_i(o,v);
}

void CaSynthUI::cb_secret_initial_i(Button*, void*) {
  char n[20];
sprintf(n,"%i",(int)initial_condition);
nonmodal((char*)"Set initial condition",n);
}
void CaSynthUI::cb_secret_initial(Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->parent()->user_data()))->cb_secret_initial_i(o,v);
}

void CaSynthUI::cb_OK_i(Fl_Button*, void*) {
  char* r = (char*)inpoot->value();
unsigned int i;
float val;
if(!strcmp(winder->label(),"Set rule"))
{
if(r!=NULL && sscanf(r,"0x%2x",&i))
{
  val = i;
  set_rule(val);
  char s[20];
  sprintf(s,"%18i",(int)rule);
  value->copy_label(s);
  param->copy_label("RULE");
}
else if(r!=NULL && sscanf(r,"%f",&val))
{
  if ( val > 255 ) val = 255;
  if ( val < 0 ) val = 0;
  set_rule(val);
  char s[20];
  sprintf(s,"%18i",(int)rule);
  value->copy_label(s);
  param->copy_label("RULE");
}
write_function(controller,RULE,sizeof(float),0,&rule);
}
else
{
if(r!=NULL && sscanf(r,"0x%4x",&i))
{
  val = i;
  set_initial_condition(val);
  char s[20];
  sprintf(s,"%18i",(int)initial_condition);
  value->copy_label(s);
  param->copy_label("INIT. CONDITION");
}
else if(r!=NULL && sscanf(r,"%f",&val))
{
  if ( val > 65535 ) val = 65535;
  if ( val < 0 ) val = 0;
  set_initial_condition(val);
  char s[20];
  sprintf(s,"%18i",(int)initial_condition);
  value->copy_label(s);
  param->copy_label("INIT. CONDITION");
}
write_function(controller,INIT_CELLS,sizeof(float),0,&initial_condition);
}

delete winder;
winder = NULL;
}
void CaSynthUI::cb_OK(Fl_Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->user_data()))->cb_OK_i(o,v);
}

void CaSynthUI::cb_Cancel_i(Fl_Button*, void*) {
  delete winder;
winder = NULL;
}
void CaSynthUI::cb_Cancel(Fl_Button* o, void* v) {
  ((CaSynthUI*)(o->parent()->user_data()))->cb_Cancel_i(o,v);
}

Fl_Double_Window* CaSynthUI::show() {
  { Fl_Double_Window* o = ui = new Fl_Double_Window(460, 600, "the infamous cellular automaton synth");
    ui->box(FL_UP_BOX);
    ui->user_data((void*)(this));
    { Fl_Group* o = new Fl_Group(0, 0, 460, 600);
      { Background* o = bg = new Background(0, 0, 460, 600);
        bg->box(FL_NO_BOX);
        bg->color(FL_BACKGROUND_COLOR);
        bg->selection_color(FL_BACKGROUND_COLOR);
        bg->labeltype(FL_NORMAL_LABEL);
        bg->labelfont(0);
        bg->labelsize(14);
        bg->labelcolor(FL_FOREGROUND_COLOR);
        bg->align(Fl_Align(FL_ALIGN_CENTER));
        bg->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casbg_get_height(); o->drawing_w = cairo_code_draw_casbg_get_width(); o->drawing_f = &cairo_code_draw_casbg_render;
      } // Background* bg
      { Background* o = logo = new Background(29, 305, 228, 286);
        logo->box(FL_NO_BOX);
        logo->color(FL_BACKGROUND_COLOR);
        logo->selection_color(FL_BACKGROUND_COLOR);
        logo->labeltype(FL_NORMAL_LABEL);
        logo->labelfont(0);
        logo->labelsize(14);
        logo->labelcolor(FL_FOREGROUND_COLOR);
        logo->align(Fl_Align(FL_ALIGN_CENTER));
        logo->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_infamousLogoTrans_get_height(); o->drawing_w = cairo_code_draw_infamousLogoTrans_get_width(); o->drawing_f = &cairo_code_draw_infamousLogoTrans_render;
        o->stretch = false;
      } // Background* logo
      { Background* o = title = new Background(302, 502, 131, 83);
        title->box(FL_NO_BOX);
        title->color(FL_BACKGROUND_COLOR);
        title->selection_color(FL_BACKGROUND_COLOR);
        title->labeltype(FL_NORMAL_LABEL);
        title->labelfont(0);
        title->labelsize(14);
        title->labelcolor(FL_FOREGROUND_COLOR);
        title->align(Fl_Align(FL_ALIGN_CENTER));
        title->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casTitleLabel_get_height(); o->drawing_w = cairo_code_draw_casTitleLabel_get_width(); o->drawing_f = &cairo_code_draw_casTitleLabel_render;
        o->stretch = false;
      } // Background* title
      { Background* o = mf = new Background(16, 21, 96, 66);
        mf->box(FL_NO_BOX);
        mf->color(FL_BACKGROUND_COLOR);
        mf->selection_color(FL_BACKGROUND_COLOR);
        mf->labeltype(FL_NORMAL_LABEL);
        mf->labelfont(0);
        mf->labelsize(14);
        mf->labelcolor(FL_FOREGROUND_COLOR);
        mf->align(Fl_Align(FL_ALIGN_CENTER));
        mf->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFrame_get_height(); o->drawing_w = cairo_code_draw_casFrame_get_width(); o->drawing_f = &cairo_code_draw_casFrame_render;
      } // Background* mf
      { Background* o = cf = new Background(16, 108, 253, 483);
        cf->box(FL_NO_BOX);
        cf->color(FL_BACKGROUND_COLOR);
        cf->selection_color(FL_BACKGROUND_COLOR);
        cf->labeltype(FL_NORMAL_LABEL);
        cf->labelfont(0);
        cf->labelsize(14);
        cf->labelcolor(FL_FOREGROUND_COLOR);
        cf->align(Fl_Align(FL_ALIGN_CENTER));
        cf->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casCellFrame_get_height(); o->drawing_w = cairo_code_draw_casCellFrame_get_width(); o->drawing_f = &cairo_code_draw_casCellFrame_render;
      } // Background* cf
      { Background* o = of = new Background(16, 298, 244, 293);
        of->box(FL_NO_BOX);
        of->color(FL_BACKGROUND_COLOR);
        of->selection_color(FL_BACKGROUND_COLOR);
        of->labeltype(FL_NORMAL_LABEL);
        of->labelfont(0);
        of->labelsize(14);
        of->labelcolor(FL_FOREGROUND_COLOR);
        of->align(Fl_Align(FL_ALIGN_CENTER));
        of->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFrame_get_height(); o->drawing_w = cairo_code_draw_casFrame_get_width(); o->drawing_f = &cairo_code_draw_casFrame_render;
      } // Background* of
      { Background* o = hf = new Background(281, 130, 165, 70);
        hf->box(FL_NO_BOX);
        hf->color(FL_BACKGROUND_COLOR);
        hf->selection_color(FL_BACKGROUND_COLOR);
        hf->labeltype(FL_NORMAL_LABEL);
        hf->labelfont(0);
        hf->labelsize(14);
        hf->labelcolor(FL_FOREGROUND_COLOR);
        hf->align(Fl_Align(FL_ALIGN_CENTER));
        hf->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFrame_get_height(); o->drawing_w = cairo_code_draw_casFrame_get_width(); o->drawing_f = &cairo_code_draw_casFrame_render;
      } // Background* hf
      { Background* o = ef = new Background(281, 223, 165, 70);
        ef->box(FL_NO_BOX);
        ef->color(FL_BACKGROUND_COLOR);
        ef->selection_color(FL_BACKGROUND_COLOR);
        ef->labeltype(FL_NORMAL_LABEL);
        ef->labelfont(0);
        ef->labelsize(14);
        ef->labelcolor(FL_FOREGROUND_COLOR);
        ef->align(Fl_Align(FL_ALIGN_CENTER));
        ef->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFrame_get_height(); o->drawing_w = cairo_code_draw_casFrame_get_width(); o->drawing_f = &cairo_code_draw_casFrame_render;
      } // Background* ef
      { Background* o = af = new Background(281, 316, 165, 70);
        af->box(FL_NO_BOX);
        af->color(FL_BACKGROUND_COLOR);
        af->selection_color(FL_BACKGROUND_COLOR);
        af->labeltype(FL_NORMAL_LABEL);
        af->labelfont(0);
        af->labelsize(14);
        af->labelcolor(FL_FOREGROUND_COLOR);
        af->align(Fl_Align(FL_ALIGN_CENTER));
        af->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFrame_get_height(); o->drawing_w = cairo_code_draw_casFrame_get_width(); o->drawing_f = &cairo_code_draw_casFrame_render;
      } // Background* af
      { Background* o = ff = new Background(281, 411, 165, 70);
        ff->box(FL_NO_BOX);
        ff->color(FL_BACKGROUND_COLOR);
        ff->selection_color(FL_BACKGROUND_COLOR);
        ff->labeltype(FL_NORMAL_LABEL);
        ff->labelfont(0);
        ff->labelsize(14);
        ff->labelcolor(FL_FOREGROUND_COLOR);
        ff->align(Fl_Align(FL_ALIGN_CENTER));
        ff->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFrame_get_height(); o->drawing_w = cairo_code_draw_casFrame_get_width(); o->drawing_f = &cairo_code_draw_casFrame_render;
      } // Background* ff
      { Background* o = ml = new Background(26, 10, 48, 10);
        ml->box(FL_NO_BOX);
        ml->color(FL_BACKGROUND_COLOR);
        ml->selection_color(FL_BACKGROUND_COLOR);
        ml->labeltype(FL_NORMAL_LABEL);
        ml->labelfont(0);
        ml->labelsize(14);
        ml->labelcolor(FL_FOREGROUND_COLOR);
        ml->align(Fl_Align(FL_ALIGN_CENTER));
        ml->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casMasterLabel_get_height(); o->drawing_w = cairo_code_draw_casMasterLabel_get_width(); o->drawing_f = &cairo_code_draw_casMasterLabel_render;
        o->stretch = false;
      } // Background* ml
      { Background* o = cl = new Background(29, 98, 28, 10);
        cl->box(FL_NO_BOX);
        cl->color(FL_BACKGROUND_COLOR);
        cl->selection_color(FL_BACKGROUND_COLOR);
        cl->labeltype(FL_NORMAL_LABEL);
        cl->labelfont(0);
        cl->labelsize(14);
        cl->labelcolor(FL_FOREGROUND_COLOR);
        cl->align(Fl_Align(FL_ALIGN_CENTER));
        cl->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casCellLabel_get_height(); o->drawing_w = cairo_code_draw_casCellLabel_get_width(); o->drawing_f = &cairo_code_draw_casCellLabel_render;
        o->stretch = false;
      } // Background* cl
      { Background* o = ol = new Background(29, 288, 46, 12);
        ol->box(FL_NO_BOX);
        ol->color(FL_BACKGROUND_COLOR);
        ol->selection_color(FL_BACKGROUND_COLOR);
        ol->labeltype(FL_NORMAL_LABEL);
        ol->labelfont(0);
        ol->labelsize(14);
        ol->labelcolor(FL_FOREGROUND_COLOR);
        ol->align(Fl_Align(FL_ALIGN_CENTER));
        ol->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casOutputLabel_get_height(); o->drawing_w = cairo_code_draw_casOutputLabel_get_width(); o->drawing_f = &cairo_code_draw_casOutputLabel_render;
        o->stretch = false;
      } // Background* ol
      { Background* o = pl = new Background(131, 10, 69, 10);
        pl->box(FL_NO_BOX);
        pl->color(FL_BACKGROUND_COLOR);
        pl->selection_color(FL_BACKGROUND_COLOR);
        pl->labeltype(FL_NORMAL_LABEL);
        pl->labelfont(0);
        pl->labelsize(14);
        pl->labelcolor(FL_FOREGROUND_COLOR);
        pl->align(Fl_Align(FL_ALIGN_CENTER));
        pl->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casParameterLabel_get_height(); o->drawing_w = cairo_code_draw_casParameterLabel_get_width(); o->drawing_f = &cairo_code_draw_casParameterLabel_render;
        o->stretch = false;
      } // Background* pl
      { Background* o = vl = new Background(131, 56, 33, 10);
        vl->box(FL_NO_BOX);
        vl->color(FL_BACKGROUND_COLOR);
        vl->selection_color(FL_BACKGROUND_COLOR);
        vl->labeltype(FL_NORMAL_LABEL);
        vl->labelfont(0);
        vl->labelsize(14);
        vl->labelcolor(FL_FOREGROUND_COLOR);
        vl->align(Fl_Align(FL_ALIGN_CENTER));
        vl->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casValueLabel_get_height(); o->drawing_w = cairo_code_draw_casValueLabel_get_width(); o->drawing_f = &cairo_code_draw_casValueLabel_render;
        o->stretch = false;
      } // Background* vl
      { Background* o = el = new Background(293, 210, 57, 12);
        el->box(FL_NO_BOX);
        el->color(FL_BACKGROUND_COLOR);
        el->selection_color(FL_BACKGROUND_COLOR);
        el->labeltype(FL_NORMAL_LABEL);
        el->labelfont(0);
        el->labelsize(14);
        el->labelcolor(FL_FOREGROUND_COLOR);
        el->align(Fl_Align(FL_ALIGN_CENTER));
        el->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casEnvelopeLabel_get_height(); o->drawing_w = cairo_code_draw_casEnvelopeLabel_get_width(); o->drawing_f = &cairo_code_draw_casEnvelopeLabel_render;
        o->stretch = false;
      } // Background* el
      { Background* o = hl = new Background(293, 119, 66, 10);
        hl->box(FL_NO_BOX);
        hl->color(FL_BACKGROUND_COLOR);
        hl->selection_color(FL_BACKGROUND_COLOR);
        hl->labeltype(FL_NORMAL_LABEL);
        hl->labelfont(0);
        hl->labelsize(14);
        hl->labelcolor(FL_FOREGROUND_COLOR);
        hl->align(Fl_Align(FL_ALIGN_CENTER));
        hl->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casHarmonicsLabel_get_height(); o->drawing_w = cairo_code_draw_casHarmonicsLabel_get_width(); o->drawing_f = &cairo_code_draw_casHarmonicsLabel_render;
        o->stretch = false;
      } // Background* hl
      { Background* o = al = new Background(293, 303, 138, 12);
        al->box(FL_NO_BOX);
        al->color(FL_BACKGROUND_COLOR);
        al->selection_color(FL_BACKGROUND_COLOR);
        al->labeltype(FL_NORMAL_LABEL);
        al->labelfont(0);
        al->labelsize(14);
        al->labelcolor(FL_FOREGROUND_COLOR);
        al->align(Fl_Align(FL_ALIGN_CENTER));
        al->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casAMLabel_get_height(); o->drawing_w = cairo_code_draw_casAMLabel_get_width(); o->drawing_f = &cairo_code_draw_casAMLabel_render;
        o->stretch = false;
      } // Background* al
      { Background* o = fl = new Background(293, 399, 145, 12);
        fl->box(FL_NO_BOX);
        fl->color(FL_BACKGROUND_COLOR);
        fl->selection_color(FL_BACKGROUND_COLOR);
        fl->labeltype(FL_NORMAL_LABEL);
        fl->labelfont(0);
        fl->labelsize(14);
        fl->labelcolor(FL_FOREGROUND_COLOR);
        fl->align(Fl_Align(FL_ALIGN_CENTER));
        fl->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFMLabel_get_height(); o->drawing_w = cairo_code_draw_casFMLabel_get_width(); o->drawing_f = &cairo_code_draw_casFMLabel_render;
        o->stretch = false;
      } // Background* fl
      { Background* o = chanL = new Background(44, 31, 15, 10);
        chanL->box(FL_NO_BOX);
        chanL->color(FL_BACKGROUND_COLOR);
        chanL->selection_color(FL_BACKGROUND_COLOR);
        chanL->labeltype(FL_NORMAL_LABEL);
        chanL->labelfont(0);
        chanL->labelsize(14);
        chanL->labelcolor(FL_FOREGROUND_COLOR);
        chanL->align(Fl_Align(FL_ALIGN_CENTER));
        chanL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casChLabel_get_height(); o->drawing_w = cairo_code_draw_casChLabel_get_width(); o->drawing_f = &cairo_code_draw_casChLabel_render;
        o->stretch = false;
      } // Background* chanL
      { Background* o = gainL = new Background(70, 65, 7, 10);
        gainL->box(FL_NO_BOX);
        gainL->color(FL_BACKGROUND_COLOR);
        gainL->selection_color(FL_BACKGROUND_COLOR);
        gainL->labeltype(FL_NORMAL_LABEL);
        gainL->labelfont(0);
        gainL->labelsize(14);
        gainL->labelcolor(FL_FOREGROUND_COLOR);
        gainL->align(Fl_Align(FL_ALIGN_CENTER));
        gainL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casGLabel_get_height(); o->drawing_w = cairo_code_draw_casGLabel_get_width(); o->drawing_f = &cairo_code_draw_casGLabel_render;
        o->stretch = false;
      } // Background* gainL
      { Background* o = cwavL = new Background(23, 114, 83, 62);
        cwavL->box(FL_NO_BOX);
        cwavL->color(FL_BACKGROUND_COLOR);
        cwavL->selection_color(FL_BACKGROUND_COLOR);
        cwavL->labeltype(FL_NORMAL_LABEL);
        cwavL->labelfont(0);
        cwavL->labelsize(14);
        cwavL->labelcolor(FL_FOREGROUND_COLOR);
        cwavL->align(Fl_Align(FL_ALIGN_CENTER));
        cwavL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casWaveLabel_get_height(); o->drawing_w = cairo_code_draw_casWaveLabel_get_width(); o->drawing_f = &cairo_code_draw_casWaveLabel_render;
        o->stretch = false;
      } // Background* cwavL
      { Background* o = lenL = new Background(39, 199, 7, 10);
        lenL->box(FL_NO_BOX);
        lenL->color(FL_BACKGROUND_COLOR);
        lenL->selection_color(FL_BACKGROUND_COLOR);
        lenL->labeltype(FL_NORMAL_LABEL);
        lenL->labelfont(0);
        lenL->labelsize(14);
        lenL->labelcolor(FL_FOREGROUND_COLOR);
        lenL->align(Fl_Align(FL_ALIGN_CENTER));
        lenL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casLLabel_get_height(); o->drawing_w = cairo_code_draw_casLLabel_get_width(); o->drawing_f = &cairo_code_draw_casLLabel_render;
        o->stretch = false;
      } // Background* lenL
      { Background* o = ruL = new Background(18, 233, 247, 9);
        ruL->box(FL_NO_BOX);
        ruL->color(FL_BACKGROUND_COLOR);
        ruL->selection_color(FL_BACKGROUND_COLOR);
        ruL->labeltype(FL_NORMAL_LABEL);
        ruL->labelfont(0);
        ruL->labelsize(14);
        ruL->labelcolor(FL_FOREGROUND_COLOR);
        ruL->align(Fl_Align(FL_ALIGN_CENTER));
        ruL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casRuleLabel_get_height(); o->drawing_w = cairo_code_draw_casRuleLabel_get_width(); o->drawing_f = &cairo_code_draw_casRuleLabel_render;
        o->stretch = false;
      } // Background* ruL
      { Background* o = hwavL = new Background(293, 138, 68, 55);
        hwavL->box(FL_NO_BOX);
        hwavL->color(FL_BACKGROUND_COLOR);
        hwavL->selection_color(FL_BACKGROUND_COLOR);
        hwavL->labeltype(FL_NORMAL_LABEL);
        hwavL->labelfont(0);
        hwavL->labelsize(14);
        hwavL->labelcolor(FL_FOREGROUND_COLOR);
        hwavL->align(Fl_Align(FL_ALIGN_CENTER));
        hwavL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casHarmWaveLabel_get_height(); o->drawing_w = cairo_code_draw_casHarmWaveLabel_get_width(); o->drawing_f = &cairo_code_draw_casHarmWaveLabel_render;
        o->stretch = false;
      } // Background* hwavL
      { Background* o = nharmL = new Background(412, 142, 7, 10);
        nharmL->box(FL_NO_BOX);
        nharmL->color(FL_BACKGROUND_COLOR);
        nharmL->selection_color(FL_BACKGROUND_COLOR);
        nharmL->labeltype(FL_NORMAL_LABEL);
        nharmL->labelfont(0);
        nharmL->labelsize(14);
        nharmL->labelcolor(FL_FOREGROUND_COLOR);
        nharmL->align(Fl_Align(FL_ALIGN_CENTER));
        nharmL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casNLabel_get_height(); o->drawing_w = cairo_code_draw_casNLabel_get_width(); o->drawing_f = &cairo_code_draw_casNLabel_render;
        o->stretch = false;
      } // Background* nharmL
      { Background* o = widthL = new Background(391, 177, 9, 10);
        widthL->box(FL_NO_BOX);
        widthL->color(FL_BACKGROUND_COLOR);
        widthL->selection_color(FL_BACKGROUND_COLOR);
        widthL->labeltype(FL_NORMAL_LABEL);
        widthL->labelfont(0);
        widthL->labelsize(14);
        widthL->labelcolor(FL_FOREGROUND_COLOR);
        widthL->align(Fl_Align(FL_ALIGN_CENTER));
        widthL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casWLabel_get_height(); o->drawing_w = cairo_code_draw_casWLabel_get_width(); o->drawing_f = &cairo_code_draw_casWLabel_render;
        o->stretch = false;
      } // Background* widthL
      { Background* o = aL = new Background(321, 231, 7, 10);
        aL->box(FL_NO_BOX);
        aL->color(FL_BACKGROUND_COLOR);
        aL->selection_color(FL_BACKGROUND_COLOR);
        aL->labeltype(FL_NORMAL_LABEL);
        aL->labelfont(0);
        aL->labelsize(14);
        aL->labelcolor(FL_FOREGROUND_COLOR);
        aL->align(Fl_Align(FL_ALIGN_CENTER));
        aL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casALabel_get_height(); o->drawing_w = cairo_code_draw_casALabel_get_width(); o->drawing_f = &cairo_code_draw_casALabel_render;
        o->stretch = false;
      } // Background* aL
      { Background* o = dL = new Background(370, 231, 7, 10);
        dL->box(FL_NO_BOX);
        dL->color(FL_BACKGROUND_COLOR);
        dL->selection_color(FL_BACKGROUND_COLOR);
        dL->labeltype(FL_NORMAL_LABEL);
        dL->labelfont(0);
        dL->labelsize(14);
        dL->labelcolor(FL_FOREGROUND_COLOR);
        dL->align(Fl_Align(FL_ALIGN_CENTER));
        dL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casDLabel_get_height(); o->drawing_w = cairo_code_draw_casDLabel_get_width(); o->drawing_f = &cairo_code_draw_casDLabel_render;
        o->stretch = false;
      } // Background* dL
      { Background* o = bL = new Background(420, 231, 7, 10);
        bL->box(FL_NO_BOX);
        bL->color(FL_BACKGROUND_COLOR);
        bL->selection_color(FL_BACKGROUND_COLOR);
        bL->labeltype(FL_NORMAL_LABEL);
        bL->labelfont(0);
        bL->labelsize(14);
        bL->labelcolor(FL_FOREGROUND_COLOR);
        bL->align(Fl_Align(FL_ALIGN_CENTER));
        bL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casBLabel_get_height(); o->drawing_w = cairo_code_draw_casBLabel_get_width(); o->drawing_f = &cairo_code_draw_casBLabel_render;
        o->stretch = false;
      } // Background* bL
      { Background* o = swL = new Background(301, 266, 7, 10);
        swL->box(FL_NO_BOX);
        swL->color(FL_BACKGROUND_COLOR);
        swL->selection_color(FL_BACKGROUND_COLOR);
        swL->labeltype(FL_NORMAL_LABEL);
        swL->labelfont(0);
        swL->labelsize(14);
        swL->labelcolor(FL_FOREGROUND_COLOR);
        swL->align(Fl_Align(FL_ALIGN_CENTER));
        swL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casSLabel_get_height(); o->drawing_w = cairo_code_draw_casSLabel_get_width(); o->drawing_f = &cairo_code_draw_casSLabel_render;
        o->stretch = false;
      } // Background* swL
      { Background* o = suL = new Background(350, 266, 7, 10);
        suL->box(FL_NO_BOX);
        suL->color(FL_BACKGROUND_COLOR);
        suL->selection_color(FL_BACKGROUND_COLOR);
        suL->labeltype(FL_NORMAL_LABEL);
        suL->labelfont(0);
        suL->labelsize(14);
        suL->labelcolor(FL_FOREGROUND_COLOR);
        suL->align(Fl_Align(FL_ALIGN_CENTER));
        suL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casSLabel_get_height(); o->drawing_w = cairo_code_draw_casSLabel_get_width(); o->drawing_f = &cairo_code_draw_casSLabel_render;
        o->stretch = false;
      } // Background* suL
      { Background* o = rL = new Background(400, 266, 7, 10);
        rL->box(FL_NO_BOX);
        rL->color(FL_BACKGROUND_COLOR);
        rL->selection_color(FL_BACKGROUND_COLOR);
        rL->labeltype(FL_NORMAL_LABEL);
        rL->labelfont(0);
        rL->labelsize(14);
        rL->labelcolor(FL_FOREGROUND_COLOR);
        rL->align(Fl_Align(FL_ALIGN_CENTER));
        rL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casRLabel_get_height(); o->drawing_w = cairo_code_draw_casRLabel_get_width(); o->drawing_f = &cairo_code_draw_casRLabel_render;
        o->stretch = false;
      } // Background* rL
      { Background* o = amwavL = new Background(285, 323, 83, 62);
        amwavL->box(FL_NO_BOX);
        amwavL->color(FL_BACKGROUND_COLOR);
        amwavL->selection_color(FL_BACKGROUND_COLOR);
        amwavL->labeltype(FL_NORMAL_LABEL);
        amwavL->labelfont(0);
        amwavL->labelsize(14);
        amwavL->labelcolor(FL_FOREGROUND_COLOR);
        amwavL->align(Fl_Align(FL_ALIGN_CENTER));
        amwavL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casWaveLabel_get_height(); o->drawing_w = cairo_code_draw_casWaveLabel_get_width(); o->drawing_f = &cairo_code_draw_casWaveLabel_render;
        o->stretch = false;
      } // Background* amwavL
      { Background* o = amgainL = new Background(392, 365, 7, 10);
        amgainL->box(FL_NO_BOX);
        amgainL->color(FL_BACKGROUND_COLOR);
        amgainL->selection_color(FL_BACKGROUND_COLOR);
        amgainL->labeltype(FL_NORMAL_LABEL);
        amgainL->labelfont(0);
        amgainL->labelsize(14);
        amgainL->labelcolor(FL_FOREGROUND_COLOR);
        amgainL->align(Fl_Align(FL_ALIGN_CENTER));
        amgainL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casGLabel_get_height(); o->drawing_w = cairo_code_draw_casGLabel_get_width(); o->drawing_f = &cairo_code_draw_casGLabel_render;
        o->stretch = false;
      } // Background* amgainL
      { Background* o = amfreqL = new Background(412, 330, 7, 10);
        amfreqL->box(FL_NO_BOX);
        amfreqL->color(FL_BACKGROUND_COLOR);
        amfreqL->selection_color(FL_BACKGROUND_COLOR);
        amfreqL->labeltype(FL_NORMAL_LABEL);
        amfreqL->labelfont(0);
        amfreqL->labelsize(14);
        amfreqL->labelcolor(FL_FOREGROUND_COLOR);
        amfreqL->align(Fl_Align(FL_ALIGN_CENTER));
        amfreqL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFLabel_get_height(); o->drawing_w = cairo_code_draw_casFLabel_get_width(); o->drawing_f = &cairo_code_draw_casFLabel_render;
        o->stretch = false;
      } // Background* amfreqL
      { Background* o = fmwavL = new Background(285, 418, 83, 62);
        fmwavL->box(FL_NO_BOX);
        fmwavL->color(FL_BACKGROUND_COLOR);
        fmwavL->selection_color(FL_BACKGROUND_COLOR);
        fmwavL->labeltype(FL_NORMAL_LABEL);
        fmwavL->labelfont(0);
        fmwavL->labelsize(14);
        fmwavL->labelcolor(FL_FOREGROUND_COLOR);
        fmwavL->align(Fl_Align(FL_ALIGN_CENTER));
        fmwavL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casWaveLabel_get_height(); o->drawing_w = cairo_code_draw_casWaveLabel_get_width(); o->drawing_f = &cairo_code_draw_casWaveLabel_render;
        o->stretch = false;
      } // Background* fmwavL
      { Background* o = fmgainL = new Background(392, 460, 7, 10);
        fmgainL->box(FL_NO_BOX);
        fmgainL->color(FL_BACKGROUND_COLOR);
        fmgainL->selection_color(FL_BACKGROUND_COLOR);
        fmgainL->labeltype(FL_NORMAL_LABEL);
        fmgainL->labelfont(0);
        fmgainL->labelsize(14);
        fmgainL->labelcolor(FL_FOREGROUND_COLOR);
        fmgainL->align(Fl_Align(FL_ALIGN_CENTER));
        fmgainL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casGLabel_get_height(); o->drawing_w = cairo_code_draw_casGLabel_get_width(); o->drawing_f = &cairo_code_draw_casGLabel_render;
        o->stretch = false;
      } // Background* fmgainL
      { Background* o = fmfreqL = new Background(412, 425, 7, 10);
        fmfreqL->box(FL_NO_BOX);
        fmfreqL->color(FL_BACKGROUND_COLOR);
        fmfreqL->selection_color(FL_BACKGROUND_COLOR);
        fmfreqL->labeltype(FL_NORMAL_LABEL);
        fmfreqL->labelfont(0);
        fmfreqL->labelsize(14);
        fmfreqL->labelcolor(FL_FOREGROUND_COLOR);
        fmfreqL->align(Fl_Align(FL_ALIGN_CENTER));
        fmfreqL->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_casFLabel_get_height(); o->drawing_w = cairo_code_draw_casFLabel_get_width(); o->drawing_f = &cairo_code_draw_casFLabel_render;
        o->stretch = false;
      } // Background* fmfreqL
      { Button* o = rule7 = new Button(27, 247, 13, 13);
        rule7->tooltip("rule, bit 7");
        rule7->box(FL_UP_BOX);
        rule7->color(FL_BACKGROUND_COLOR);
        rule7->selection_color(FL_BACKGROUND_COLOR);
        rule7->labeltype(FL_NORMAL_LABEL);
        rule7->labelfont(0);
        rule7->labelsize(14);
        rule7->labelcolor(FL_FOREGROUND_COLOR);
        rule7->callback((Fl_Callback*)cb_rule7);
        rule7->align(Fl_Align(FL_ALIGN_CENTER));
        rule7->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule7
      { Button* o = rule6 = new Button(59, 247, 13, 13);
        rule6->tooltip("rule, bit 6");
        rule6->box(FL_UP_BOX);
        rule6->color(FL_BACKGROUND_COLOR);
        rule6->selection_color(FL_BACKGROUND_COLOR);
        rule6->labeltype(FL_NORMAL_LABEL);
        rule6->labelfont(0);
        rule6->labelsize(14);
        rule6->labelcolor(FL_FOREGROUND_COLOR);
        rule6->callback((Fl_Callback*)cb_rule6);
        rule6->align(Fl_Align(FL_ALIGN_CENTER));
        rule6->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule6
      { Button* o = rule5 = new Button(90, 247, 13, 13);
        rule5->tooltip("rule, bit 5");
        rule5->box(FL_UP_BOX);
        rule5->color(FL_BACKGROUND_COLOR);
        rule5->selection_color(FL_BACKGROUND_COLOR);
        rule5->labeltype(FL_NORMAL_LABEL);
        rule5->labelfont(0);
        rule5->labelsize(14);
        rule5->labelcolor(FL_FOREGROUND_COLOR);
        rule5->callback((Fl_Callback*)cb_rule5);
        rule5->align(Fl_Align(FL_ALIGN_CENTER));
        rule5->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule5
      { Button* o = rule4 = new Button(120, 247, 13, 13);
        rule4->tooltip("rule, bit 4");
        rule4->box(FL_UP_BOX);
        rule4->value(1);
        rule4->color(FL_BACKGROUND_COLOR);
        rule4->selection_color(FL_BACKGROUND_COLOR);
        rule4->labeltype(FL_NORMAL_LABEL);
        rule4->labelfont(0);
        rule4->labelsize(14);
        rule4->labelcolor(FL_FOREGROUND_COLOR);
        rule4->callback((Fl_Callback*)cb_rule4);
        rule4->align(Fl_Align(FL_ALIGN_CENTER));
        rule4->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule4
      { Button* o = rule3 = new Button(151, 247, 13, 13);
        rule3->tooltip("rule, bit 3");
        rule3->box(FL_UP_BOX);
        rule3->value(1);
        rule3->color(FL_BACKGROUND_COLOR);
        rule3->selection_color(FL_BACKGROUND_COLOR);
        rule3->labeltype(FL_NORMAL_LABEL);
        rule3->labelfont(0);
        rule3->labelsize(14);
        rule3->labelcolor(FL_FOREGROUND_COLOR);
        rule3->callback((Fl_Callback*)cb_rule3);
        rule3->align(Fl_Align(FL_ALIGN_CENTER));
        rule3->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule3
      { Button* o = rule2 = new Button(181, 247, 13, 13);
        rule2->tooltip("rule, bit 2");
        rule2->box(FL_UP_BOX);
        rule2->value(1);
        rule2->color(FL_BACKGROUND_COLOR);
        rule2->selection_color(FL_BACKGROUND_COLOR);
        rule2->labeltype(FL_NORMAL_LABEL);
        rule2->labelfont(0);
        rule2->labelsize(14);
        rule2->labelcolor(FL_FOREGROUND_COLOR);
        rule2->callback((Fl_Callback*)cb_rule2);
        rule2->align(Fl_Align(FL_ALIGN_CENTER));
        rule2->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule2
      { Button* o = rule1 = new Button(212, 247, 13, 13);
        rule1->tooltip("rule, bit 1");
        rule1->box(FL_UP_BOX);
        rule1->value(1);
        rule1->color(FL_BACKGROUND_COLOR);
        rule1->selection_color(FL_BACKGROUND_COLOR);
        rule1->labeltype(FL_NORMAL_LABEL);
        rule1->labelfont(0);
        rule1->labelsize(14);
        rule1->labelcolor(FL_FOREGROUND_COLOR);
        rule1->callback((Fl_Callback*)cb_rule1);
        rule1->align(Fl_Align(FL_ALIGN_CENTER));
        rule1->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule1
      { Button* o = rule0 = new Button(243, 247, 13, 13);
        rule0->tooltip("rule, bit 0");
        rule0->box(FL_UP_BOX);
        rule0->color(FL_BACKGROUND_COLOR);
        rule0->selection_color(FL_BACKGROUND_COLOR);
        rule0->labeltype(FL_NORMAL_LABEL);
        rule0->labelfont(0);
        rule0->labelsize(14);
        rule0->labelcolor(FL_FOREGROUND_COLOR);
        rule0->callback((Fl_Callback*)cb_rule0);
        rule0->align(Fl_Align(FL_ALIGN_CENTER));
        rule0->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* rule0
      { Button* o = init15 = new Button(26, 268, 13, 13);
        init15->tooltip("initial condition, bit 15");
        init15->box(FL_UP_BOX);
        init15->color(FL_BACKGROUND_COLOR);
        init15->selection_color(FL_BACKGROUND_COLOR);
        init15->labeltype(FL_NORMAL_LABEL);
        init15->labelfont(0);
        init15->labelsize(14);
        init15->labelcolor(FL_FOREGROUND_COLOR);
        init15->callback((Fl_Callback*)cb_init15);
        init15->align(Fl_Align(FL_ALIGN_CENTER));
        init15->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init15
      { Button* o = init14 = new Button(41, 268, 13, 13);
        init14->tooltip("initial condition, bit 14");
        init14->box(FL_UP_BOX);
        init14->color(FL_BACKGROUND_COLOR);
        init14->selection_color(FL_BACKGROUND_COLOR);
        init14->labeltype(FL_NORMAL_LABEL);
        init14->labelfont(0);
        init14->labelsize(14);
        init14->labelcolor(FL_FOREGROUND_COLOR);
        init14->callback((Fl_Callback*)cb_init14);
        init14->align(Fl_Align(FL_ALIGN_CENTER));
        init14->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init14
      { Button* o = init13 = new Button(56, 268, 13, 13);
        init13->tooltip("initial condition, bit 13");
        init13->box(FL_UP_BOX);
        init13->color(FL_BACKGROUND_COLOR);
        init13->selection_color(FL_BACKGROUND_COLOR);
        init13->labeltype(FL_NORMAL_LABEL);
        init13->labelfont(0);
        init13->labelsize(14);
        init13->labelcolor(FL_FOREGROUND_COLOR);
        init13->callback((Fl_Callback*)cb_init13);
        init13->align(Fl_Align(FL_ALIGN_CENTER));
        init13->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init13
      { Button* o = init12 = new Button(70, 268, 13, 13);
        init12->tooltip("initial condition, bit 12");
        init12->box(FL_UP_BOX);
        init12->color(FL_BACKGROUND_COLOR);
        init12->selection_color(FL_BACKGROUND_COLOR);
        init12->labeltype(FL_NORMAL_LABEL);
        init12->labelfont(0);
        init12->labelsize(14);
        init12->labelcolor(FL_FOREGROUND_COLOR);
        init12->callback((Fl_Callback*)cb_init12);
        init12->align(Fl_Align(FL_ALIGN_CENTER));
        init12->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init12
      { Button* o = init11 = new Button(85, 268, 13, 13);
        init11->tooltip("initial condition, bit 11");
        init11->box(FL_UP_BOX);
        init11->color(FL_BACKGROUND_COLOR);
        init11->selection_color(FL_BACKGROUND_COLOR);
        init11->labeltype(FL_NORMAL_LABEL);
        init11->labelfont(0);
        init11->labelsize(14);
        init11->labelcolor(FL_FOREGROUND_COLOR);
        init11->callback((Fl_Callback*)cb_init11);
        init11->align(Fl_Align(FL_ALIGN_CENTER));
        init11->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init11
      { Button* o = init10 = new Button(99, 268, 13, 13);
        init10->tooltip("initial condition, bit 10");
        init10->box(FL_UP_BOX);
        init10->color(FL_BACKGROUND_COLOR);
        init10->selection_color(FL_BACKGROUND_COLOR);
        init10->labeltype(FL_NORMAL_LABEL);
        init10->labelfont(0);
        init10->labelsize(14);
        init10->labelcolor(FL_FOREGROUND_COLOR);
        init10->callback((Fl_Callback*)cb_init10);
        init10->align(Fl_Align(FL_ALIGN_CENTER));
        init10->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init10
      { Button* o = init9 = new Button(114, 268, 13, 13);
        init9->tooltip("initial condition, bit 9");
        init9->box(FL_UP_BOX);
        init9->color(FL_BACKGROUND_COLOR);
        init9->selection_color(FL_BACKGROUND_COLOR);
        init9->labeltype(FL_NORMAL_LABEL);
        init9->labelfont(0);
        init9->labelsize(14);
        init9->labelcolor(FL_FOREGROUND_COLOR);
        init9->callback((Fl_Callback*)cb_init9);
        init9->align(Fl_Align(FL_ALIGN_CENTER));
        init9->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init9
      { Button* o = init8 = new Button(129, 268, 13, 13);
        init8->tooltip("initial condition, bit 8");
        init8->box(FL_UP_BOX);
        init8->color(FL_BACKGROUND_COLOR);
        init8->selection_color(FL_BACKGROUND_COLOR);
        init8->labeltype(FL_NORMAL_LABEL);
        init8->labelfont(0);
        init8->labelsize(14);
        init8->labelcolor(FL_FOREGROUND_COLOR);
        init8->callback((Fl_Callback*)cb_init8);
        init8->align(Fl_Align(FL_ALIGN_CENTER));
        init8->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init8
      { Button* o = init7 = new Button(143, 268, 13, 13);
        init7->tooltip("initial condition, bit 7");
        init7->box(FL_UP_BOX);
        init7->color(FL_BACKGROUND_COLOR);
        init7->selection_color(FL_BACKGROUND_COLOR);
        init7->labeltype(FL_NORMAL_LABEL);
        init7->labelfont(0);
        init7->labelsize(14);
        init7->labelcolor(FL_FOREGROUND_COLOR);
        init7->callback((Fl_Callback*)cb_init7);
        init7->align(Fl_Align(FL_ALIGN_CENTER));
        init7->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init7
      { Button* o = init6 = new Button(158, 268, 13, 13);
        init6->tooltip("initial condition, bit 6");
        init6->box(FL_UP_BOX);
        init6->color(FL_BACKGROUND_COLOR);
        init6->selection_color(FL_BACKGROUND_COLOR);
        init6->labeltype(FL_NORMAL_LABEL);
        init6->labelfont(0);
        init6->labelsize(14);
        init6->labelcolor(FL_FOREGROUND_COLOR);
        init6->callback((Fl_Callback*)cb_init6);
        init6->align(Fl_Align(FL_ALIGN_CENTER));
        init6->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init6
      { Button* o = init5 = new Button(172, 268, 13, 13);
        init5->tooltip("initial condition, bit 5");
        init5->box(FL_UP_BOX);
        init5->color(FL_BACKGROUND_COLOR);
        init5->selection_color(FL_BACKGROUND_COLOR);
        init5->labeltype(FL_NORMAL_LABEL);
        init5->labelfont(0);
        init5->labelsize(14);
        init5->labelcolor(FL_FOREGROUND_COLOR);
        init5->callback((Fl_Callback*)cb_init5);
        init5->align(Fl_Align(FL_ALIGN_CENTER));
        init5->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init5
      { Button* o = init4 = new Button(187, 268, 13, 13);
        init4->tooltip("initial condition, bit 4");
        init4->box(FL_UP_BOX);
        init4->color(FL_BACKGROUND_COLOR);
        init4->selection_color(FL_BACKGROUND_COLOR);
        init4->labeltype(FL_NORMAL_LABEL);
        init4->labelfont(0);
        init4->labelsize(14);
        init4->labelcolor(FL_FOREGROUND_COLOR);
        init4->callback((Fl_Callback*)cb_init4);
        init4->align(Fl_Align(FL_ALIGN_CENTER));
        init4->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init4
      { Button* o = init3 = new Button(202, 268, 13, 13);
        init3->tooltip("initial condition, bit 3");
        init3->box(FL_UP_BOX);
        init3->color(FL_BACKGROUND_COLOR);
        init3->selection_color(FL_BACKGROUND_COLOR);
        init3->labeltype(FL_NORMAL_LABEL);
        init3->labelfont(0);
        init3->labelsize(14);
        init3->labelcolor(FL_FOREGROUND_COLOR);
        init3->callback((Fl_Callback*)cb_init3);
        init3->align(Fl_Align(FL_ALIGN_CENTER));
        init3->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init3
      { Button* o = init2 = new Button(216, 268, 13, 13);
        init2->tooltip("initial condition, bit 2");
        init2->box(FL_UP_BOX);
        init2->color(FL_BACKGROUND_COLOR);
        init2->selection_color(FL_BACKGROUND_COLOR);
        init2->labeltype(FL_NORMAL_LABEL);
        init2->labelfont(0);
        init2->labelsize(14);
        init2->labelcolor(FL_FOREGROUND_COLOR);
        init2->callback((Fl_Callback*)cb_init2);
        init2->align(Fl_Align(FL_ALIGN_CENTER));
        init2->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init2
      { Button* o = init1 = new Button(231, 268, 13, 13);
        init1->tooltip("initial condition, bit 1");
        init1->box(FL_UP_BOX);
        init1->color(FL_BACKGROUND_COLOR);
        init1->selection_color(FL_BACKGROUND_COLOR);
        init1->labeltype(FL_NORMAL_LABEL);
        init1->labelfont(0);
        init1->labelsize(14);
        init1->labelcolor(FL_FOREGROUND_COLOR);
        init1->callback((Fl_Callback*)cb_init1);
        init1->align(Fl_Align(FL_ALIGN_CENTER));
        init1->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init1
      { Button* o = init0 = new Button(246, 268, 13, 13);
        init0->tooltip("initial condition, bit 0");
        init0->box(FL_UP_BOX);
        init0->value(1);
        init0->color(FL_BACKGROUND_COLOR);
        init0->selection_color(FL_BACKGROUND_COLOR);
        init0->labeltype(FL_NORMAL_LABEL);
        init0->labelfont(0);
        init0->labelsize(14);
        init0->labelcolor(FL_FOREGROUND_COLOR);
        init0->callback((Fl_Callback*)cb_init0);
        init0->align(Fl_Align(FL_ALIGN_CENTER));
        init0->when(FL_WHEN_RELEASE);
        o->type(FL_TOGGLE_BUTTON);
        o->drawing_h = cairo_code_draw_tinyButton_get_height(); o->drawing_w = cairo_code_draw_tinyButton_get_width(); o->drawing_f = &cairo_code_draw_tinyButton_render;
      } // Button* init0
      { Button* o = hal = new Button(157, 115, 82, 82);
        hal->tooltip("HAL 9000");
        hal->box(FL_UP_BOX);
        hal->color(FL_BACKGROUND_COLOR);
        hal->selection_color(FL_BACKGROUND_COLOR);
        hal->labeltype(FL_NORMAL_LABEL);
        hal->labelfont(0);
        hal->labelsize(14);
        hal->labelcolor(FL_FOREGROUND_COLOR);
        hal->callback((Fl_Callback*)cb_hal);
        hal->align(Fl_Align(FL_ALIGN_CENTER));
        hal->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_hal_get_height(); o->drawing_w = cairo_code_draw_hal_get_width(); o->drawing_f = &cairo_code_draw_hal_render;
      } // Button* hal
      { CellGrid* o = cellgrid = new CellGrid(29, 305, 228, 286);
        cellgrid->tooltip("cell progression preview");
        cellgrid->box(FL_NO_BOX);
        cellgrid->color(FL_BACKGROUND_COLOR);
        cellgrid->selection_color(FL_BACKGROUND_COLOR);
        cellgrid->labeltype(FL_NORMAL_LABEL);
        cellgrid->labelfont(0);
        cellgrid->labelsize(14);
        cellgrid->labelcolor(FL_FOREGROUND_COLOR);
        cellgrid->align(Fl_Align(FL_ALIGN_CENTER));
        cellgrid->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_LED_get_height(); o->drawing_w = cairo_code_draw_LED_get_width();o->drawing_f = cairo_code_draw_redLED_render;
      } // CellGrid* cellgrid
      { Dial* o = channel = new Dial(61, 27, 30, 30);
        channel->tooltip("MIDI channel");
        channel->box(FL_NO_BOX);
        channel->color(FL_BACKGROUND_COLOR);
        channel->selection_color(FL_INACTIVE_COLOR);
        channel->labeltype(FL_NORMAL_LABEL);
        channel->labelfont(0);
        channel->labelsize(14);
        channel->labelcolor(FL_FOREGROUND_COLOR);
        channel->maximum(16);
        channel->step(0.5);
        channel->callback((Fl_Callback*)cb_channel);
        channel->align(Fl_Align(FL_ALIGN_BOTTOM));
        channel->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false; o->lock2int = true;
      } // Dial* channel
      { Dial* o = mastergain = new Dial(37, 52, 30, 30);
        mastergain->tooltip("gain");
        mastergain->box(FL_NO_BOX);
        mastergain->color(FL_BACKGROUND_COLOR);
        mastergain->selection_color(FL_INACTIVE_COLOR);
        mastergain->labeltype(FL_NORMAL_LABEL);
        mastergain->labelfont(0);
        mastergain->labelsize(14);
        mastergain->labelcolor(FL_FOREGROUND_COLOR);
        mastergain->maximum(2);
        mastergain->step(0.02);
        mastergain->value(1);
        mastergain->callback((Fl_Callback*)cb_mastergain);
        mastergain->align(Fl_Align(FL_ALIGN_BOTTOM));
        mastergain->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* mastergain
      { Dial* o = cellwaveform = new Dial(49, 134, 30, 30);
        cellwaveform->tooltip("waveform");
        cellwaveform->box(FL_NO_BOX);
        cellwaveform->color(FL_BACKGROUND_COLOR);
        cellwaveform->selection_color(FL_INACTIVE_COLOR);
        cellwaveform->labeltype(FL_NORMAL_LABEL);
        cellwaveform->labelfont(0);
        cellwaveform->labelsize(14);
        cellwaveform->labelcolor(FL_FOREGROUND_COLOR);
        cellwaveform->maximum(5);
        cellwaveform->step(0.1);
        cellwaveform->callback((Fl_Callback*)cb_cellwaveform);
        cellwaveform->align(Fl_Align(FL_ALIGN_BOTTOM));
        cellwaveform->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false; o->lock2int = true;
      } // Dial* cellwaveform
      { Dial* o = lifetime = new Dial(49, 185, 30, 30);
        lifetime->tooltip("time between cell transitions");
        lifetime->box(FL_NO_BOX);
        lifetime->color(FL_BACKGROUND_COLOR);
        lifetime->selection_color(FL_INACTIVE_COLOR);
        lifetime->labeltype(FL_NORMAL_LABEL);
        lifetime->labelfont(0);
        lifetime->labelsize(14);
        lifetime->labelcolor(FL_FOREGROUND_COLOR);
        lifetime->minimum(0.001);
        lifetime->maximum(10);
        lifetime->step(0.05);
        lifetime->value(0.25);
        lifetime->callback((Fl_Callback*)cb_lifetime);
        lifetime->align(Fl_Align(FL_ALIGN_BOTTOM));
        lifetime->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* lifetime
      { Dial* o = harmgain = new Dial(311, 152, 30, 30);
        harmgain->tooltip("gain of harmonics");
        harmgain->box(FL_NO_BOX);
        harmgain->color(FL_BACKGROUND_COLOR);
        harmgain->selection_color(FL_INACTIVE_COLOR);
        harmgain->labeltype(FL_NORMAL_LABEL);
        harmgain->labelfont(0);
        harmgain->labelsize(14);
        harmgain->labelcolor(FL_FOREGROUND_COLOR);
        harmgain->maximum(3);
        harmgain->step(0.08);
        harmgain->value(1);
        harmgain->callback((Fl_Callback*)cb_harmgain);
        harmgain->align(Fl_Align(FL_ALIGN_BOTTOM));
        harmgain->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false; o->lock2int = true;
      } // Dial* harmgain
      { Dial* o = nharmonics = new Dial(378, 138, 30, 30);
        nharmonics->tooltip("num. of harmonics");
        nharmonics->box(FL_NO_BOX);
        nharmonics->color(FL_BACKGROUND_COLOR);
        nharmonics->selection_color(FL_INACTIVE_COLOR);
        nharmonics->labeltype(FL_NORMAL_LABEL);
        nharmonics->labelfont(0);
        nharmonics->labelsize(14);
        nharmonics->labelcolor(FL_FOREGROUND_COLOR);
        nharmonics->maximum(16);
        nharmonics->step(0.1);
        nharmonics->value(12);
        nharmonics->callback((Fl_Callback*)cb_nharmonics);
        nharmonics->align(Fl_Align(FL_ALIGN_BOTTOM));
        nharmonics->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false; o->lock2int = true;
      } // Dial* nharmonics
      { Dial* o = harmwidth = new Dial(403, 163, 30, 30);
        harmwidth->tooltip("width/detune");
        harmwidth->box(FL_NO_BOX);
        harmwidth->color(FL_BACKGROUND_COLOR);
        harmwidth->selection_color(FL_INACTIVE_COLOR);
        harmwidth->labeltype(FL_NORMAL_LABEL);
        harmwidth->labelfont(0);
        harmwidth->labelsize(14);
        harmwidth->labelcolor(FL_FOREGROUND_COLOR);
        harmwidth->maximum(50);
        harmwidth->step(0.1);
        harmwidth->callback((Fl_Callback*)cb_harmwidth);
        harmwidth->align(Fl_Align(FL_ALIGN_BOTTOM));
        harmwidth->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* harmwidth
      { Dial* o = a = new Dial(286, 227, 30, 30);
        a->tooltip("attack");
        a->box(FL_NO_BOX);
        a->color(FL_BACKGROUND_COLOR);
        a->selection_color(FL_INACTIVE_COLOR);
        a->labeltype(FL_NORMAL_LABEL);
        a->labelfont(0);
        a->labelsize(14);
        a->labelcolor(FL_FOREGROUND_COLOR);
        a->minimum(0.001);
        a->maximum(15);
        a->step(0.1);
        a->value(0.1);
        a->callback((Fl_Callback*)cb_a);
        a->align(Fl_Align(FL_ALIGN_BOTTOM));
        a->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* a
      { Dial* o = d = new Dial(336, 227, 30, 30);
        d->tooltip("decay");
        d->box(FL_NO_BOX);
        d->color(FL_BACKGROUND_COLOR);
        d->selection_color(FL_INACTIVE_COLOR);
        d->labeltype(FL_NORMAL_LABEL);
        d->labelfont(0);
        d->labelsize(14);
        d->labelcolor(FL_FOREGROUND_COLOR);
        d->minimum(0.001);
        d->maximum(15);
        d->step(0.1);
        d->value(0.1);
        d->callback((Fl_Callback*)cb_d);
        d->align(Fl_Align(FL_ALIGN_BOTTOM));
        d->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* d
      { Dial* o = b = new Dial(386, 227, 30, 30);
        b->tooltip("break point");
        b->box(FL_NO_BOX);
        b->color(FL_BACKGROUND_COLOR);
        b->selection_color(FL_INACTIVE_COLOR);
        b->labeltype(FL_NORMAL_LABEL);
        b->labelfont(0);
        b->labelsize(14);
        b->labelcolor(FL_FOREGROUND_COLOR);
        b->step(0.01);
        b->value(0.5);
        b->callback((Fl_Callback*)cb_b);
        b->align(Fl_Align(FL_ALIGN_BOTTOM));
        b->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* b
      { Dial* o = sw = new Dial(311, 252, 30, 30);
        sw->tooltip("swell");
        sw->box(FL_NO_BOX);
        sw->color(FL_BACKGROUND_COLOR);
        sw->selection_color(FL_INACTIVE_COLOR);
        sw->labeltype(FL_NORMAL_LABEL);
        sw->labelfont(0);
        sw->labelsize(14);
        sw->labelcolor(FL_FOREGROUND_COLOR);
        sw->minimum(0.001);
        sw->maximum(15);
        sw->step(0.1);
        sw->value(3);
        sw->callback((Fl_Callback*)cb_sw);
        sw->align(Fl_Align(FL_ALIGN_BOTTOM));
        sw->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* sw
      { Dial* o = su = new Dial(361, 252, 30, 30);
        su->tooltip("sustain");
        su->box(FL_NO_BOX);
        su->color(FL_BACKGROUND_COLOR);
        su->selection_color(FL_INACTIVE_COLOR);
        su->labeltype(FL_NORMAL_LABEL);
        su->labelfont(0);
        su->labelsize(14);
        su->labelcolor(FL_FOREGROUND_COLOR);
        su->step(0.01);
        su->value(0.75);
        su->callback((Fl_Callback*)cb_su);
        su->align(Fl_Align(FL_ALIGN_BOTTOM));
        su->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* su
      { Dial* o = r = new Dial(411, 252, 30, 30);
        r->tooltip("release");
        r->box(FL_NO_BOX);
        r->color(FL_BACKGROUND_COLOR);
        r->selection_color(FL_INACTIVE_COLOR);
        r->labeltype(FL_NORMAL_LABEL);
        r->labelfont(0);
        r->labelsize(14);
        r->labelcolor(FL_FOREGROUND_COLOR);
        r->minimum(0.001);
        r->maximum(15);
        r->step(0.1);
        r->value(0.1);
        r->callback((Fl_Callback*)cb_r);
        r->align(Fl_Align(FL_ALIGN_BOTTOM));
        r->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* r
      { Dial* o = amwave = new Dial(312, 343, 30, 30);
        amwave->tooltip("waveform");
        amwave->box(FL_NO_BOX);
        amwave->color(FL_BACKGROUND_COLOR);
        amwave->selection_color(FL_INACTIVE_COLOR);
        amwave->labeltype(FL_NORMAL_LABEL);
        amwave->labelfont(0);
        amwave->labelsize(14);
        amwave->labelcolor(FL_FOREGROUND_COLOR);
        amwave->maximum(5);
        amwave->step(0.1);
        amwave->callback((Fl_Callback*)cb_amwave);
        amwave->align(Fl_Align(FL_ALIGN_BOTTOM));
        amwave->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false; o->lock2int = true;
      } // Dial* amwave
      { Dial* o = amfreq = new Dial(378, 326, 30, 30);
        amfreq->tooltip("frequency");
        amfreq->box(FL_NO_BOX);
        amfreq->color(FL_BACKGROUND_COLOR);
        amfreq->selection_color(FL_INACTIVE_COLOR);
        amfreq->labeltype(FL_NORMAL_LABEL);
        amfreq->labelfont(0);
        amfreq->labelsize(14);
        amfreq->labelcolor(FL_FOREGROUND_COLOR);
        amfreq->maximum(110);
        amfreq->step(0.5);
        amfreq->callback((Fl_Callback*)cb_amfreq);
        amfreq->align(Fl_Align(FL_ALIGN_BOTTOM));
        amfreq->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* amfreq
      { Dial* o = amgain = new Dial(403, 350, 30, 30);
        amgain->tooltip("gain");
        amgain->box(FL_NO_BOX);
        amgain->color(FL_BACKGROUND_COLOR);
        amgain->selection_color(FL_INACTIVE_COLOR);
        amgain->labeltype(FL_NORMAL_LABEL);
        amgain->labelfont(0);
        amgain->labelsize(14);
        amgain->labelcolor(FL_FOREGROUND_COLOR);
        amgain->minimum(-1);
        amgain->step(0.01);
        amgain->callback((Fl_Callback*)cb_amgain);
        amgain->align(Fl_Align(FL_ALIGN_BOTTOM));
        amgain->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* amgain
      { Dial* o = fmwave = new Dial(312, 439, 30, 30);
        fmwave->tooltip("waveform");
        fmwave->box(FL_NO_BOX);
        fmwave->color(FL_BACKGROUND_COLOR);
        fmwave->selection_color(FL_INACTIVE_COLOR);
        fmwave->labeltype(FL_NORMAL_LABEL);
        fmwave->labelfont(0);
        fmwave->labelsize(14);
        fmwave->labelcolor(FL_FOREGROUND_COLOR);
        fmwave->maximum(5);
        fmwave->step(0.1);
        fmwave->callback((Fl_Callback*)cb_fmwave);
        fmwave->align(Fl_Align(FL_ALIGN_BOTTOM));
        fmwave->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false; o->lock2int = true;
      } // Dial* fmwave
      { Dial* o = fmfreq = new Dial(378, 422, 30, 30);
        fmfreq->tooltip("frequency");
        fmfreq->box(FL_NO_BOX);
        fmfreq->color(FL_BACKGROUND_COLOR);
        fmfreq->selection_color(FL_INACTIVE_COLOR);
        fmfreq->labeltype(FL_NORMAL_LABEL);
        fmfreq->labelfont(0);
        fmfreq->labelsize(14);
        fmfreq->labelcolor(FL_FOREGROUND_COLOR);
        fmfreq->maximum(110);
        fmfreq->step(0.5);
        fmfreq->callback((Fl_Callback*)cb_fmfreq);
        fmfreq->align(Fl_Align(FL_ALIGN_BOTTOM));
        fmfreq->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* fmfreq
      { Dial* o = fmgain = new Dial(403, 446, 30, 30);
        fmgain->tooltip("gain");
        fmgain->box(FL_NO_BOX);
        fmgain->color(FL_BACKGROUND_COLOR);
        fmgain->selection_color(FL_INACTIVE_COLOR);
        fmgain->labeltype(FL_NORMAL_LABEL);
        fmgain->labelfont(0);
        fmgain->labelsize(14);
        fmgain->labelcolor(FL_FOREGROUND_COLOR);
        fmgain->minimum(-4);
        fmgain->maximum(4);
        fmgain->step(0.05);
        fmgain->callback((Fl_Callback*)cb_fmgain);
        fmgain->align(Fl_Align(FL_ALIGN_BOTTOM));
        fmgain->when(FL_WHEN_CHANGED);
        o->drawing_h = cairo_code_draw_flatDial_get_height(); o->drawing_w = cairo_code_draw_flatDial_get_width(); o->drawing_f = &cairo_code_draw_flatDial_render;
        o->drawLabel=false;
      } // Dial* fmgain
      { Button* o = secret_rule = new Button(0, 243, 26, 20);
        secret_rule->tooltip("enter rule value");
        secret_rule->box(FL_UP_BOX);
        secret_rule->color(FL_BACKGROUND_COLOR);
        secret_rule->selection_color(FL_BACKGROUND_COLOR);
        secret_rule->labeltype(FL_NORMAL_LABEL);
        secret_rule->labelfont(0);
        secret_rule->labelsize(14);
        secret_rule->labelcolor(FL_FOREGROUND_COLOR);
        secret_rule->callback((Fl_Callback*)cb_secret_rule);
        secret_rule->align(Fl_Align(FL_ALIGN_CENTER));
        secret_rule->when(FL_WHEN_RELEASE);
        o->drawing_f = &draw_nothing_render;
      } // Button* secret_rule
      { Button* o = secret_initial = new Button(0, 263, 26, 20);
        secret_initial->tooltip("enter initial value");
        secret_initial->box(FL_UP_BOX);
        secret_initial->color(FL_BACKGROUND_COLOR);
        secret_initial->selection_color(FL_BACKGROUND_COLOR);
        secret_initial->labeltype(FL_NORMAL_LABEL);
        secret_initial->labelfont(0);
        secret_initial->labelsize(14);
        secret_initial->labelcolor(FL_FOREGROUND_COLOR);
        secret_initial->callback((Fl_Callback*)cb_secret_initial);
        secret_initial->align(Fl_Align(FL_ALIGN_CENTER));
        secret_initial->when(FL_WHEN_RELEASE);
        o->drawing_f = &draw_nothing_render;
      } // Button* secret_initial
      { AsciiDisplay* o = param = new AsciiDisplay(118, 22, 332, 28);
        param->tooltip("current input value");
        param->box(FL_NO_BOX);
        param->color(FL_BACKGROUND_COLOR);
        param->selection_color(FL_BACKGROUND_COLOR);
        param->labeltype(FL_NORMAL_LABEL);
        param->labelfont(0);
        param->labelsize(14);
        param->labelcolor(FL_FOREGROUND_COLOR);
        param->align(Fl_Align(FL_ALIGN_CENTER));
        param->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_16seg_get_height(); o->drawing_w = cairo_code_draw_16seg_get_width(); o->drawing_f = &cairo_code_draw_red16seg_render;
        o->nchars = 18; o->periods = false;
      } // AsciiDisplay* param
      { AsciiDisplay* o = value = new AsciiDisplay(118, 68, 332, 28);
        value->tooltip("current output value");
        value->box(FL_NO_BOX);
        value->color(FL_BACKGROUND_COLOR);
        value->selection_color(FL_BACKGROUND_COLOR);
        value->labeltype(FL_NORMAL_LABEL);
        value->labelfont(0);
        value->labelsize(14);
        value->labelcolor(FL_FOREGROUND_COLOR);
        value->align(Fl_Align(FL_ALIGN_CENTER));
        value->when(FL_WHEN_RELEASE);
        o->drawing_h = cairo_code_draw_16seg_get_height(); o->drawing_w = cairo_code_draw_16seg_get_width(); o->drawing_f = &cairo_code_draw_red16seg_render;
        o->nchars = 18; o->periods = false;
      } // AsciiDisplay* value
      o->end();
      Fl_Group::current()->resizable(o);
    } // Fl_Group* o
    o->show();
    ui->end();
  } // Fl_Double_Window* ui
  return ui;
}

void CaSynthUI::idle() {
  Fl::check();
  Fl::flush();
}

void CaSynthUI::set_rule(float ru) {
  rule = ru;
  unsigned char r = ru;
  rule7->value(r&0x80);
  rule7->redraw();
  rule6->value(r&0x40);
  rule6->redraw();
  rule5->value(r&0x20);
  rule5->redraw();
  rule4->value(r&0x10);
  rule4->redraw();
  rule3->value(r&0x08);
  rule3->redraw();
  rule2->value(r&0x04);
  rule2->redraw();
  rule1->value(r&0x02);
  rule1->redraw();
  rule0->value(r&0x01);
  rule0->redraw();
  cellgrid->rule = r;
  cellgrid->redraw();
}

void CaSynthUI::set_initial_condition(float in) {
  initial_condition = in;
  unsigned short i = in;
  init15->value(i&0x8000);
  init15->redraw();
  init14->value(i&0x4000);
  init14->redraw();
  init13->value(i&0x2000);
  init13->redraw();
  init12->value(i&0x1000);
  init12->redraw();
  init11->value(i&0x0800);
  init11->redraw();
  init10->value(i&0x0400);
  init10->redraw();
  init9->value(i&0x0200);
  init9->redraw();
  init8->value(i&0x0100);
  init8->redraw();
  init7->value(i&0x0080);
  init7->redraw();
  init6->value(i&0x0040);
  init6->redraw();
  init5->value(i&0x0020);
  init5->redraw();
  init4->value(i&0x0010);
  init4->redraw();
  init3->value(i&0x0008);
  init3->redraw();
  init2->value(i&0x0004);
  init2->redraw();
  init1->value(i&0x0002);
  init1->redraw();
  init0->value(i&0x0001);
  init0->redraw();
  cellgrid->initial_condition = i;
  cellgrid->redraw();
}

Fl_Double_Window* CaSynthUI::nonmodal(char* param, char* curval) {
  if(winder) delete winder;
  { winder = new Fl_Double_Window(380, 115, "Set Exact Value");
    winder->user_data((void*)(this));
    { Fl_Button* o = new Fl_Button(232, 79, 50, 25, "OK");
      o->callback((Fl_Callback*)cb_OK);
    } // Fl_Button* o
    { Fl_Button* o = new Fl_Button(291, 79, 76, 25, "Cancel");
      o->callback((Fl_Callback*)cb_Cancel);
    } // Fl_Button* o
    { inpoot = new Fl_Input(116, 25, 250, 30, "Enter Value:");
    } // Fl_Input* inpoot
    winder->end();
  } // Fl_Double_Window* winder
  winder->label(param);
  inpoot->value(curval);
  winder->show();
  return winder;
}
