zynaddsubfx

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

commit 396830cb062e1962e4abc3261e4207bece1f5eab
parent f72bf70748800bc1ceb3f5cebe89af39d95c3824
Author: paulnasca <paulnasca>
Date:   Sat,  3 Jul 2004 12:26:44 +0000

*** empty log message ***

Diffstat:
MChangeLog | 1+
Msrc/UI/ADnoteUI.fl | 111++++++++++++++++++++++++++++++++++++-------------------------------------------
Msrc/UI/PartUI.fl | 29+++++++++++++++--------------
Msrc/UI/SUBnoteUI.fl | 36+++++++++++++++++-------------------
Msrc/UI/VirKeyboard.fl | 23++++++++++++-----------
5 files changed, 96 insertions(+), 104 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -607,4 +607,5 @@ 03 Iul 2004 - Corectata o mica eroare care nu activa la EffectUI daca efectul anterior era dezactivat - Actualizat Swap/Copy la efecte ca sa proceseze si parametrii la filtre - Adaugat Bypass la efectele de instrument + - Imbunatatit interfata utilizator (eliminate setarile "-1",etc); diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl @@ -169,14 +169,13 @@ delete(ADnoteVoiceListItem);} {} decl {Master *master;} {} } -class ADvoiceUI {open : {public Fl_Group} +class ADvoiceUI {: {public Fl_Group} } { - Function {make_window()} {open - } { + Function {make_window()} {} { Fl_Window ADnoteVoiceParameters { label Voice - xywh {67 162 765 525} type Double - class Fl_Group visible + xywh {67 162 765 525} type Double hide + class Fl_Group } { Fl_Group voiceparametersgroup { xywh {0 0 765 525} box THIN_UP_BOX color 48 @@ -216,34 +215,23 @@ o->redraw();} if (k<0) k+=1024; pars->VoicePar[nvoice].PFMCoarseDetune = k+ (pars->VoicePar[nvoice].PFMCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {540 270 60 15} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12 + tooltip {Coarse Detune} xywh {685 270 60 15} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12 code0 {int k=pars->VoicePar[nvoice].PFMCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} code3 {o->lstep(10);} } - Fl_Text_Display {} { - xywh {600 270 50 15} labelsize 12 textsize 12 - } Fl_Counter {} { - label Oct + label Octave callback {int k=(int) o->value(); if (k<0) k+=16; pars->VoicePar[nvoice].PFMCoarseDetune = k*1024+ pars->VoicePar[nvoice].PFMCoarseDetune%1024;} - tooltip Octave xywh {660 270 45 15} type Simple labelsize 10 align 5 minimum -8 maximum 7 step 1 textfont 1 textsize 12 + tooltip Octave xywh {625 270 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 12 code0 {int k=pars->VoicePar[nvoice].PFMCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} } - Fl_Counter {} { - label Type - callback {pars->VoicePar[nvoice].PFMDetuneType=(int) o->value(); -fmdetunevalueoutput->do_callback();} - tooltip {The way of how the detune is computed (0 for Default)} xywh {710 270 40 15} type Simple labelsize 10 align 5 minimum 0 maximum 127 step 1 textfont 1 textsize 12 - code0 {o->bounds(0,N_DETUNE_TYPES);} - code1 {o->value(pars->VoicePar[nvoice].PFMDetuneType);} - } Fl_Slider {} { callback {pars->VoicePar[nvoice].PFMDetune=(int)o->value()+8192; fmdetunevalueoutput->do_callback();} @@ -256,6 +244,14 @@ fmdetunevalueoutput->do_callback();} xywh {540 245 45 13} labelsize 8 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 8 code0 {o->value(getdetune(pars->VoicePar[nvoice].PFMDetuneType,0,pars->VoicePar[nvoice].PFMDetune));} } + Fl_Choice {} { + label {Detune Type} + callback {pars->VoicePar[nvoice].PFMDetuneType=(int) o->value(); +fmdetunevalueoutput->do_callback();} open + xywh {540 270 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + code0 {o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} + code1 {o->value(pars->VoicePar[nvoice].PFMDetuneType);} + } {} } Fl_Group {} { label {Mod.AMPLITUDE} @@ -341,26 +337,27 @@ 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,"ExtFM.%2d",i);o->add(tmp);};} + code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtM.%2d",i);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].PextFMoscil+1);} } {} } - Fl_Counter {} { - label {Ext. Mod.} - callback {pars->VoicePar[nvoice].PFMVoice=(int)o->value(); -if ((int) o->value() != -1) { + Fl_Choice {} { + label {External Mod.} + callback {pars->VoicePar[nvoice].PFMVoice=(int)o->value()-1; +if ((int) o->value() != 0) { modoscil->deactivate(); modfrequency->deactivate(); } else { modoscil->activate(); modfrequency->activate(); }; -voiceFMparametersgroup->redraw();} - tooltip {External Modulator voice ( -1 for internal)} xywh {640 40 70 20} type Simple align 5 minimum -1 maximum 127 step 1 value -1 textfont 1 - code0 {o->bounds(-1,nvoice-1);} - code1 {o->value(pars->VoicePar[nvoice].PFMVoice);} - code2 {if ((int) o->value() != -1) {modoscil->deactivate();modfrequency->deactivate();}} - } +voiceFMparametersgroup->redraw();} open selected + 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);};} + code2 {o->value(pars->VoicePar[nvoice].PFMVoice+1);} + code3 {if ((int) o->value() != 0) {modoscil->deactivate();modfrequency->deactivate();}} + } {} } Fl_Choice {} { label {Type:} @@ -433,39 +430,28 @@ o->redraw();} code0 {o->value(pars->VoicePar[nvoice].PFreqLfoEnabled);} } Fl_Counter {} { - label Oct + label Octave callback {int k=(int) o->value(); if (k<0) k+=16; pars->VoicePar[nvoice].PCoarseDetune = k*1024+ pars->VoicePar[nvoice].PCoarseDetune%1024;} - tooltip Octave xywh {480 315 45 20} type Simple labelsize 10 align 4 minimum -8 maximum 7 step 1 textfont 1 textsize 12 + tooltip Octave xywh {470 270 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 12 code0 {int k=pars->VoicePar[nvoice].PCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} } Fl_Counter {} { - label Type - callback {pars->VoicePar[nvoice].PDetuneType=(int) o->value(); -detunevalueoutput->do_callback();} - tooltip {The way of how the detune is computed (0 for Default)} xywh {485 340 40 15} type Simple labelsize 10 align 4 minimum 0 maximum 127 step 1 textfont 1 textsize 12 - code0 {o->bounds(0,N_DETUNE_TYPES);} - code1 {o->value(pars->VoicePar[nvoice].PDetuneType);} - } - Fl_Counter {} { label {Coarse Det.} callback {int k=(int) o->value(); if (k<0) k+=1024; pars->VoicePar[nvoice].PCoarseDetune = k+ (pars->VoicePar[nvoice].PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {465 270 60 20} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12 + tooltip {Coarse Detune} xywh {455 340 60 20} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12 code0 {int k=pars->VoicePar[nvoice].PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} code3 {o->lstep(10);} } - Fl_Text_Display {} { - xywh {465 290 60 15} labelsize 12 textsize 12 - } Fl_Slider {} { callback {pars->VoicePar[nvoice].PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} @@ -495,6 +481,14 @@ if (x==0) fixedfreqetdial->deactivate(); code1 {if (pars->VoicePar[nvoice].Pfixedfreq==0) o->deactivate();} class WidgetPDial } + Fl_Choice {} { + label {Detune Type} + callback {pars->VoicePar[nvoice].PDetuneType=(int) o->value(); +detunevalueoutput->do_callback();} open + xywh {450 305 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + code0 {o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} + code1 {o->value(pars->VoicePar[nvoice].PDetuneType);} + } {} } Fl_Group voiceoscil { xywh {80 375 445 145} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 @@ -543,7 +537,7 @@ if ((int) o->value() != 0) { }; voiceparametersgroup->redraw(); -voiceonbutton->redraw();} open selected +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);};} @@ -771,39 +765,28 @@ class ADnoteUI {} { class EnvelopeUI } {} Fl_Counter {} { - label Oct + label Octave callback {int k=(int) o->value(); if (k<0) k+=16; pars->GlobalPar.PCoarseDetune = k*1024+ pars->GlobalPar.PCoarseDetune%1024;} - tooltip Octave xywh {480 320 45 20} type Simple labelsize 10 align 4 minimum -8 maximum 7 step 1 textfont 1 textsize 12 + tooltip Octave xywh {470 275 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 12 code0 {int k=pars->GlobalPar.PCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} } Fl_Counter {} { - label Type - callback {pars->GlobalPar.PDetuneType=(int) o->value(); -detunevalueoutput->do_callback();} - tooltip {The way of how the detune is computed (Default)} xywh {485 345 40 15} type Simple labelsize 10 align 4 minimum 1 maximum 127 step 1 textfont 1 textsize 12 - code0 {o->bounds(1,N_DETUNE_TYPES);} - code1 {o->value(pars->GlobalPar.PDetuneType);} - } - Fl_Counter {} { - label {C.det} + label {Coarse det.} callback {int k=(int) o->value(); if (k<0) k+=1024; pars->GlobalPar.PCoarseDetune = k+ (pars->GlobalPar.PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {465 270 60 20} labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 12 + tooltip {Coarse Detune} xywh {455 345 60 20} labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 12 code0 {int k=pars->GlobalPar.PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} code3 {o->lstep(10);} } - Fl_Text_Display {} { - xywh {465 290 60 15} labelsize 12 textsize 12 - } Fl_Group {} { label {Frequency LFO} open xywh {215 295 230 70} box FLAT_BOX color 47 align 144 @@ -822,6 +805,14 @@ detunevalueoutput->do_callback();} xywh {12 275 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 code0 {o->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));} } + Fl_Choice {} { + label {Detune Type} + callback {pars->GlobalPar.PDetuneType=(int) o->value()+1; +detunevalueoutput->do_callback();} open + xywh {450 315 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} + code1 {o->value(pars->GlobalPar.PDetuneType-1);} + } {} } Fl_Group {} { label AMPLITUDE diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl @@ -90,7 +90,7 @@ class PartKitItem {: {public Fl_Group} Function {make_window()} {private } { Fl_Window partkititem { - private xywh {149 528 590 27} type Double hide + private xywh {4 556 590 27} type Double hide class Fl_Group } { Fl_Group partkititemgroup { @@ -171,14 +171,13 @@ if (part->kit[n].Psubenabled!=0) subeditbutton->activate(); code0 {o->value(part->kit[n].Psubenabled);} code1 {if (n==0) o->hide();} } - Fl_Counter sentdoeffectcounter { - callback {if (o->value()>=0.0) part->kit[n].Psendtoparteffect=(int)o->value(); - else part->kit[n].Psendtoparteffect=127;} - xywh {535 0 45 15} type Simple minimum -1 maximum 128 step 1 - code0 {o->bounds(-1,NUM_PART_EFX);} - code1 {o->value(part->kit[n].Psendtoparteffect);} - code2 {if (part->kit[n].Psendtoparteffect==127) o->value(-1);} - } + Fl_Choice sendtoeffect { + callback {if (o->value()!=0) part->kit[n].Psendtoparteffect=(int)o->value()-1; + else part->kit[n].Psendtoparteffect=127;} open + xywh {540 0 45 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + code0 {o->add("OFF");char nrstr[10]; for(int i=0;i<NUM_PART_EFX;i++){sprintf(nrstr,"FX%d",i+1);o->add(nrstr);};} + code1 {o->value(part->kit[n].Psendtoparteffect+1);if (part->kit[n].Psendtoparteffect==127) o->value(0);} + } {} } Fl_Check_Button enabledcheck { label 01 @@ -218,7 +217,9 @@ adcheck->value(part->kit[n].Padenabled); adcheck->do_callback(); subcheck->value(part->kit[n].Psubenabled); subcheck->do_callback(); -sentdoeffectcounter->value(part->kit[n].Psendtoparteffect); + +sendtoeffect->value(part->kit[n].Psendtoparteffect+1); +if (part->kit[n].Psendtoparteffect==127) sendtoeffect->value(0); this->redraw();} { callback {int answer=1; @@ -260,7 +261,7 @@ class PartUI {: {public Fl_Group,PartUI_} Function {make_window()} {private } { Fl_Window partgroup { - private xywh {107 561 385 180} type Double hide + private xywh {107 533 385 180} type Double hide class Fl_Group } { Fl_Group partgroupui { @@ -406,8 +407,8 @@ maxkcounter->do_callback();} label KLmt callback {int val=0; val=atoi(o->text()); -part->setkeylimit(val);} open - tooltip {Key Limit} xywh {210 155 60 20} down_box BORDER_BOX labelsize 10 align 8 textfont 1 textsize 10 +part->setkeylimit(val);} open selected + tooltip {Key Limit} xywh {210 155 50 20} down_box BORDER_BOX labelsize 10 align 8 textfont 1 textsize 10 } {} } Fl_Check_Button {} { @@ -776,7 +777,7 @@ if (part->Pkitmode==0) { code0 {o->value(part->Pdrummode);} } Fl_Box {} { - label {FX.} + label {FX.r.} xywh {545 0 30 15} labelfont 1 labelsize 12 align 18 } } diff --git a/src/UI/SUBnoteUI.fl b/src/UI/SUBnoteUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0104 +version 1.0105 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {} @@ -38,7 +38,7 @@ class SUBnoteharmonic {: {public Fl_Group} Function {make_window()} {private } { Fl_Window harmonic { - xywh {329 403 90 225} hide + xywh {329 403 90 225} type Double hide class Fl_Group } { Fl_Slider mag { @@ -96,10 +96,11 @@ delete(harmonic);} {} } class SUBnoteUI {} { - Function {make_window()} {} { + Function {make_window()} {selected + } { Fl_Window SUBparameters { label {SUBsynth Parameters} - xywh {4 225 735 390} hide + xywh {4 225 735 390} type Double hide } { Fl_Scroll {} { xywh {5 140 435 245} type HORIZONTAL box THIN_UP_BOX @@ -222,39 +223,28 @@ freqsettingsui->redraw();} code0 {o->value(pars->PFreqEnvelopeEnabled);} } Fl_Counter {} { - label Oct + label Octave callback {int k=(int) o->value(); if (k<0) k+=16; pars->PCoarseDetune = k*1024+ pars->PCoarseDetune%1024;} - tooltip Octave xywh {680 95 45 20} type Simple labelsize 10 align 4 minimum -8 maximum 7 step 1 textfont 1 textsize 12 + tooltip Octave xywh {670 50 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 12 code0 {int k=pars->PCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} } Fl_Counter {} { - label Type - callback {pars->PDetuneType=(int) o->value(); -detunevalueoutput->do_callback();} - tooltip {The way of how the detune is computed} xywh {685 120 40 15} type Simple labelsize 10 align 4 minimum 1 maximum 127 step 1 textfont 1 textsize 12 - code0 {o->bounds(1,N_DETUNE_TYPES);} - code1 {o->value(pars->PDetuneType);} - } - Fl_Counter {} { label {Coarse Det.} callback {int k=(int) o->value(); if (k<0) k+=1024; pars->PCoarseDetune = k+ (pars->PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {665 50 60 20} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12 + tooltip {Coarse Detune} xywh {655 115 60 20} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12 code0 {int k=pars->PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} code3 {o->lstep(10);} } - Fl_Text_Display {} { - xywh {665 70 60 15} labelsize 12 textsize 12 - } Fl_Slider {} { callback {pars->PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} @@ -284,6 +274,14 @@ if (x==0) fixedfreqetdial->deactivate(); code1 {if (pars->Pfixedfreq==0) o->deactivate();} class WidgetPDial } + Fl_Choice {} { + label {Detune Type} + callback {pars->PDetuneType=(int) o->value()+1; +detunevalueoutput->do_callback();} open + xywh {655 85 70 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} + code1 {o->value(pars->PDetuneType-1);} + } {} } Fl_Check_Button {} { label Stereo @@ -350,7 +348,7 @@ bandwidthsettingsui->redraw();} class EnvelopeUI } {} Fl_Group {} { - label {SUBsynthl - Filter} open selected + label {SUBsynthl - Filter} open xywh {445 170 275 75} box FLAT_BOX color 50 align 144 code0 {o->init(pars->GlobalFilter,&pars->PGlobalFilterVelocityScale,&pars->PGlobalFilterVelocityScaleFunction);} class FilterUI diff --git a/src/UI/VirKeyboard.fl b/src/UI/VirKeyboard.fl @@ -1,12 +1,12 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0104 +version 1.0105 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {} decl {//License: GNU GPL version 2} {} -decl {\#include <stdlib.h>} {selected public +decl {\#include <stdlib.h>} {public } decl {\#include <FL/fl_draw.H>} {public @@ -209,7 +209,7 @@ class VirKeyboard {} { label {Virtual Keyboard - ZynAddSubFX} callback {relaseallkeys(); virkeyboardwindow->hide();} - xywh {46 407 650 130} hide + xywh {118 534 650 130} type Double hide } { Fl_Box virkeys { label Keyboard @@ -233,14 +233,6 @@ virkeys->take_focus();} tooltip {keys "zsxdcvgbh..." octave} xywh {380 110 45 15} type Simple labelsize 10 align 4 when 6 minimum 0 maximum 5 step 1 textfont 1 textsize 10 code0 {o->value(virkeys->keyoct2);} } - Fl_Counter {} { - label {Ch.} - callback {relaseallkeys(); -virkeys->midich=(int) o->value(); -virkeys->take_focus();} - tooltip {Midi Channel} xywh {30 100 55 20} type Simple labelsize 12 align 4 when 6 minimum 0 maximum 15 step 1 textfont 1 textsize 12 - code0 {o->value(virkeys->midich);} - } Fl_Value_Slider {} { label Vel callback {virkeys->midivel=(int) o->value(); @@ -367,6 +359,15 @@ pitchwheelroller->do_callback();} code0 {o->value(virkeys->rndvelocity);} class WidgetPDial } + Fl_Choice partrcv { + label {MIDI Ch.} + callback {relaseallkeys(); +virkeys->midich=(int) o->value(); +virkeys->take_focus();} open selected + tooltip {Send to Midi Channel} xywh {15 105 65 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + code0 {char nrstr[10]; for(int i=0;i<NUM_MIDI_CHANNELS;i++){sprintf(nrstr,"Chn%d",i+1);if (i!=9) o->add(nrstr); else o->add("Drum10");};} + code1 {o->value(virkeys->midich);} + } {} } } Function {VirKeyboard(Master *master_)} {} {