zynaddsubfx

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

commit c63e545b89ea4beb5edad47a23673b682f2c2253
parent 1e2e745160bed163d982c571f36a684116da0824
Author: paulnasca <paulnasca>
Date:   Mon, 27 Sep 2004 16:13:26 +0000

*** empty log message ***

Diffstat:
MChangeLog | 3+--
Msrc/Misc/Config.C | 2+-
Msrc/UI/ADnoteUI.fl | 34+++++++++++++++++-----------------
Msrc/UI/MasterUI.fl | 39++++++++++++++++++++-------------------
Msrc/UI/PartUI.fl | 10+++++-----
5 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -714,4 +714,4 @@ 07 Sep 2004 - Modificat id-ul vst in 'zasf' (inainte era de 5 litere si poate cauza un crash la host) 27 Sep 2004 - Corectat un mic bug la salvare in xml la parametrul FMcoarseDetune din adnote - La VST, daca incerc sa inchid fereastra principala, se minimizeaza - -\ No newline at end of file + - Eliminate setarile cu indice '0' (zero) diff --git a/src/Misc/Config.C b/src/Misc/Config.C @@ -190,7 +190,7 @@ void Config::readConfig(char *filename){ if (xmlcfg->loadXMLfile(filename)<0) return; if (xmlcfg->enterbranch("CONFIGURATION")){ cfg.SampleRate=xmlcfg->getpar("sample_rate",cfg.SampleRate,4000,1024000); - cfg.SoundBufferSize=xmlcfg->getpar("sound_buffer_size",cfg.SoundBufferSize,2,8192); + cfg.SoundBufferSize=xmlcfg->getpar("sound_buffer_size",cfg.SoundBufferSize,16,8192); cfg.OscilSize=xmlcfg->getpar("oscil_size",cfg.OscilSize,MAX_AD_HARMONICS*2,131072); cfg.SwapStereo=xmlcfg->getpar("swap_stereo",cfg.SwapStereo,0,1); cfg.BankUIAutoClose=xmlcfg->getpar("bank_window_auto_close",cfg.BankUIAutoClose,0,1); diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0104 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {} @@ -55,7 +55,7 @@ class ADvoicelistitem {: {public Fl_Group} Function {make_window()} {private } { Fl_Window ADnoteVoiceListItem { - private xywh {335 489 615 27} type Double hide + private xywh {335 489 615 30} type Double hide class Fl_Group } { Fl_Group voicelistitemgroup { @@ -126,9 +126,9 @@ detunevalueoutput->do_callback();} callback {pars->VoicePar[nvoice].Enabled=(int)o->value(); if (o->value()==0) voicelistitemgroup->deactivate(); else voicelistitemgroup->activate(); -o->redraw();} +o->redraw();} selected private xywh {30 5 20 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 4 - code0 {char tmp[10];snprintf(tmp,10,"%d",nvoice);o->label(strdup(tmp));} + code0 {char tmp[10];snprintf(tmp,10,"%d",nvoice+1);o->label(strdup(tmp));} code1 {o->value(pars->VoicePar[nvoice].Enabled);} } } @@ -305,7 +305,7 @@ o->redraw();} code2 {oscFM->init(pars->VoicePar[nv].FMSmp,0,pars->VoicePar[nvoice].PFMoscilphase,master);} } {} Fl_Box {} { - label {Mod.Oscillator} selected + label {Mod.Oscillator} xywh {535 365 155 20} labelfont 1 align 20 } Fl_Button changeFMoscilbutton { @@ -340,7 +340,7 @@ if ((int) o->value() != 0) { voiceFMparametersgroup->redraw();} open xywh {560 390 75 15} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 code0 {o->add("Internal");} - code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtM.%2d",i);o->add(tmp);};} + code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtM.%2d",i+1);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].PextFMoscil+1);} } {} } @@ -357,7 +357,7 @@ if ((int) o->value() != 0) { voiceFMparametersgroup->redraw();} open xywh {635 40 85 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("OFF");} - code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtMod.%2d",i);o->add(tmp);};} + code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtMod.%2d",i+1);o->add(tmp);};} code2 {o->value(pars->VoicePar[nvoice].PFMVoice+1);} code3 {if ((int) o->value() != 0) {modoscil->deactivate();modfrequency->deactivate();}} } {} @@ -543,7 +543,7 @@ voiceparametersgroup->redraw(); voiceonbutton->redraw();} open xywh {5 455 65 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("Internal");} - code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"Ext.%2d",i);o->add(tmp);};} + code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"Ext.%2d",i+1);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].Pextoscil+1);} } {} } @@ -656,7 +656,7 @@ o->redraw();} Fl_Group {} { label 01 xywh {5 5 55 35} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 30 align 16 - code0 {char tmp[10];snprintf(tmp,10,"%d",nvoice);o->label(strdup(tmp));} + code0 {char tmp[10];snprintf(tmp,10,"%d",nvoice+1);o->label(strdup(tmp));} } {} Fl_Choice {} { callback {int x=(int) o->value(); @@ -960,9 +960,14 @@ resui->resonancewindow->show();} code1 {o->show();} class ADvoiceUI } {} + Fl_Button {} { + label {Close Window} + callback {ADnoteVoice->hide();} + xywh {300 530 195 25} box THIN_UP_BOX labelfont 1 + } Fl_Counter currentvoicecounter { label {Current Voice} - callback {nvoice=(int)o->value(); + callback {nvoice=(int)o->value()-1; advoice->hide(); ADnoteVoice->remove(advoice); delete advoice; @@ -971,13 +976,8 @@ ADnoteVoice->add(advoice); advoice->init(pars,nvoice,master); advoice->show(); ADnoteVoice->redraw();} - xywh {5 530 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 0 step 1 textfont 1 textsize 18 - code0 {o->bounds(0,NUM_VOICES-1);} - } - Fl_Button {} { - label {Close Window} - callback {ADnoteVoice->hide();} - xywh {300 530 195 25} box THIN_UP_BOX labelfont 1 + xywh {5 530 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 2 step 1 value 1 textfont 1 textsize 18 + code0 {o->bounds(1,NUM_VOICES);} } Fl_Button {} { label C diff --git a/src/UI/MasterUI.fl b/src/UI/MasterUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0104 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {} @@ -228,7 +228,7 @@ labelsize(10); align(FL_ALIGN_TOP); value(master->Psysefxsend[neff1][neff2]); -char tmp[20];snprintf(tmp,20,"%d->%d",neff1,neff2);this->label(strdup(tmp));} {} +char tmp[20];snprintf(tmp,20,"%d->%d",neff1+1,neff2+1);this->label(strdup(tmp));} {} } Function {~SysEffSend()} {} { code {hide();} {} @@ -318,9 +318,9 @@ if ((int) o->value()==0) panellistitemgroup->deactivate(); }; }; -o->redraw();} +o->redraw();} selected private xywh {5 0 45 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 24 - code0 {char tmp[10];snprintf(tmp,10,"%d",npart);o->label(strdup(tmp));} + code0 {char tmp[10];snprintf(tmp,10,"%d",npart+1);o->label(strdup(tmp));} code1 {o->value(master->part[npart]->Penabled);} } } @@ -379,7 +379,7 @@ if (fl_ask("Exit and leave the unsaved data?")) *exitprogram=1; xywh {188 182 390 465} type Double hide code0 {setfilelabel(NULL);} non_modal } { - Fl_Menu_Bar mastermenu {selected + Fl_Menu_Bar mastermenu { xywh {0 0 690 25} } { submenu {} { @@ -699,12 +699,12 @@ pthread_mutex_unlock(&master->mutex);} } { Fl_Counter syseffnocounter { label {Sys.Effect No.} - callback {nsyseff=(int) o->value(); + callback {nsyseff=(int) o->value()-1; sysefftype->value(master->sysefx[nsyseff]->geteffect()); syseffectui->refresh(master->sysefx[nsyseff]);} - xywh {5 120 80 20} type Simple labelfont 1 labelsize 11 align 1 minimum 0 maximum 127 step 1 textfont 1 - code0 {o->bounds(0,NUM_SYS_EFX-1);} - code1 {o->value(nsyseff);} + xywh {5 120 80 20} type Simple labelfont 1 labelsize 11 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + code0 {o->bounds(1,NUM_SYS_EFX);} + code1 {o->value(nsyseff+1);} } Fl_Choice sysefftype { label EffType @@ -785,7 +785,7 @@ pthread_mutex_unlock(&master->mutex);} } { Fl_Counter inseffnocounter { label {Ins.Effect No.} - callback {ninseff=(int) o->value(); + callback {ninseff=(int) o->value()-1; insefftype->value(master->insefx[ninseff]->geteffect()); inseffpart->value(master->Pinsparts[ninseff]+2); inseffectui->refresh(master->insefx[ninseff]); @@ -799,9 +799,9 @@ if (master->Pinsparts[ninseff]!=-1) { inseffectui->deactivate(); inseffectuigroup->deactivate(); };} - xywh {5 120 80 20} type Simple labelfont 1 labelsize 11 align 1 minimum 0 maximum 127 step 1 textfont 1 - code0 {o->bounds(0,NUM_INS_EFX-1);} - code1 {o->value(ninseff);} + xywh {5 120 80 20} type Simple labelfont 1 labelsize 11 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + code0 {o->bounds(1,NUM_INS_EFX);} + code1 {o->value(ninseff+1);} } Fl_Choice insefftype { label EffType @@ -876,7 +876,7 @@ if ((int) o->value()==1){ master->insefx[ninseff]->cleanup();} open xywh {95 120 80 20} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 10 code0 {o->add("Master Out");o->add("Off");} - code1 {char tmp[50]; for (int i=0;i<NUM_MIDI_PARTS;i++) {sprintf(tmp,"Part %2d",i);o->add(tmp);};} + code1 {char tmp[50]; for (int i=0;i<NUM_MIDI_PARTS;i++) {sprintf(tmp,"Part %2d",i+1);o->add(tmp);};} code3 {o->value(master->Pinsparts[ninseff]+2);} } {} Fl_Button {} { @@ -956,18 +956,19 @@ mastermenu->redraw();} code0 {o->value(master->ctl.NRPN.receive);} } Fl_Counter npartcounter { - callback {partuigroup->remove(partui); + callback {int nval=(int) o->value()-1; +partuigroup->remove(partui); delete partui; partui=new PartUI(0,0,765,525); partuigroup->add(partui); -partui->init(master->part[(int) o->value()],master,(int) o->value(),bankui); +partui->init(master->part[nval],master,nval,bankui); partui->redraw(); o->redraw(); -npart=(int) o->value(); +npart=nval; updatepanel();} - tooltip {The part number} xywh {5 247 70 23} type Simple labelfont 1 minimum 0 maximum 127 step 1 textfont 1 - code0 {o->bounds(0,NUM_MIDI_PARTS-1);} + tooltip {The part number} xywh {5 247 70 23} type Simple labelfont 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + code0 {o->bounds(1,NUM_MIDI_PARTS);} code1 {bankui->init(o);} } Fl_Button {} { diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0104 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {} @@ -93,7 +93,7 @@ class PartKitItem {: {public Fl_Group} Function {make_window()} {private } { Fl_Window partkititem { - private xywh {113 271 670 27} type Double hide + private xywh {113 271 670 30} type Double hide class Fl_Group } { Fl_Group partkititemgroup { @@ -210,9 +210,9 @@ if (o->value()==0) partkititemgroup->deactivate(); else partkititemgroup->activate(); o->redraw(); partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0 -} else o->value(1);} +} else o->value(1);} selected private xywh {30 0 20 15} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 4 - code0 {snprintf(label,10,"%d",n);o->label(strdup(label));} + code0 {snprintf(label,10,"%d",n+1);o->label(strdup(label));} code1 {o->value(part->kit[n].Penabled);} code2 {if (n==0) o->deactivate();} } @@ -276,7 +276,7 @@ end();} {} class PartUI {: {public Fl_Group,PartUI_} } { - Function {make_window()} {selected private + Function {make_window()} {private } { Fl_Window partgroup { private xywh {107 533 385 180} type Double hide