zynaddsubfx

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

commit 0d2c04775fc5abecf675a3e20f471291244e8c44
parent 18d356c743ff65dced01241f2f6779cac6b56f89
Author: Jonathan Moore Liles <j.liles@unix.net>
Date:   Mon, 22 Oct 2012 17:29:26 -0700

Optionally use NTK instead of FLTK.

Diffstat:
Dcmake/FindMYFLTK.cmake | 49-------------------------------------------------
Acmake/FindNTK.cmake | 45+++++++++++++++++++++++++++++++++++++++++++++
Apixmaps/black_key.png | 0
Apixmaps/black_key_pressed.png | 0
Apixmaps/knob.png | 0
Apixmaps/module_backdrop.png | 0
Apixmaps/white_key.png | 0
Apixmaps/white_key_pressed.png | 0
Apixmaps/window_backdrop.png | 0
Msrc/CMakeLists.txt | 63++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
Msrc/UI/ADnoteUI.fl | 348++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Msrc/UI/BankUI.fl | 95++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Msrc/UI/CMakeLists.txt | 10+++++++++-
Msrc/UI/EffUI.fl | 358++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/UI/EnvelopeUI.fl | 147++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Msrc/UI/FilterUI.fl | 99+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Msrc/UI/LFOUI.fl | 66+++++++++++++++++++++++++++++++++++++-----------------------------
Msrc/UI/MasterUI.fl | 321++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Msrc/UI/MicrotonalUI.fl | 2+-
Msrc/UI/OscilGenUI.fl | 190+++++++++++++++++++++++++++++++++++++++++++++----------------------------------
Msrc/UI/PADnoteUI.fl | 153++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Msrc/UI/PartUI.fl | 182++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Msrc/UI/PresetsUI.fl | 4++--
Msrc/UI/ResonanceUI.fl | 81+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Msrc/UI/SUBnoteUI.fl | 99++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Msrc/UI/VirKeyboard.fl | 149+++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
Msrc/UI/WidgetPDial.cpp | 24+++++++++++++++++++++---
Asrc/UI/common.H | 29+++++++++++++++++++++++++++++
Msrc/main.cpp | 55+++++++++++++++++++++++++++++++++++++++++++++++++++----
29 files changed, 1503 insertions(+), 1066 deletions(-)

diff --git a/cmake/FindMYFLTK.cmake b/cmake/FindMYFLTK.cmake @@ -1,49 +0,0 @@ -# The CMake supplied FindFLTK delivers FLTK_LIBRARIES as a full list of -# static and shared libs, with full paths. We really want just a list of -# the lib names. This slight perversion defines -# MYFLTK_FOUND true or false -# MYFLTK_CONFIG fltk-config executable -# FLTK_FLUID_EXECUTABLE fluid executable -# MYFLTK_LDFLAGS a list of libs required for linking -# - -if (MYFLTK_LDFLAGS) - # in cache already - set(MYFLTK_FOUND TRUE) -else (MYFLTK_LDFLAGS) - find_program (MYFLTK_CONFIG fltk-config) - if (MYFLTK_CONFIG) - execute_process (COMMAND ${MYFLTK_CONFIG} --ldflags OUTPUT_VARIABLE MYFLTK_LDFLAGS) - message("MYFLTK_LDFLAGS: ${MYFLTK_LDFLAGS}") - string(STRIP ${MYFLTK_LDFLAGS} MYFLTK_LIBS) - message("MYFLTK_LIBS: ${MYFLTK_LIBS}") - string(REPLACE "-l" "" MYFLTK_LIBS ${MYFLTK_LIBS}) - message("MYFLTK_LIBS: ${MYFLTK_LIBS}") - string(REPLACE " " "; " MYFLTK_LIBS ${MYFLTK_LIBS}) - message("MYFLTK_LINK_LIBS: ${MYFLTK_LINK_LIBS}") - #list(APPEND MYFLTK_LIBS ${MYFLTK_LINK_LIBS}) - message("MYFLTK_LIBS: ${MYFLTK_LIBS}") - find_program (FLTK_FLUID_EXECUTABLE fluid) - if (FLTK_FLUID_EXECUTABLE) -# mark_as_advanced(MYFLTK_CONFIG) -# mark_as_advanced(FLTK_EXECUTABLE) -# mark_as_advanced(MYFLTK_LIBRARIES) - set(MYFLTK_FOUND TRUE) - set(FLTK_WRAP_UI 1) - endif(FLTK_FLUID_EXECUTABLE) - endif (MYFLTK_CONFIG) -endif (MYFLTK_LDFLAGS) - -# message("MYFLTK_LDFLAGS: ${MYFLTK_LDFLAGS}") -# message("FLTK_WRAP_UI: ${FLTK_WRAP_UI}") - -if (MYFLTK_FOUND) - if (NOT MYFLTK_FIND_QUIETLY) - message(STATUS "found ${MYFLTK_CONFIG}") - # message(STATUS "found ${FLTK_FLUID_EXECUTABLE}") - endif (NOT MYFLTK_FIND_QUIETLY) -else (MYFLTK_FOUND) - if (MYFLTK_FIND_REQUIRED) - message(FATAL_ERROR "could not find MYFLTK, aborting.") - endif (MYFLTK_FIND_REQUIRED) -endif (MYFLTK_FOUND) diff --git a/cmake/FindNTK.cmake b/cmake/FindNTK.cmake @@ -0,0 +1,45 @@ +# The CMake supplied FindNTK delivers NTK_LIBRARIES as a full list of +# static and shared libs, with full paths. We really want just a list of +# the lib names. This slight perversion defines +# NTK_FOUND true or false +# NTK_CONFIG ntk-config executable +# NTK_FLUID_EXECUTABLE fluid executable +# NTK_LDFLAGS a list of libs required for linking +# + +if (NTK_LDFLAGS) + # in cache already + set(NTK_FOUND TRUE) +else (NTK_LDFLAGS) + find_program (NTK_CONFIG ntk-config) + if (NTK_CONFIG) + execute_process (COMMAND ${NTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE NTK_LDFLAGS) + execute_process (COMMAND ${NTK_CONFIG} --use-images --includedir OUTPUT_VARIABLE NTK_INCLUDE_DIR) + string(STRIP ${NTK_LDFLAGS} NTK_LIBS) + string(REPLACE "-l" "" NTK_LIBS ${NTK_LIBS}) + string(REPLACE " " "; " NTK_LIBS ${NTK_LIBS}) + #list(APPEND NTK_LIBS ${NTK_LINK_LIBS}) + find_program (NTK_FLUID_EXECUTABLE ntk-fluid) + if (NTK_FLUID_EXECUTABLE) +# mark_as_advanced(NTK_CONFIG) +# mark_as_advanced(NTK_EXECUTABLE) +# mark_as_advanced(NTK_LIBRARIES) + set(NTK_FOUND TRUE) + set(NTK_WRAP_UI 1) + endif(NTK_FLUID_EXECUTABLE) + endif (NTK_CONFIG) +endif (NTK_LDFLAGS) + +# message("NTK_LDFLAGS: ${NTK_LDFLAGS}") +# message("NTK_WRAP_UI: ${NTK_WRAP_UI}") + +if (NTK_FOUND) + if (NOT NTK_FIND_QUIETLY) + message(STATUS "found ${NTK_CONFIG}") + # message(STATUS "found ${NTK_FLUID_EXECUTABLE}") + endif (NOT NTK_FIND_QUIETLY) +else (NTK_FOUND) + if (NTK_FIND_REQUIRED) + message(FATAL_ERROR "could not find NTK, aborting.") + endif (NTK_FIND_REQUIRED) +endif (NTK_FOUND) diff --git a/pixmaps/black_key.png b/pixmaps/black_key.png Binary files differ. diff --git a/pixmaps/black_key_pressed.png b/pixmaps/black_key_pressed.png Binary files differ. diff --git a/pixmaps/knob.png b/pixmaps/knob.png Binary files differ. diff --git a/pixmaps/module_backdrop.png b/pixmaps/module_backdrop.png Binary files differ. diff --git a/pixmaps/white_key.png b/pixmaps/white_key.png Binary files differ. diff --git a/pixmaps/white_key_pressed.png b/pixmaps/white_key_pressed.png Binary files differ. diff --git a/pixmaps/window_backdrop.png b/pixmaps/window_backdrop.png Binary files differ. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -13,6 +13,7 @@ find_package(Alsa) pkg_check_modules(JACK jack) pkg_check_modules(PORTAUDIO portaudio-2.0>=19) set(FLTK_SKIP_OPENGL true) +find_package(NTK) find_package(FLTK) find_package(OpenGL) #for FLTK find_package(CxxTest) @@ -90,6 +91,8 @@ endif() if (GuiModule STREQUAL qt AND QT_FOUND) set (QtGui TRUE) +elseif(GuiModule STREQUAL ntk AND NTK_FOUND) + set (NtkGui TRUE) elseif(GuiModule STREQUAL fltk AND FLTK_FOUND) set (FltkGui TRUE) elseif(GuiModule STREQUAL off) @@ -214,22 +217,33 @@ if(FLTK_FOUND) mark_as_advanced(FORCE FLTK_MATH_LIBRARY) endif(FLTK_FOUND) +if(NTK_FOUND) + mark_as_advanced(FORCE NTK_BASE_LIBRARY) + mark_as_advanced(FORCE NTK_CONFIG_SCRIPT) + mark_as_advanced(FORCE NTK_DIR) + mark_as_advanced(FORCE NTK_FLUID_EXECUTABLE) + mark_as_advanced(FORCE NTK_FORMS_LIBRARY) + mark_as_advanced(FORCE NTK_GL_LIBRARY) + mark_as_advanced(FORCE NTK_IMAGES_LIBRARY) + mark_as_advanced(FORCE NTK_INCLUDE_DIR) + mark_as_advanced(FORCE NTK_MATH_LIBRARY) +endif(NTK_FOUND) + if(FltkGui) #UGLY WORKAROUND - find_program (MYFLTK_CONFIG fltk-config) - if (MYFLTK_CONFIG) - execute_process (COMMAND ${MYFLTK_CONFIG} --ldflags OUTPUT_VARIABLE MYFLTK_LDFLAGS) - string(STRIP ${MYFLTK_LDFLAGS} MYFLTK_LIBRARIES) + find_program (FLTK_CONFIG fltk-config) + if (FLTK_CONFIG) + execute_process (COMMAND ${FLTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE FLTK_LDFLAGS) + string(STRIP ${FLTK_LDFLAGS} FLTK_LIBRARIES) endif() - message(STATUS ${MYFLTK_LDFLAGS}) + message(STATUS ${FLTK_LDFLAGS}) - set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) + set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) add_definitions(-DFLTK_GUI) - - message(STATUS "Will build fltk gui") + message(STATUS "Will build FLTK gui") include_directories( ${FLTK_INCLUDE_DIR} @@ -240,11 +254,37 @@ if(FltkGui) add_subdirectory(UI) endif() +if(NtkGui) + #UGLY WORKAROUND + find_program (NTK_CONFIG ntk-config) + if (NTK_CONFIG) + execute_process (COMMAND ${NTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE NTK_LDFLAGS) + string(STRIP ${NTK_LDFLAGS} NTK_LIBRARIES) + endif() + + message(STATUS ${NTK_LDFLAGS}) + + + set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) + + add_definitions(-DNTK_GUI) + + message(STATUS "Will build NTK gui") + + include_directories( + ${NTK_INCLUDE_DIR} + "${CMAKE_CURRENT_SOURCE_DIR}/UI" + "${CMAKE_CURRENT_BINARY_DIR}/UI" + ) + + add_subdirectory(UI) +endif() + ########### General section ############## # Following this should be only general compilation code, and no mention # of module-specific variables -link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS}) +link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS}) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} @@ -323,4 +363,9 @@ install(TARGETS zynaddsubfx RUNTIME DESTINATION bin ) +if(NtkGui) +install(DIRECTORY ../pixmaps DESTINATION share/zynaddsubfx) +add_definitions(-DPIXMAP_PATH="${CMAKE_INSTALL_PREFIX}/share/zynaddsubfx/pixmaps/") +endif(NtkGui) + include(CTest) diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl @@ -1,70 +1,76 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0109 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include "../Params/ADnoteParameters.h"} {public +decl {\#include "../Params/ADnoteParameters.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local } -decl {\#include "ResonanceUI.h"} {public +decl {\#include "ResonanceUI.h"} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/Fl_Group.H>} {public +decl {\#include <FL/Fl_Group.H>} {public local } -decl {\#include <math.h>} {} +decl {\#include <math.h>} {private local +} -decl {\#include <stdio.h>} {} +decl {\#include <stdio.h>} {private local +} -decl {\#include <stdlib.h>} {} +decl {\#include <stdlib.h>} {private local +} -decl {\#include <string.h>} {} +decl {\#include <string.h>} {private local +} -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "EnvelopeUI.h"} {public +decl {\#include "EnvelopeUI.h"} {public local } -decl {\#include "LFOUI.h"} {public +decl {\#include "LFOUI.h"} {public local } -decl {\#include "FilterUI.h"} {public +decl {\#include "FilterUI.h"} {public local } -decl {\#include "OscilGenUI.h"} {public +decl {\#include "OscilGenUI.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local } -class ADvoicelistitem {: {public Fl_Group} +class ADvoicelistitem {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window ADnoteVoiceListItem { - private xywh {247 599 615 30} type Double hide - class Fl_Group + Fl_Window ADnoteVoiceListItem {open + private xywh {259 713 615 100} type Double box UP_FRAME + class Fl_Group visible } { Fl_Group voicelistitemgroup { - private xywh {50 0 570 25} box FLAT_BOX + private xywh {50 0 570 25} code0 {if (pars->VoicePar[nvoice].Enabled==0) o->deactivate();} } { Fl_Value_Slider voicevolume { callback {pars->VoicePar[nvoice].PVolume=(int)o->value();} - tooltip Volume xywh {90 5 115 20} type {Horz Knob} box FLAT_BOX labelsize 8 align 5 maximum 127 step 1 + tooltip Volume xywh {90 5 115 20} type {Horz Knob} box NO_BOX labelsize 8 align 5 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PVolume);} } Fl_Check_Button voiceresonanceenabled { @@ -74,7 +80,7 @@ class ADvoicelistitem {: {public Fl_Group} } Fl_Value_Slider voicelfofreq { callback {pars->VoicePar[nvoice].FreqLfo->Pintensity=(int)o->value();} - tooltip {Frequency LFO amount} xywh {500 5 115 20} type {Horz Knob} box FLAT_BOX labelsize 8 align 5 maximum 127 step 1 + tooltip {Frequency LFO amount} xywh {500 5 115 20} type {Horz Knob} box NO_BOX labelsize 8 align 5 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].FreqLfo->Pintensity);} } Fl_Dial voicepanning { @@ -97,7 +103,7 @@ class ADvoicelistitem {: {public Fl_Group} Fl_Slider voicedetune { callback {pars->VoicePar[nvoice].PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {315 5 185 20} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {315 5 185 20} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->VoicePar[nvoice].PDetune-8192);} } Fl_Box noiselabel { @@ -166,10 +172,14 @@ ADnoteVoiceListItem->redraw();} {} code {ADnoteVoiceListItem->hide(); //delete(ADnoteVoiceListItem);} {} } - decl {ADnoteParameters *pars;} {} - decl {int nvoice;} {} - decl {Oscilloscope *osc;} {} - decl {Master *master;} {} + decl {ADnoteParameters *pars;} {private local + } + decl {int nvoice;} {private local + } + decl {Oscilloscope *osc;} {private local + } + decl {Master *master;} {private local + } } class ADvoiceUI {open : {public Fl_Group} @@ -177,40 +187,40 @@ class ADvoiceUI {open : {public Fl_Group} Function {make_window()} {open } { Fl_Window ADnoteVoiceParameters { - label Voice - xywh {69 185 765 575} type Double + label Voice open + xywh {81 282 765 590} type Double box NO_BOX class Fl_Group visible } { Fl_Group voiceparametersgroup {open - xywh {0 0 765 580} box THIN_UP_BOX color 48 + xywh {0 0 765 595} color 48 code0 {if (pars->VoicePar[nvoice].Enabled==0) o->deactivate();} } { Fl_Group voicemodegroup {open - xywh {0 5 760 575} + xywh {0 5 765 590} color 64 } { Fl_Group voiceFMparametersgroup { - label MODULATOR - xywh {530 5 230 565} box THIN_UP_FRAME color 48 labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label MODULATOR open + xywh {530 5 230 580} box UP_FRAME color 48 labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {if (pars->VoicePar[nvoice].PFMEnabled==0) o->deactivate();} } { Fl_Group modfrequency { label {Mod.FREQUENCY} - xywh {535 220 220 145} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {535 220 220 155} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group voiceFMfreqenvgroup { label {ADSynth Modulator - Frequency Envelope} - xywh {540 290 205 70} box FLAT_BOX color 51 align 144 + xywh {540 300 210 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->VoicePar[nvoice].FMFreqEnvelope);} code1 {if (pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled==0) o->deactivate();} class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled=(int)o->value(); if (o->value()==0) voiceFMfreqenvgroup->deactivate(); else voiceFMfreqenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {545 295 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {545 305 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled);} } Fl_Counter {} { @@ -219,7 +229,7 @@ o->redraw();} if (k<0) k+=1024; pars->VoicePar[nvoice].PFMCoarseDetune = k+ (pars->VoicePar[nvoice].PFMCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {685 270 60 15} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {685 280 60 15} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PFMCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} @@ -231,7 +241,7 @@ pars->VoicePar[nvoice].PFMCoarseDetune = k+ if (k<0) k+=16; pars->VoicePar[nvoice].PFMCoarseDetune = k*1024+ pars->VoicePar[nvoice].PFMCoarseDetune%1024;} - tooltip Octave xywh {625 270 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 + tooltip Octave xywh {625 280 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PFMCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} @@ -239,13 +249,13 @@ pars->VoicePar[nvoice].PFMCoarseDetune = k*1024+ Fl_Slider {} { callback {pars->VoicePar[nvoice].PFMDetune=(int)o->value()+8192; fmdetunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {590 245 160 10} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {590 245 155 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMDetune-8192);} } Fl_Value_Output fmdetunevalueoutput { label Detune callback {o->value(getdetune((pars->VoicePar[nvoice].PFMDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PFMDetuneType),0,pars->VoicePar[nvoice].PFMDetune));} - xywh {540 245 45 13} labelsize 8 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 8 + xywh {540 245 45 18} 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->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PFMDetuneType),0,pars->VoicePar[nvoice].PFMDetune));} code1 {//o->value(getdetune(pars->VoicePar[nvoice].PFMDetuneType,0,pars->VoicePar[nvoice].PFMDetune));} } @@ -253,25 +263,25 @@ fmdetunevalueoutput->do_callback();} 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 + xywh {540 280 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} - xywh {535 60 220 160} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {535 60 220 160} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider {} { label Vol callback {pars->VoicePar[nvoice].PFMVolume=(int)o->value();} - tooltip Volume xywh {540 80 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {540 80 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMVolume);} } Fl_Value_Slider {} { label {V.Sns} callback {pars->VoicePar[nvoice].PFMVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {540 100 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {540 100 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMVelocityScaleFunction);} } Fl_Group voiceFMampenvgroup { @@ -282,33 +292,33 @@ fmdetunevalueoutput->do_callback();} open class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled=(int)o->value(); if (o->value()==0) voiceFMampenvgroup->deactivate(); else voiceFMampenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {545 150 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {545 150 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled);} } Fl_Value_Slider {} { label {F.Damp} callback {pars->VoicePar[nvoice].PFMVolumeDamp=(int) o->value()+64;} - tooltip {Modulator Damp at Higher frequency} xywh {540 120 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 minimum -64 maximum 63 step 1 + tooltip {Modulator Damp at Higher frequency} xywh {540 120 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 minimum -64 maximum 63 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMVolumeDamp-64);} } } - Fl_Group modoscil { - xywh {535 365 220 200} + Fl_Group modoscil {open + xywh {535 365 220 220} } { Fl_Group fmoscil {open - xywh {535 425 220 140} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 + xywh {535 440 220 140} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 code0 {oscFM=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} code1 {int nv=nvoice; if (pars->VoicePar[nvoice].PextFMoscil>=0) nv=pars->VoicePar[nvoice].PextFMoscil;} code2 {oscFM->init(pars->VoicePar[nv].FMSmp,0,pars->VoicePar[nvoice].PFMoscilphase,master);} } {} Fl_Box {} { label {Mod.Oscillator} - xywh {535 365 155 20} labelfont 1 align 20 + xywh {535 375 155 20} labelfont 1 align 20 } Fl_Button changeFMoscilbutton { label Change @@ -318,7 +328,7 @@ int nv=nvoice; if (pars->VoicePar[nvoice].PextFMoscil>=0) nv=pars->VoicePar[nvoice].PextFMoscil; oscedit=new OscilEditor(pars->VoicePar[nv].FMSmp,fmoscil,NULL,NULL,master);} - xywh {700 370 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 + xywh {700 380 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 code0 {if (pars->VoicePar[nvoice].PextFMoscil>=0) o->labelcolor(FL_BLUE);} } Fl_Slider {} { @@ -326,7 +336,7 @@ oscedit=new OscilEditor(pars->VoicePar[nv].FMSmp,fmoscil,NULL,NULL,master);} callback {pars->VoicePar[nvoice].PFMoscilphase=64-(int)o->value(); oscFM->phase=64-(int) o->value(); fmoscil->redraw();} - xywh {665 400 65 10} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 + xywh {645 415 105 15} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {o->value(64-pars->VoicePar[nvoice].PFMoscilphase);} } Fl_Choice {} { @@ -340,7 +350,7 @@ if ((int) o->value() != 0) { changeFMoscilbutton->labelcolor(FL_BLACK); }; voiceFMparametersgroup->redraw();} open - xywh {560 395 75 15} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 + xywh {560 410 75 20} 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+1);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].PextFMoscil+1);} @@ -400,38 +410,38 @@ o->redraw();} } Fl_Group {} { label FREQUENCY - xywh {5 250 525 120} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 265 525 120} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group voicefreqenvgroup { label {ADSynth Voice - Frequency Envelope} open - xywh {10 290 205 70} box FLAT_BOX color 51 align 144 + xywh {10 305 205 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->VoicePar[nvoice].FreqEnvelope);} code1 {if (pars->VoicePar[nvoice].PFreqEnvelopeEnabled==0) o->deactivate();} class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFreqEnvelopeEnabled=(int)o->value(); if (o->value()==0) voicefreqenvgroup->deactivate(); else voicefreqenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {15 295 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {15 310 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFreqEnvelopeEnabled);} } Fl_Group voicefreqlfogroup { label {Frequency LFO } open - xywh {215 290 230 70} box FLAT_BOX color 47 align 144 + xywh {220 305 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->VoicePar[nvoice].FreqLfo);} code1 {if (pars->VoicePar[nvoice].PFreqLfoEnabled==0) o->deactivate();} class LFOUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFreqLfoEnabled=(int)o->value(); if (o->value()==0) voicefreqlfogroup->deactivate(); else voicefreqlfogroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {220 295 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {225 311 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFreqLfoEnabled);} } Fl_Counter {} { @@ -440,7 +450,7 @@ o->redraw();} if (k<0) k+=16; pars->VoicePar[nvoice].PCoarseDetune = k*1024+ pars->VoicePar[nvoice].PCoarseDetune%1024;} - tooltip Octave xywh {470 270 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 + tooltip Octave xywh {470 285 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} @@ -451,7 +461,7 @@ pars->VoicePar[nvoice].PCoarseDetune = k*1024+ if (k<0) k+=1024; pars->VoicePar[nvoice].PCoarseDetune = k+ (pars->VoicePar[nvoice].PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {455 340 60 20} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {455 355 60 20} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} @@ -460,13 +470,13 @@ pars->VoicePar[nvoice].PCoarseDetune = k+ Fl_Slider {} { callback {pars->VoicePar[nvoice].PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {58 272 392 13} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {58 287 392 13} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->VoicePar[nvoice].PDetune-8192);} } Fl_Value_Output detunevalueoutput { label Detune callback {o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());} - xywh {10 272 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 + xywh {10 287 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 code0 {o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());} } Fl_Check_Button {} { @@ -475,13 +485,13 @@ detunevalueoutput->do_callback();} pars->VoicePar[nvoice].Pfixedfreq=x; if (x==0) fixedfreqetdial->deactivate(); else fixedfreqetdial->activate();} - tooltip {Set the voice base frequency to 440Hz} xywh {345 253 55 15} down_box DOWN_BOX labelfont 1 labelsize 11 + tooltip {Set the voice base frequency to 440Hz} xywh {345 268 55 15} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].Pfixedfreq);} } Fl_Dial fixedfreqetdial { label {Eq.T.} callback {pars->VoicePar[nvoice].PfixedfreqET=(int) o->value();} - tooltip {How the frequency varies acording to the keyboard (leftmost for fixed frequency)} xywh {405 255 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1 + tooltip {How the frequency varies acording to the keyboard (leftmost for fixed frequency)} xywh {405 270 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PfixedfreqET);} code1 {if (pars->VoicePar[nvoice].Pfixedfreq==0) o->deactivate();} class WidgetPDial @@ -490,13 +500,13 @@ if (x==0) fixedfreqetdial->deactivate(); 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 + xywh {455 320 70 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 + xywh {80 390 445 145} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 code0 {osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} code1 {int nv=nvoice; if (pars->VoicePar[nvoice].Pextoscil>=0) nv=pars->VoicePar[nvoice].Pextoscil;} code2 {osc->init(pars->VoicePar[nv].OscilSmp,0,pars->VoicePar[nvoice].Poscilphase,master);} @@ -509,19 +519,19 @@ int nv=nvoice; if (pars->VoicePar[nvoice].Pextoscil>=0) nv=pars->VoicePar[nvoice].Pextoscil; oscedit=new OscilEditor(pars->VoicePar[nv].OscilSmp,voiceoscil,NULL,NULL,master);} - xywh {5 475 65 20} box THIN_UP_BOX labelfont 1 labelsize 11 + xywh {5 490 65 20} box THIN_UP_BOX labelfont 1 labelsize 11 code0 {if (pars->VoicePar[nvoice].Pextoscil>=0) o->labelcolor(FL_BLUE);} } Fl_Box {} { label {Voice Oscillator} - xywh {5 375 75 35} labelfont 1 labelsize 12 align 128 + xywh {5 390 75 35} labelfont 1 labelsize 12 align 128 } Fl_Slider {} { label Phase callback {pars->VoicePar[nvoice].Poscilphase=64-(int)o->value(); osc->phase=64-(int) o->value(); voiceoscil->redraw();} - xywh {10 420 65 10} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 + xywh {10 435 65 10} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {o->value(64-pars->VoicePar[nvoice].Poscilphase);} } Fl_Check_Button {} { @@ -543,39 +553,39 @@ if ((int) o->value() != 0) { voiceparametersgroup->redraw(); voiceonbutton->redraw();} open - xywh {5 455 65 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {5 470 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+1);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].Pextoscil+1);} } {} Fl_Group {} {open - xywh {5 525 515 45} box ENGRAVED_BOX + xywh {5 540 515 45} box UP_FRAME } { Fl_Dial {} { label Stereo callback {pars->VoicePar[nvoice].Unison_stereo_spread=(int)o->value();} - tooltip {Stereo Spread} xywh {285 540 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Stereo Spread} xywh {285 555 25 30} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].Unison_stereo_spread);} class WidgetPDial } Fl_Choice {} { label Unison - callback {pars->set_unison_size_index(nvoice,(int) o->value());} open selected - tooltip {Unison size} xywh {10 545 75 20} down_box BORDER_BOX labelfont 1 align 5 textfont 1 textsize 10 + callback {pars->set_unison_size_index(nvoice,(int) o->value());} open + tooltip {Unison size} xywh {10 560 75 20} down_box BORDER_BOX labelfont 1 align 5 textfont 1 textsize 10 code0 {o->add("OFF");char tmp[100];for (int i=1;ADnote_unison_sizes[i];i++){snprintf(tmp,100,"size %d",ADnote_unison_sizes[i]);o->add(tmp);};} code1 {o->value(pars->get_unison_size_index(nvoice));} } {} Fl_Dial {} { label Vibratto callback {pars->VoicePar[nvoice].Unison_vibratto=(int)o->value();} - tooltip Vibratto xywh {340 540 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip Vibratto xywh {340 555 25 30} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].Unison_vibratto);} class WidgetPDial } Fl_Choice {} { label Invert callback {pars->VoicePar[nvoice].Unison_invert_phase=(int) o->value();} open - tooltip {Phase Invert} xywh {445 545 65 15} down_box BORDER_BOX labelsize 11 align 5 textfont 1 textsize 10 + tooltip {Phase Invert} xywh {445 560 65 15} down_box BORDER_BOX labelsize 11 align 5 textfont 1 textsize 10 code0 {o->add("None");o->add("Random");char tmp[100];for (int i=2;i<=5;i++){snprintf(tmp,100,"%d %%",100/i);o->add(tmp);};} code1 {o->value(pars->VoicePar[nvoice].Unison_invert_phase);} } {} @@ -583,38 +593,38 @@ voiceonbutton->redraw();} open label {Frequency Spread} callback {pars->VoicePar[nvoice].Unison_frequency_spread=(int)o->value(); unisonspreadoutput->do_callback();} - tooltip {Frequency Spread of the Unison} xywh {95 547 125 13} type {Horz Knob} box FLAT_BOX labelsize 12 align 1 maximum 127 step 1 value 64 + tooltip {Frequency Spread of the Unison} xywh {95 562 125 13} type {Horz Knob} box NO_BOX labelsize 12 align 1 maximum 127 step 1 value 64 code0 {o->value(pars->VoicePar[nvoice].Unison_frequency_spread);} } Fl_Value_Output unisonspreadoutput { label {(cents)} callback {o->value(pars->getUnisonFrequencySpreadCents(nvoice));} - xywh {225 545 40 15} labelsize 10 align 5 maximum 1000 step 0.1 textfont 1 textsize 10 + xywh {225 560 40 15} labelsize 10 align 5 maximum 1000 step 0.1 textfont 1 textsize 10 code0 {o->value(pars->getUnisonFrequencySpreadCents(nvoice));} } Fl_Dial {} { label {Vib.speed} callback {pars->VoicePar[nvoice].Unison_vibratto_speed=(int)o->value();} - tooltip {Vibratto Average Speed} xywh {390 540 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Vibratto Average Speed} xywh {390 555 25 30} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].Unison_vibratto_speed);} class WidgetPDial } } } Fl_Group {} { - label AMPLITUDE - xywh {5 40 240 210} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label AMPLITUDE open + xywh {5 40 240 220} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider {} { label Vol callback {pars->VoicePar[nvoice].PVolume=(int)o->value();} - tooltip Volume xywh {10 60 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 60 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PVolume);} } Fl_Value_Slider {} { label {V.Sns} callback {pars->VoicePar[nvoice].PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 80 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 80 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PAmpVelocityScaleFunction);} } Fl_Group voiceampenvgroup { @@ -632,28 +642,28 @@ unisonspreadoutput->do_callback();} class WidgetPDial } Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PAmpEnvelopeEnabled=(int)o->value(); if (o->value()==0) voiceampenvgroup->deactivate(); else voiceampenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {15 110 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {15 110 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PAmpEnvelopeEnabled);} } Fl_Group voiceamplfogroup { label {Amplitude LFO } open - xywh {10 175 230 70} box FLAT_BOX color 47 align 144 + xywh {10 180 230 75} box FLAT_BOX color 47 align 144 code0 {o->init(pars->VoicePar[nvoice].AmpLfo);} code1 {if (pars->VoicePar[nvoice].PAmpLfoEnabled==0) o->deactivate();} class LFOUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PAmpLfoEnabled=(int)o->value(); if (o->value()==0) voiceamplfogroup->deactivate(); else voiceamplfogroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {15 180 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {15 185 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PAmpLfoEnabled);} } Fl_Check_Button {} { @@ -664,8 +674,8 @@ o->redraw();} } } Fl_Group voicefiltergroup { - label FILTER - xywh {245 5 285 245} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label FILTER open + xywh {245 5 285 260} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {if (pars->VoicePar[nvoice].PFilterEnabled==0) o->deactivate();} } { Fl_Group {} { @@ -676,34 +686,34 @@ o->redraw();} } {} Fl_Group voicefilterenvgroup { label {ADSynth Voice - Filter Envelope} open - xywh {250 105 275 70} box FLAT_BOX color 51 align 144 + xywh {250 115 275 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->VoicePar[nvoice].FilterEnvelope);} code1 {if (pars->VoicePar[nvoice].PFilterEnvelopeEnabled==0) o->deactivate();} class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFilterEnvelopeEnabled=(int)o->value(); if (o->value()==0) voicefilterenvgroup->deactivate(); else voicefilterenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {255 110 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {255 119 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFilterEnvelopeEnabled);} } Fl_Group voicefilterlfogroup { label {Filter LFO } open - xywh {250 175 230 70} box FLAT_BOX color 47 align 144 + xywh {250 190 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->VoicePar[nvoice].FilterLfo);} code1 {if (pars->VoicePar[nvoice].PFilterLfoEnabled==0) o->deactivate();} class LFOUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFilterLfoEnabled=(int)o->value(); if (o->value()==0) voicefilterlfogroup->deactivate(); else voicefilterlfogroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {255 180 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {255 196 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFilterLfoEnabled);} } } @@ -718,7 +728,7 @@ pars->VoicePar[nvoice].Type=x; if (x==0) voicemodegroup->activate(); else voicemodegroup->deactivate(); noiselabel->do_callback();} - tooltip {Oscillator Type (sound/noise)} xywh {5 500 65 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 + tooltip {Oscillator Type (sound/noise)} xywh {5 515 65 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 code0 {o->value(pars->VoicePar[nvoice].Type);} code1 {if (pars->VoicePar[nvoice].Type!=0) voicemodegroup->deactivate();} } { @@ -737,30 +747,30 @@ noiselabel->do_callback();} xywh {425 10 100 20} down_box DOWN_BOX labelfont 1 labelsize 10 align 148 code0 {o->value(pars->VoicePar[nvoice].Pfilterbypass);} } - Fl_Group {} { + Fl_Group {} {open xywh {115 5 95 35} box THIN_UP_BOX } { Fl_Value_Slider {} { label Delay callback {pars->VoicePar[nvoice].PDelay=(int)o->value();} - tooltip Volume xywh {120 21 84 12} type {Horz Knob} box FLAT_BOX labelsize 11 align 5 maximum 127 step 1 + tooltip Volume xywh {120 21 84 12} type {Horz Knob} box NO_BOX labelsize 11 align 5 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PDelay);} } } Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFilterEnabled=(int)o->value(); if (o->value()==0) voicefiltergroup->deactivate(); else voicefiltergroup->activate(); o->redraw(); bypassfiltercheckbutton->redraw();} - tooltip {Enable Filter} xywh {250 15 60 15} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Enable Filter} xywh {250 15 60 15} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFilterEnabled);} } Fl_Box noiselabel { label {White Noise} callback {if (pars->VoicePar[nvoice].Type==0) o->hide(); else o->show();} - xywh {150 415 300 65} labelfont 1 labelsize 50 labelcolor 7 + xywh {150 430 300 65} labelfont 1 labelsize 50 labelcolor 7 code0 {if (pars->VoicePar[nvoice].Type==0) o->hide(); else o->show();} } } @@ -789,7 +799,8 @@ make_window(); end(); ADnoteVoiceParameters->show();} {} } - Function {~ADvoiceUI()} {} { + Function {~ADvoiceUI()} {open + } { code {ADnoteVoiceParameters->hide(); hide(); if (oscedit!=NULL) { @@ -797,12 +808,18 @@ if (oscedit!=NULL) { }; //delete (ADnoteVoiceParameters);} {} } - decl {int nvoice;} {} - decl {ADnoteParameters *pars;} {} - decl {OscilEditor *oscedit;} {} - decl {Oscilloscope *osc;} {} - decl {Oscilloscope *oscFM;} {} - decl {Master *master;} {} + decl {int nvoice;} {private local + } + decl {ADnoteParameters *pars;} {private local + } + decl {OscilEditor *oscedit;} {private local + } + decl {Oscilloscope *osc;} {private local + } + decl {Oscilloscope *oscFM;} {private local + } + decl {Master *master;} {private local + } } class ADnoteUI {open : {public PresetsUI_} @@ -810,16 +827,16 @@ class ADnoteUI {open : {public PresetsUI_} Function {make_window()} {open private } { Fl_Window ADnoteGlobalParameters { - label {ADsynth Global Parameters of the Instrument} - xywh {462 186 535 405} type Double hide + label {ADsynth Global Parameters of the Instrument} open + xywh {454 296 540 430} type Double visible } { Fl_Group {} { - label FREQUENCY - xywh {5 255 525 115} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label FREQUENCY open + xywh {5 280 530 115} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group freqenv { label {ADSynth Global - Frequency Envelope} open - xywh {10 295 205 70} box FLAT_BOX color 51 align 144 + xywh {10 320 205 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->GlobalPar.FreqEnvelope);} class EnvelopeUI } {} @@ -829,7 +846,7 @@ class ADnoteUI {open : {public PresetsUI_} if (k<0) k+=16; pars->GlobalPar.PCoarseDetune = k*1024+ pars->GlobalPar.PCoarseDetune%1024;} - tooltip Octave xywh {450 275 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 + tooltip Octave xywh {455 300 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 code0 {int k=pars->GlobalPar.PCoarseDetune/1024;if (k>=8) k-=16;} code2 {o->value(k);} } @@ -839,34 +856,34 @@ pars->GlobalPar.PCoarseDetune = k*1024+ if (k<0) k+=1024; pars->GlobalPar.PCoarseDetune = k+ (pars->GlobalPar.PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {455 345 60 20} labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {460 370 60 20} type Simple labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->GlobalPar.PCoarseDetune%1024;if (k>=512) k-=1024;} code2 {o->value(k);} code3 {o->lstep(10);} } Fl_Group freqlfo { label {Frequency LFO } open - xywh {215 295 230 70} box FLAT_BOX color 47 align 144 + xywh {220 320 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->GlobalPar.FreqLfo);} class LFOUI } {} Fl_Slider freq { callback {pars->GlobalPar.PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {60 275 385 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {60 300 385 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->GlobalPar.PDetune-8192);} } Fl_Value_Output detunevalueoutput { label Detune callback {o->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));} - xywh {12 275 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 + xywh {12 300 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 detunetype { 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 + xywh {455 340 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);} } {} @@ -879,25 +896,25 @@ pars->getBandwidthDetuneMultiplier(); for (int i=0;i<NUM_VOICES;i++){ voicelistitem[i]->refreshlist(); };} - tooltip {Bandwidth - how the relative fine detune of the voice are changed} xywh {500 270 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Bandwidth - how the relative fine detune of the voice are changed} xywh {505 295 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PBandwidth);} class WidgetPDial } } Fl_Group {} { label AMPLITUDE - xywh {5 5 240 250} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 5 240 260} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider volume { label Vol callback {pars->GlobalPar.PVolume=(int)o->value();} - tooltip Volume xywh {10 30 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 30 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PVolume);} } Fl_Value_Slider vsns { label {V.Sns} callback {pars->GlobalPar.PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 50 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 50 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PAmpVelocityScaleFunction);} } Fl_Dial pan { @@ -910,28 +927,28 @@ for (int i=0;i<NUM_VOICES;i++){ Fl_Dial pstr { label {P.Str.} callback {pars->GlobalPar.PPunchStrength=(int) o->value();} - tooltip {Punch Strength} xywh {125 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Strength} xywh {125 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchStrength);} class WidgetPDial } Fl_Dial pt { label {P.t.} callback {pars->GlobalPar.PPunchTime=(int) o->value();} - tooltip {Punch Time (duration)} xywh {155 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Time (duration)} xywh {155 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchTime);} class WidgetPDial } Fl_Dial pstc { label {P.Stc.} callback {pars->GlobalPar.PPunchStretch=(int) o->value();} - tooltip {Punch Stretch} xywh {185 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Stretch} xywh {185 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchStretch);} class WidgetPDial } Fl_Dial pvel { label {P.Vel.} callback {pars->GlobalPar.PPunchVelocitySensing=(int) o->value();} - tooltip {Punch Velocity Sensing} xywh {215 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Velocity Sensing} xywh {215 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchVelocitySensing);} class WidgetPDial } @@ -943,36 +960,36 @@ for (int i=0;i<NUM_VOICES;i++){ } {} Fl_Group amplfo { label {Amplitude LFO } open - xywh {10 145 230 70} box FLAT_BOX color 47 align 144 + xywh {10 150 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->GlobalPar.AmpLfo);} class LFOUI } {} Fl_Check_Button rndgrp { label {Rnd Grp} callback {pars->GlobalPar.Hrandgrouping=(int) o->value();} - tooltip {How the Harmonic Amplitude is applied to voices that use the same oscillator} xywh {70 225 40 25} down_box DOWN_BOX labelsize 10 align 148 + tooltip {How the Harmonic Amplitude is applied to voices that use the same oscillator} xywh {70 235 40 25} down_box DOWN_BOX labelsize 10 align 148 code0 {o->value(pars->GlobalPar.Hrandgrouping);} } } Fl_Group {} { - label FILTER - xywh {245 5 285 250} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label FILTER open selected + xywh {250 5 285 265} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group filterenv { label {ADSynth Global - Filter Envelope} open - xywh {250 110 275 70} box FLAT_BOX color 51 align 144 + xywh {255 118 275 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->GlobalPar.FilterEnvelope);} class EnvelopeUI } {} Fl_Group filterlfo { label {Filter LFO} open - xywh {250 180 230 70} box FLAT_BOX color 47 align 144 + xywh {255 195 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->GlobalPar.FilterLfo);} class LFOUI } {} Fl_Group filterui { label {ADsynth Global - Filter} open - xywh {250 35 275 75} box FLAT_BOX color 50 align 144 + xywh {255 35 275 75} box FLAT_BOX color 50 align 144 code0 {o->init(pars->GlobalPar.GlobalFilter,&pars->GlobalPar.PFilterVelocityScale,&pars->GlobalPar.PFilterVelocityScaleFunction);} class FilterUI } {} @@ -980,7 +997,7 @@ for (int i=0;i<NUM_VOICES;i++){ Fl_Check_Button stereo { label Stereo callback {pars->GlobalPar.PStereo=(int) o->value();} - xywh {5 220 65 35} box ENGRAVED_BOX down_box DOWN_BOX labelfont 1 labelsize 11 + xywh {5 230 65 35} down_box DOWN_BOX labelsize 11 code0 {o->value(pars->GlobalPar.PStereo);} } Fl_Button {} { @@ -989,41 +1006,41 @@ for (int i=0;i<NUM_VOICES;i++){ voicelistitem[i]->refreshlist(); } ADnoteVoiceList->show();} - xywh {180 375 125 25} + xywh {180 400 125 25} labelsize 12 } Fl_Button {} { label {Show Voice Parameters} callback {ADnoteVoice->show();} - xywh {5 375 170 25} labelfont 1 labelsize 12 + xywh {5 400 170 25} labelsize 12 } Fl_Button {} { label Close callback {ADnoteGlobalParameters->hide();} - xywh {470 375 60 25} box THIN_UP_BOX + xywh {475 400 60 25} box THIN_UP_BOX } Fl_Button {} { label Resonance callback {resui->resonancewindow->redraw(); resui->resonancewindow->show();} - tooltip Resonance xywh {309 375 86 25} box THIN_UP_BOX + tooltip Resonance xywh {309 400 86 25} box THIN_UP_BOX labelsize 12 } Fl_Button {} { label C callback {presetsui->copy(pars);} - xywh {405 380 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {405 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {presetsui->paste(pars,this);} - xywh {435 380 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {435 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } Fl_Window ADnoteVoice { - label {ADsynth Voice Parameters} - xywh {152 271 765 620} type Double visible + label {ADsynth Voice Parameters} open + xywh {907 477 765 620} type Double visible } { Fl_Group advoice { - xywh {0 0 760 575} box BORDER_BOX + xywh {0 0 765 585} code0 {o->init(pars,nvoice,master);} code1 {o->show();} class ADvoiceUI @@ -1031,7 +1048,7 @@ resui->resonancewindow->show();} Fl_Button {} { label {Close Window} callback {ADnoteVoice->hide();} - xywh {300 585 195 25} box THIN_UP_BOX labelfont 1 + xywh {305 590 195 25} box THIN_UP_BOX labelfont 1 } Fl_Counter currentvoicecounter { label {Current Voice} @@ -1044,18 +1061,18 @@ ADnoteVoice->add(advoice); advoice->init(pars,nvoice,master); advoice->show(); ADnoteVoice->redraw();} - xywh {5 585 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 2 step 1 value 1 textfont 1 textsize 13 + xywh {10 590 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 2 step 1 value 1 textfont 1 textsize 13 code0 {o->bounds(1,NUM_VOICES);} } Fl_Button {} { label C callback {presetsui->copy(pars,nvoice);} - xywh {700 590 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {705 595 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {presetsui->paste(pars,this,nvoice);} - xywh {730 590 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {735 595 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } Fl_Window ADnoteVoiceList { @@ -1153,9 +1170,14 @@ for (int i=0;i<NUM_VOICES;i++) voicelistitem[i]->refreshlist(); resui->refresh(); currentvoicecounter->do_callback();} {} } - decl {ADnoteParameters *pars;} {} - decl {ResonanceUI *resui;} {} - decl {Master *master;} {} - decl {int nvoice;} {} - decl {ADvoicelistitem *voicelistitem[NUM_VOICES];} {} + decl {ADnoteParameters *pars;} {private local + } + decl {ResonanceUI *resui;} {private local + } + decl {Master *master;} {private local + } + decl {int nvoice;} {private local + } + decl {ADvoicelistitem *voicelistitem[NUM_VOICES];} {private local + } } diff --git a/src/UI/BankUI.fl b/src/UI/BankUI.fl @@ -1,39 +1,41 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <string.h>} {public +decl {\#include <string.h>} {public local } -decl {\#include <FL/Fl_Button.H>} {public +decl {\#include <FL/Fl_Button.H>} {public local } -decl {\#include <FL/Fl_File_Chooser.H>} {public +decl {\#include <FL/Fl_File_Chooser.H>} {public local } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local } -decl {\#include "../Misc/Part.h"} {selected public +decl {\#include "../Misc/Part.h"} {public local } -decl {\#include "../Misc/Bank.h"} {public +decl {\#include "../Misc/Bank.h"} {public local } -decl {\#include "../Misc/Config.h"} {public +decl {\#include "../Misc/Config.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "../Misc/Util.h"} {public local } class BankProcess_ {} { @@ -41,13 +43,14 @@ class BankProcess_ {} { } { code {;} {} } - decl {Bank *bank;} {public + decl {Bank *bank;} {public local } } -class BankSlot {: {public Fl_Button,BankProcess_} +class BankSlot {open : {public Fl_Button,BankProcess_} } { - Function {BankSlot(int x,int y, int w, int h, const char *label=0):Fl_Button(x,y,w,h,label)} {} { + Function {BankSlot(int x,int y, int w, int h, const char *label=0):Fl_Button(x,y,w,h,label)} {open + } { code {what=NULL; whatslot=NULL; nslot=0; @@ -98,19 +101,23 @@ if (*nselected==nslot) copy_label(bank->getnamenumbered(nslot).c_str());} {} } - decl {int *what,*whatslot,nslot,highlight, *nselected;} {} - decl {void (BankProcess_:: *fnc)(void);} {} - decl {BankProcess_ *bp;} {} + decl {int *what,*whatslot,nslot,highlight, *nselected;} {private local + } + decl {void (BankProcess_:: *fnc)(void);} {private local + } + decl {BankProcess_ *bp;} {private local + } } -class BankUI {: {public BankProcess_} +class BankUI {open : {public BankProcess_} } { - Function {make_window()} {} { + Function {make_window()} {open + } { Fl_Window bankuiwindow { - label Bank - xywh {5 64 785 575} type Double hide + label Bank selected + xywh {807 447 785 575} type Double code0 {o->label(bank->bankfiletitle.c_str());} - code1 {if (bank->bankfiletitle.empty()) o->label ("Choose a bank from the bank list on the left (or go to settings if to configure the bank location) or choose 'New Bank...' to make a new bank.");} + code1 {if (bank->bankfiletitle.empty()) o->label ("Choose a bank from the bank list on the left (or go to settings if to configure the bank location) or choose 'New Bank...' to make a new bank.");} visible } { Fl_Button {} { label Close @@ -121,27 +128,27 @@ class BankUI {: {public BankProcess_} xywh {5 34 772 491} box ENGRAVED_FRAME } { Fl_Pack {} { - xywh {10 39 150 481} box BORDER_BOX + xywh {10 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=0;i<32;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {163 39 150 481} box BORDER_BOX + xywh {163 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=32;i<64;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {316 39 150 481} box BORDER_BOX + xywh {316 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=64;i<96;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {469 39 150 481} box BORDER_BOX + xywh {469 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=96;i<128;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {622 39 150 481} box BORDER_BOX + xywh {622 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=128;i<160;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} @@ -153,28 +160,28 @@ class BankUI {: {public BankProcess_} label WRITE callback {if (o->value()>0.5) mode=2; removeselection();} - xywh {116 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 1 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {116 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 1 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {if (bank->locked()) o->deactivate();} } Fl_Light_Button readbutton { label READ callback {if (o->value()>0.5) mode=1; removeselection();} - xywh {11 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 101 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {11 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 101 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {o->value(1);} } Fl_Light_Button clearbutton { label CLEAR callback {if (o->value()>0.5) mode=3; removeselection();} - xywh {221 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 0 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {221 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 0 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {if (bank->locked()) o->deactivate();} } Fl_Light_Button swapbutton { label SWAP callback {if (o->value()>0.5) mode=4; removeselection();} - xywh {325 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 227 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {325 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 227 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {if (bank->locked()) o->deactivate();} } } @@ -191,7 +198,7 @@ int result=bank->newbank(dirname); if (result!=0) fl_alert("Error: Could not make a new bank (directory).."); refreshmainwindow();} - xywh {685 5 93 25} box PLASTIC_UP_BOX labelfont 1 labelsize 11 align 128 + xywh {685 5 93 25} labelfont 1 labelsize 11 align 128 } Fl_Check_Button {} { label {auto close} @@ -346,8 +353,7 @@ for (unsigned int i=0;i<bank->banks.size();i++) { banklist->add(bank->banks[i].name.c_str()); } if (banklist->size() == 0) - banklist->add(" "); -} {} + banklist->add(" ");} {} } Function {simplesetmode(bool beginnerui)} {} { code {readbutton->value(1); @@ -356,11 +362,16 @@ removeselection(); if (beginnerui) modeselect->hide(); else modeselect->show();} {} } - decl {BankSlot *bs[BANK_SIZE];} {} - decl {int slot,what;//"what"=what button is pressed} {} - decl {int mode,*npart,nselected;} {} - decl {Master *master;} {} - decl {void (BankProcess_::* fnc)(void);} {} - decl {Fl_Valuator *cbwig;} {public + decl {BankSlot *bs[BANK_SIZE];} {private local + } + decl {int slot,what;//"what"=what button is pressed} {private local + } + decl {int mode,*npart,nselected;} {private local + } + decl {Master *master;} {private local + } + decl {void (BankProcess_::* fnc)(void);} {private local + } + decl {Fl_Valuator *cbwig;} {public local } } diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt @@ -22,6 +22,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) set_source_files_properties(UI/MasterUI.h PROPERTIES GENERATED 1) fltk_wrap_ui(zynaddsubfx_gui ${UI_fl_files}) +add_definitions(-DPIXMAP_PATH="${CMAKE_INSTALL_PREFIX}/share/zynaddsubfx/pixmaps/") + if(LibloEnable) set(zynaddsubfx_gui_FLTK_UI_SRCS ${zynaddsubfx_gui_FLTK_UI_SRCS} NSM.C NSM/Client.C) endif() @@ -33,4 +35,10 @@ add_library(zynaddsubfx_gui STATIC WidgetPDial.cpp ) -target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES}) +if(NtkGui) + target_link_libraries(zynaddsubfx_gui ${NTK_LIBRARIES}) +endif(NtkGui) + +if(FltkGui) + target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES}) +endif(FltkGui) diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl @@ -1,39 +1,44 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0107 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} + +decl {//License: GNU GPL version 2 or later} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {\#include <stdlib.h>} {public local +} -decl {\#include <stdlib.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <string.h>} {public local } -decl {\#include <string.h>} {public +decl {\#include "../globals.h"} {public local } -decl {\#include "../globals.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "WidgetPDial.h"} {public +decl {\#include "EnvelopeUI.h"} {public local } -decl {\#include "EnvelopeUI.h"} {public +decl {\#include "FilterUI.h"} {public local } -decl {\#include "FilterUI.h"} {public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "../Effects/EffectMgr.h"} {public local } -decl {\#include "../Effects/EffectMgr.h"} {public +decl {\#include "PresetsUI.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "common.H"} {public local } class EQGraph {: {public Fl_Box} @@ -65,16 +70,17 @@ if ((freqx>0.0)&&(freqx<1.0)) x()+(int) (freqx*w()),y()+h());} {} } Function {draw()} {} { - code {int ox=x(),oy=y(),lx=w(),ly=h(),i,iy,oiy; + code {int ox=x(),oy=y(),lx=w(),ly=h(),i; + double iy,oiy; float freqx; -if (active_r()) fl_color(0,70,150); - else fl_color(80,120,160); +if (active_r()) fl_color(fl_darker(FL_GRAY)); + else fl_color(FL_GRAY); fl_rectf(ox,oy,lx,ly); //draw the lines -fl_color(FL_GRAY); +fl_color(fl_lighter( FL_GRAY)); fl_line_style(FL_SOLID); fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2); @@ -115,19 +121,23 @@ for (i=1;i<GY;i++){ //draw the frequency response if (active_r()) fl_color(FL_YELLOW); else fl_color(200,200,80); -fl_line_style(FL_SOLID); +fl_line_style(FL_SOLID,2); +fl_color( fl_color_add_alpha( fl_color(), 127 ) ); oiy=getresponse(ly,getfreqx(0.0)); +fl_begin_line(); for (i=1;i<lx;i++){ float frq=getfreqx(i/(float) lx); if (frq>synth->samplerate/2) break; iy=getresponse(ly,frq); if ((oiy>=0) && (oiy<ly) && (iy>=0) && (iy<ly) ) - fl_line(ox+i-1,oy+ly-oiy,ox+i,oy+ly-iy); + fl_vertex(ox+i,oy+ly-iy); oiy=iy; -};} {} +}; +fl_end_line(); +fl_line_style(FL_SOLID,0);} {} } - Function {getresponse(int maxy,float freq)} {return_type int + Function {getresponse(int maxy,float freq)} {return_type double } { code {float dbresp=eff->getEQfreqresponse(freq); int idbresp=(int) ((dbresp/maxdB+1.0)*maxy/2.0); @@ -148,14 +158,17 @@ return(20.0*pow((float)1000.0,x));} {} code {if (freq<0.00001) freq=0.00001; return(log(freq/20.0)/log(1000.0));} {} } - decl {int oldx,oldy;} {} - decl {float khzval;} {public + decl {int oldx,oldy;} {private local + } + decl {float khzval;} {public local + } + decl {EffectMgr *eff;} {private local + } + decl {int maxdB;} {private local } - decl {EffectMgr *eff;} {} - decl {int maxdB;} {} } -class EffUI {: {public Fl_Group,public PresetsUI_} +class EffUI {open : {public Fl_Group,public PresetsUI_} } { Function {EffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {eff=NULL; @@ -177,26 +190,23 @@ if (filterwindow!=NULL){ delete(filterwindow); };} {} } - Function {make_null_window()} {} { + Function {make_null_window()} {open + } { Fl_Window effnullwindow { - xywh {216 539 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group - } { - Fl_Text_Display {} { - label {No Effect} - xywh {120 35 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 labelcolor 43 align 8 - } - } + label {No Effect} + xywh {857 824 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 16 + code0 {set_module_parameters(o);} + class Fl_Group visible + } {} } - Function {make_reverb_window()} {} { + Function {make_reverb_window()} {open + } { Fl_Window effreverbwindow { - xywh {343 337 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Reverb + xywh {353 452 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label {Reverb } - xywh {275 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Choice revp { label Preset callback {eff->changepreset((int)o->value()); @@ -349,10 +359,13 @@ eff->seteffectpar(11,x);} } } } - Function {make_echo_window()} {} { + Function {make_echo_window()} {open + } { Fl_Window effechowindow { - xywh {318 364 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Echo + xywh {1101 647 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice echop { label Preset @@ -397,10 +410,6 @@ refresh(eff);} xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Echo - xywh {295 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial echop0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -445,10 +454,13 @@ refresh(eff);} } } } - Function {make_chorus_window()} {} { + Function {make_chorus_window()} {open + } { Fl_Window effchoruswindow { - xywh {372 287 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Chorus open + xywh {628 830 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice chorusp { label Preset @@ -497,10 +509,6 @@ refresh(eff);} xywh {110 110 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Chorus - xywh {265 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial chorusp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -564,7 +572,7 @@ refresh(eff);} Fl_Check_Button chorusp11 { label Substract callback {eff->seteffectpar(11,(int) o->value());} - tooltip {inverts the output} xywh {185 10 70 20} box THIN_UP_BOX down_box DOWN_BOX color 230 labelfont 1 labelsize 10 + tooltip {inverts the output} xywh {185 10 70 20} box THIN_UP_BOX down_box DOWN_BOX color 51 labelsize 10 } Fl_Choice chorusp4 { label {LFO type} @@ -582,10 +590,13 @@ refresh(eff);} } } } - Function {make_phaser_window()} {} { + Function {make_phaser_window()} {open + } { Fl_Window effphaserwindow { - xywh {75 25 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Phaser selected + xywh {77 48 380 95} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice phaserp { label Preset @@ -638,14 +649,10 @@ refresh(eff);} xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 } MenuItem {} { - label {APhaser 6} selected + label {APhaser 6} xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Phaser - xywh {275 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial phaserp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -743,10 +750,13 @@ refresh(eff);} } } } - Function {make_alienwah_window()} {} { + Function {make_alienwah_window()} {open + } { Fl_Window effalienwahwindow { - xywh {538 250 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label AlienWah + xywh {715 462 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice awp { label Preset @@ -771,10 +781,6 @@ refresh(eff);} xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label AlienWah - xywh {245 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial awp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -851,10 +857,13 @@ refresh(eff);} } } } - Function {make_distorsion_window()} {} { + Function {make_distorsion_window()} {open + } { Fl_Window effdistorsionwindow { - xywh {409 143 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Distortion + xywh {695 261 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice distp { label Preset @@ -887,10 +896,6 @@ refresh(eff);} xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Distortion - xywh {230 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial distp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1012,15 +1017,14 @@ refresh(eff);} } } } - Function {make_eq_window()} {} { + Function {make_eq_window()} {open + } { Fl_Window effeqwindow { - xywh {258 307 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label EQ open + xywh {668 658 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label EQ - xywh {320 10 15 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial eqp0 { label Gain callback {eff->seteffectpar(0,(int) o->value()); @@ -1143,16 +1147,19 @@ eqgraph->redraw();} } } Fl_Box eqgraph { - xywh {45 10 190 75} box BORDER_BOX color 178 + xywh {45 10 190 75} box BORDER_BOX color 50 code0 {o->init(eff);} class EQGraph } } } - Function {make_dynamicfilter_window()} {} { + Function {make_dynamicfilter_window()} {open + } { Fl_Window effdynamicfilterwindow { - xywh {570 56 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label DynFilter open + xywh {808 520 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice dfp { label Preset @@ -1181,10 +1188,6 @@ refresh(eff);} xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label DynFilter - xywh {245 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial dfp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1238,10 +1241,10 @@ refresh(eff);} Fl_Button {} { label Filter callback {filterwindow->show();} - xywh {115 10 55 25} box PLASTIC_THIN_UP_BOX + xywh {115 10 55 25} box THIN_UP_BOX } Fl_Group {} { - xywh {270 40 105 45} box BORDER_BOX color 181 + xywh {270 40 105 45} box UP_FRAME color 51 } { Fl_Dial dfp7 { label {A.S.} @@ -1263,10 +1266,12 @@ refresh(eff);} } } } - Function {make_filter_window()} {} { + Function {make_filter_window()} {open + } { Fl_Window filterwindow { label {Filter Parameters for DynFilter Eff.} - xywh {212 170 290 110} type Double hide + xywh {1454 437 290 110} type Double + code0 {set_module_parameters(o);} visible } { Fl_Group {} { label {DynFilter effect - Filter} @@ -1468,11 +1473,13 @@ this->show();} {} } { code {refresh(eff);} {} } - decl {EffectMgr *eff;} {} - decl {int eqband;} {} + decl {EffectMgr *eff;} {private local + } + decl {int eqband;} {private local + } } -class SimpleEffUI {: {public Fl_Group,public PresetsUI_} +class SimpleEffUI {open : {public Fl_Group,public PresetsUI_} } { Function {SimpleEffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {eff=NULL;} {} @@ -1488,32 +1495,29 @@ effdistorsionwindow->hide();//delete (effdistorsionwindow); effeqwindow->hide();//delete (effeqwindow); effdynamicfilterwindow->hide();//delete (effdynamicfilterwindow);} {} } - Function {make_null_window()} {} { + Function {make_null_window()} {open + } { Fl_Window effnullwindow { - xywh {539 150 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group - } { - Fl_Text_Display {} { - label {No Effect} - xywh {25 35 35 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 labelcolor 43 align 8 - } - } + label {No Effect} open + xywh {1073 571 230 95} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 16 + code0 {set_module_parameters(o);} + class Fl_Group visible + } {} } - Function {make_reverb_window()} {} { + Function {make_reverb_window()} {open + } { Fl_Window effreverbwindow { - xywh {398 298 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Reverb open + xywh {1183 279 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label {Reverb } - xywh {115 10 20 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Choice revp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Cathedral 1} @@ -1594,16 +1598,19 @@ refresh(eff);} } } } - Function {make_echo_window()} {} { + Function {make_echo_window()} {open + } { Fl_Window effechowindow { - xywh {243 350 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Echo open + xywh {404 639 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice echop { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {11 15 95 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {11 15 95 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Echo 1} @@ -1642,10 +1649,6 @@ refresh(eff);} xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Echo - xywh {145 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial echop0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1666,16 +1669,19 @@ refresh(eff);} } } } - Function {make_chorus_window()} {} { + Function {make_chorus_window()} {open + } { Fl_Window effchoruswindow { - xywh {234 353 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Chorus open + xywh {680 647 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice chorusp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Chorus 1} @@ -1718,10 +1724,6 @@ refresh(eff);} xywh {110 110 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Chorus - xywh {120 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial chorusp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1760,16 +1762,19 @@ refresh(eff);} } } } - Function {make_phaser_window()} {} { + Function {make_phaser_window()} {open + } { Fl_Window effphaserwindow { - xywh {661 430 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Phaser open + xywh {1485 647 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice phaserp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Phaser 1} @@ -1796,10 +1801,6 @@ refresh(eff);} xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Phaser - xywh {125 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial phaserp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1838,16 +1839,19 @@ refresh(eff);} } } } - Function {make_alienwah_window()} {} { + Function {make_alienwah_window()} {open + } { Fl_Window effalienwahwindow { - xywh {367 170 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label AlienWah open + xywh {379 296 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice awp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Alienwah 1} @@ -1866,10 +1870,6 @@ refresh(eff);} xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label AlienWah - xywh {100 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial awp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1896,16 +1896,19 @@ refresh(eff);} } } } - Function {make_distorsion_window()} {} { + Function {make_distorsion_window()} {open + } { Fl_Window effdistorsionwindow { - xywh {353 412 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Distortion open + xywh {456 797 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice distp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {11 15 95 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {11 15 95 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Overdrive 1} @@ -1932,10 +1935,6 @@ refresh(eff);} xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label Distortion - xywh {110 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 8 - } Fl_Dial distp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -2024,15 +2023,14 @@ refresh(eff);} } } } - Function {make_eq_window()} {} { + Function {make_eq_window()} {open + } { Fl_Window effeqwindow { - xywh {318 309 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label EQ open + xywh {1366 827 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label EQ - xywh {170 5 15 25} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Counter bandcounter { label Band callback {eqband=(int) o->value(); @@ -2062,7 +2060,7 @@ stagescounter->value(dbl);} code0 {o->bounds(0,MAX_EQ_BANDS-1);} } Fl_Group bandgroup { - xywh {5 5 75 85} box ENGRAVED_FRAME + xywh {5 5 75 85} box UP_FRAME code0 {if (eff->geteffectpar(10)==0) o->deactivate();} } { Fl_Dial freqdial { @@ -2148,22 +2146,25 @@ eqgraph->redraw();} } } Fl_Box eqgraph { - xywh {85 35 140 55} box BORDER_BOX color 178 + xywh {85 35 140 55} box BORDER_BOX color 50 code0 {o->init(eff);} class EQGraph } } } - Function {make_dynamicfilter_window()} {} { + Function {make_dynamicfilter_window()} {open + } { Fl_Window effdynamicfilterwindow { - xywh {475 471 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label DynFilter open + xywh {1347 465 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice dfp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label WahWah @@ -2186,10 +2187,6 @@ refresh(eff);} xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 } } - Fl_Text_Display {} { - label DynFilter - xywh {100 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial dfp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -2209,7 +2206,7 @@ refresh(eff);} class WidgetPDial } Fl_Group {} { - xywh {115 40 65 45} box BORDER_BOX color 181 + xywh {115 40 65 45} box UP_FRAME } { Fl_Dial dfp7 { label {A.S.} @@ -2226,7 +2223,8 @@ refresh(eff);} } } } - Function {init(EffectMgr *eff_)} {} { + Function {init(EffectMgr *eff_)} {open + } { code {eff=eff_; make_null_window(); @@ -2356,6 +2354,8 @@ this->show();} {} Function {refresh()} {} { code {refresh(eff);} {} } - decl {EffectMgr *eff;} {} - decl {int eqband;} {} + decl {EffectMgr *eff;} {private local + } + decl {int eqband;} {private local + } } diff --git a/src/UI/EnvelopeUI.fl b/src/UI/EnvelopeUI.fl @@ -1,39 +1,44 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0106 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include "../globals.h"} {public +decl {\#include "../globals.h"} {public local } -decl {\#include <FL/Fl_Group.H>} {public +decl {\#include <FL/Fl_Group.H>} {public local } -decl {\#include "../Params/EnvelopeParams.h"} {public +decl {\#include "../Params/EnvelopeParams.h"} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/fl_draw.H>} {public +decl {\#include <FL/fl_draw.H>} {public local } -decl {\#include <FL/fl_ask.H>} {public +decl {\#include <FL/fl_ask.H>} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local +} + +decl {\#include "common.H"} {public local } class EnvelopeFreeEdit {: {public Fl_Box} @@ -187,15 +192,19 @@ if ((event==FL_DRAG)&&(currentpoint>=0)){ return(1);} {} } - decl {Fl_Box *pair;} {} - decl {EnvelopeParams *env;} {} - decl {int oldx,oldy;} {} - decl {int currentpoint,cpx,cpdt;} {} - decl {int lastpoint;} {public + decl {Fl_Box *pair;} {private local + } + decl {EnvelopeParams *env;} {private local + } + decl {int oldx,oldy;} {private local + } + decl {int currentpoint,cpx,cpdt;} {private local + } + decl {int lastpoint;} {public local } } -class EnvelopeUI {: {public Fl_Group,PresetsUI_} +class EnvelopeUI {open : {public Fl_Group,PresetsUI_} } { Function {EnvelopeUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {env=NULL; @@ -212,10 +221,11 @@ hide(); freemodeeditwindow->hide(); delete (freemodeeditwindow);} {} } - Function {make_freemode_edit_window()} {} { + Function {make_freemode_edit_window()} {open + } { Fl_Window freemodeeditwindow { label Envelope - xywh {60 308 575 180} type Double hide + xywh {948 246 575 180} type Double visible } { Fl_Box freeedit { label Envelope @@ -248,7 +258,7 @@ envfree->redraw(); sustaincounter->value(env->Penvsustain); sustaincounter->maximum(env->Penvpoints-2);} - xywh {115 155 80 20} box THIN_UP_BOX + xywh {115 155 80 20} box THIN_UP_BOX labelsize 11 code0 {if (env->Pfreemode==0) o->hide();} } Fl_Button deletepoint { @@ -274,7 +284,7 @@ envfree->redraw(); sustaincounter->value(env->Penvsustain); sustaincounter->maximum(env->Penvpoints-2);} - xywh {200 155 80 20} box THIN_UP_BOX + xywh {200 155 80 20} box THIN_UP_BOX labelsize 11 code0 {if (env->Pfreemode==0) o->hide();} } Fl_Light_Button freemodebutton { @@ -283,7 +293,7 @@ sustaincounter->maximum(env->Penvpoints-2);} freeedit->lastpoint=-1; freeedit->redraw();} - tooltip {Enable or disable the freemode} xywh {10 155 95 25} box PLASTIC_UP_BOX + tooltip {Enable or disable the freemode} xywh {10 155 95 20} labelsize 11 } Fl_Check_Button forcedreleasecheck { label frcR @@ -303,7 +313,7 @@ freeedit->redraw();} Fl_Button {} { label Close callback {freemodeeditwindow->hide();} - xywh {510 155 60 25} box THIN_UP_BOX + xywh {510 155 60 20} box THIN_UP_BOX } Fl_Check_Button linearenvelopecheck { label L @@ -334,14 +344,16 @@ envfree->redraw();} } } } - Function {make_ADSR_window()} {} { - Fl_Window envADSR { - xywh {108 336 205 70} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_ADSR_window()} {open + } { + Fl_Window envADSR {open + xywh {341 765 205 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group {} { label {Amplitude Envelope} - xywh {0 0 205 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 205 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e1adt { label {A.dt} @@ -391,7 +403,7 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - tooltip {Envelope window} xywh {185 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + tooltip {Envelope window} xywh {185 5 15 15} labelfont 1 labelsize 10 } Fl_Check_Button e1linearenvelope { label L @@ -412,14 +424,16 @@ freeedit->redraw();} } } } - Function {make_ASR_window()} {} { - Fl_Window envASR { - xywh {71 320 210 70} type Double hide - class Fl_Group + Function {make_ASR_window()} {open + } { + Fl_Window envASR {open + xywh {645 644 210 70} type Double + class Fl_Group visible } { Fl_Group {} { label {Frequency Envelope} - xywh {0 0 210 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 210 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e2aval { label {A.val} @@ -480,18 +494,20 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - tooltip {Envelope window} xywh {190 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + tooltip {Envelope window} xywh {190 5 15 15} labelfont 1 labelsize 10 } } } - Function {make_ADSRfilter_window()} {} { - Fl_Window envADSRfilter { - xywh {87 143 275 70} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_ADSRfilter_window()} {open + } { + Fl_Window envADSRfilter {open selected + xywh {624 546 275 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group {} { label {Filter Envelope} - xywh {0 0 275 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 275 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e3aval { label {A.val} @@ -557,7 +573,7 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - xywh {255 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + xywh {255 5 15 15} labelfont 1 labelsize 10 } Fl_Button {} { label C @@ -572,14 +588,17 @@ freeedit->redraw();} } } } - Function {make_ASRbw_window()} {} { - Fl_Window envASRbw { - xywh {224 539 210 70} type Double hide - class Fl_Group + Function {make_ASRbw_window()} {open + } { + Fl_Window envASRbw {open + xywh {359 619 210 71} type Double + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Group {} { label {BandWidth Envelope} - xywh {0 0 210 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 210 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e4aval { label {A.val} @@ -640,18 +659,21 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - xywh {190 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + xywh {190 5 15 15} labelfont 1 labelsize 10 } } } - Function {make_free_window()} {} { - Fl_Window envfree { - xywh {373 413 205 70} type Double color 50 labelfont 1 hide resizable - class Fl_Group + Function {make_free_window()} {open + } { + Fl_Window envfree {open + xywh {373 413 205 70} type Double color 50 labelfont 1 resizable + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Group envfreegroup { label {Amplitude Envelope} - xywh {0 0 205 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 resizable + xywh {0 0 205 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 resizable + code0 {set_module_parameters(o);} } { Fl_Box freeeditsmall { label Envelope @@ -663,7 +685,7 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - xywh {185 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + xywh {185 5 15 15} labelfont 1 labelsize 10 } Fl_Button {} { label C @@ -678,7 +700,8 @@ freeedit->redraw();} } } } - Function {init(EnvelopeParams *env_)} {} { + Function {init(EnvelopeParams *env_)} {open + } { code {env=env_; make_ADSR_window(); make_ASR_window(); @@ -743,10 +766,10 @@ if (env->Pfreemode!=0) { addpoint->hide(); deletepoint->hide(); forcedreleasecheck->hide(); -};} {selected - } +};} {} } - Function {refresh()} {} { + Function {refresh()} {open + } { code {freemodebutton->value(env->Pfreemode); sustaincounter->value(env->Penvsustain); @@ -846,6 +869,8 @@ envwindow->resize(this->x(),this->y(),this->w(),this->h()); envwindow->show();} {} } - decl {EnvelopeParams *env;} {} - decl {Fl_Group *envwindow;} {} + decl {EnvelopeParams *env;} {private local + } + decl {Fl_Group *envwindow;} {private local + } } diff --git a/src/UI/FilterUI.fl b/src/UI/FilterUI.fl @@ -1,44 +1,50 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include <cmath>} {} +decl {\#include <cmath>} {private local +} + +decl {\#include <stdio.h>} {private global +} -decl {\#include <stdio.h>} {global +decl {\#include <stdlib.h>} {private global } -decl {\#include <stdlib.h>} {selected global +decl {\#include "../globals.h"} {public local } -decl {\#include "../globals.h"} {public +decl {\#include <FL/Fl_Group.H>} {public local } -decl {\#include <FL/Fl_Group.H>} {public +decl {\#include "../Params/FilterParams.h"} {public local } -decl {\#include "../Params/FilterParams.h"} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/fl_draw.H>} {public local } -decl {\#include <FL/fl_draw.H>} {public +decl {\#include <FL/fl_ask.H>} {public local } -decl {\#include <FL/fl_ask.H>} {public +decl {\#include "PresetsUI.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "common.H"} {public local } -class FormantFilterGraph {: {public Fl_Box} +class FormantFilterGraph {open : {public Fl_Box} } { Function {FormantFilterGraph(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {pars=NULL; @@ -134,24 +140,32 @@ fl_line_style(FL_SOLID); pars->formantfilterH(*nvowel,lx,graphpoints); +fl_line_style( FL_SOLID, 2 ); +fl_begin_line(); oiy=(int) ((graphpoints[0]/maxdB+1.0)*ly/2.0); for (i=1;i<lx;i++){ - int iy=(int) ((graphpoints[i]/maxdB+1.0)*ly/2.0); + double iy= ((graphpoints[i]/maxdB+1.0)*ly/2.0); if ((iy>=0)&&(oiy>=0)&&(iy<ly)&&(oiy<lx)) - fl_line(ox+i-1,oy+ly-oiy,ox+i,oy+ly-iy); + fl_vertex(ox+i,oy+ly-iy); oiy=iy; -};} {} +}; +fl_end_line(); +fl_line_style(FL_SOLID,0);} {} } Function {~FormantFilterGraph()} {} { code {delete [] graphpoints;} {} } - decl {FilterParams *pars;} {} - decl {int oldx,oldy;} {} - decl {int *nvowel,*nformant;} {} - decl {float *graphpoints;} {} + decl {FilterParams *pars;} {private local + } + decl {int oldx,oldy;} {private local + } + decl {int *nvowel,*nformant;} {private local + } + decl {float *graphpoints;} {private local + } } -class FilterUI {: {public Fl_Group,PresetsUI_} +class FilterUI {open : {public Fl_Group,PresetsUI_} } { Function {FilterUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {pars=NULL; @@ -166,14 +180,16 @@ hide(); //delete (filterui); delete (formantparswindow);} {} } - Function {make_window()} {} { - Fl_Window filterui { - xywh {211 312 275 75} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_window()} {open + } { + Fl_Window filterui {open + xywh {495 323 275 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group filterparamswindow { label {Filter Parameters} - xywh {0 0 275 75} box PLASTIC_UP_BOX color 183 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 275 75} box UP_FRAME color 183 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters( o );} } { Fl_Choice analogfiltertypechoice { label FilterType @@ -319,7 +335,7 @@ pars->changed=true;} open Fl_Button editbutton { label Edit callback {formantparswindow->show();} - xywh {15 40 50 25} box PLASTIC_UP_BOX labelfont 1 labelsize 11 + xywh {15 40 50 25} labelfont 1 labelsize 11 } Fl_Button {} { label C @@ -333,10 +349,11 @@ pars->changed=true;} open } } } - Function {make_formant_window()} {} { + Function {make_formant_window()} {open + } { Fl_Window formantparswindow { - label {Formant Filter Parameters} - xywh {47 301 700 205} type Double hide + label {Formant Filter Parameters} selected + xywh {515 450 700 205} type Double visible } { Fl_Group {} { xywh {485 47 105 113} box THIN_UP_BOX @@ -511,7 +528,8 @@ pars->changed=true;} } } } - Function {update_formant_window()} {} { + Function {update_formant_window()} {open + } { code {formant_freq_dial->value(pars->Pvowels[nvowel].formants[nformant].freq); formant_q_dial->value(pars->Pvowels[nvowel].formants[nformant].q); formant_amp_dial->value(pars->Pvowels[nvowel].formants[nformant].amp); @@ -592,7 +610,8 @@ formantparswindow->label(this->label()); update_formant_window();} {} } - Function {switchcategory(int newcat)} {} { + Function {switchcategory(int newcat)} {open + } { code {if (pars->Pcategory!=newcat){ pars->Pgain=64; gaindial->value(64); @@ -605,7 +624,8 @@ pars->Pcategory=newcat; refresh();} {} } - Function {use_for_dynamic_filter()} {} { + Function {use_for_dynamic_filter()} {open + } { code {freqtrdial->deactivate(); gaindial->when(0); @@ -619,7 +639,10 @@ formant_q_dial->when(0); formant_amp_dial->when(0); strchdial->when(0);} {} } - decl {FilterParams *pars;} {} - decl {unsigned char *velsnsamp,*velsns;} {} - decl {int nvowel,nformant,nseqpos;} {} + decl {FilterParams *pars;} {private local + } + decl {unsigned char *velsnsamp,*velsns;} {private local + } + decl {int nvowel,nformant,nseqpos;} {private local + } } diff --git a/src/UI/LFOUI.fl b/src/UI/LFOUI.fl @@ -1,42 +1,47 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include "../globals.h"} {public +decl {\#include "../globals.h"} {public local } -decl {\#include <FL/Fl_Group.H>} {public +decl {\#include <FL/Fl_Group.H>} {public local } -decl {\#include "../Params/LFOParams.h"} {public +decl {\#include "../Params/LFOParams.h"} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/fl_draw.H>} {public +decl {\#include <FL/fl_draw.H>} {public local } -decl {\#include <FL/fl_ask.H>} {public +decl {\#include <FL/fl_ask.H>} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local } -class LFOUI {: {public Fl_Group, PresetsUI_} +decl {\#include "common.H"} {public local +} + +class LFOUI {open : {public Fl_Group, PresetsUI_} } { Function {LFOUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {pars=NULL;} {} @@ -46,14 +51,16 @@ class LFOUI {: {public Fl_Group, PresetsUI_} hide(); //delete (lfoui);} {} } - Function {make_window()} {} { - Fl_Window lfoui { - xywh {66 328 230 70} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_window()} {open + } { + Fl_Window lfoui {open selected + xywh {627 328 230 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group lfoparamswindow { label LFO - xywh {0 0 230 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 230 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial freq { label {Freq.} @@ -90,31 +97,31 @@ hide(); callback {pars->PLFOtype=(int)o->value();} tooltip {LFO function} xywh {180 40 45 15} down_box BORDER_BOX labelsize 10 align 2 textsize 8 } { - menuitem {} { + MenuItem {} { label SINE xywh {20 20 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label TRI xywh {30 30 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label SQR xywh {30 30 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label {R.up} xywh {40 40 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label {R.dn} xywh {50 50 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label E1dn xywh {60 60 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label E2dn xywh {70 70 100 20} labelfont 1 labelsize 10 } @@ -138,12 +145,12 @@ hide(); } Fl_Button {} { label C - callback {presetsui->copy(pars);} selected + callback {presetsui->copy(pars);} xywh {145 10 15 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 10 labelcolor 7 } Fl_Button {} { label P - callback {presetsui->paste(pars,this);} selected + callback {presetsui->paste(pars,this);} xywh {162 10 15 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 10 labelcolor 7 } } @@ -172,5 +179,6 @@ lfoui->resize(this->x(),this->y(),this->w(),this->h()); lfoparamswindow->label(this->label());} {} } - decl {LFOParams *pars;} {} + decl {LFOParams *pars;} {private local + } } diff --git a/src/UI/MasterUI.fl b/src/UI/MasterUI.fl @@ -1,69 +1,74 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2009 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2009 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <string.h>} {public +decl {\#include <string.h>} {public local } -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "ADnoteUI.h"} {public +decl {\#include "ADnoteUI.h"} {public local } -decl {\#include "SUBnoteUI.h"} {public +decl {\#include "SUBnoteUI.h"} {public local } -decl {\#include "EffUI.h"} {public +decl {\#include "EffUI.h"} {public local } -decl {\#include "VirKeyboard.h"} {public +decl {\#include "VirKeyboard.h"} {public local } -decl {\#include "ConfigUI.h"} {public +decl {\#include "ConfigUI.h"} {public local } -decl {\#include "BankUI.h"} {public +decl {\#include "BankUI.h"} {public local } -decl {\#include "PartUI.h"} {public +decl {\#include "PartUI.h"} {public local } -decl {\#include "MicrotonalUI.h"} {public +decl {\#include "MicrotonalUI.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local } decl {\#include "NioUI.h"} {public global } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local +} + +decl {\#include "../Misc/Part.h"} {public local } -decl {\#include "../Misc/Part.h"} {public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "common.H"} {public local } decl {\#if USE_NSM \#include "NSM.H" extern NSM_Client *nsm; -\#endif} {public +\#endif} {public local } -decl {\#include "../globals.h"} {public +decl {\#include "../globals.h"} {public local } class VUMeter {: {public Fl_Box} @@ -110,6 +115,12 @@ if (dbr<0.0) dbr=0.0; dbl=dbl*0.4+olddbl*0.6; dbr=dbr*0.4+olddbr*0.6; +if ( damage() & FL_DAMAGE_USER1 ) +{ + if ( olddbl == dbl && olddbr == dbr ) + return; +} + olddbl=dbl; olddbr=dbr; @@ -232,18 +243,18 @@ float tmp=ly*1.0/MIN_DB; } Function {tickdraw(VUMeter *o)} {return_type {static void} } { - code {o->redraw();} {} + code {o->damage(FL_DAMAGE_USER1);} {} } Function {tick(void *v)} {return_type {static void} } { code {tickdraw((VUMeter *) v); -Fl::add_timeout(1.0/18.0,tick,v);//18 fps} {} + Fl::repeat_timeout(1.0/18.0,tick,v);//18 fps} {} } Function {handle(int event)} {return_type int } { code {switch(event){ case FL_SHOW: - tick(this); + Fl::add_timeout(1.0/18.0,tick,this); break; case FL_HIDE: Fl::remove_timeout(tick,this); @@ -257,13 +268,17 @@ Fl::add_timeout(1.0/18.0,tick,v);//18 fps} {} }; return(1);} {} } - decl {Master *master;} {} - decl {int npart;} {} - decl {float olddbl,olddbr;} {} - decl {float oldrmsdbl,oldrmsdbr;} {} + decl {Master *master;} {private local + } + decl {int npart;} {private local + } + decl {float olddbl,olddbr;} {private local + } + decl {float oldrmsdbl,oldrmsdbr;} {private local + } } -class SysEffSend {: {public WidgetPDial} +class SysEffSend {open : {public WidgetPDial} } { Function {SysEffSend(int x,int y, int w, int h, const char *label=0):WidgetPDial(x,y,w,h,label)} {} { code {master=NULL; @@ -296,22 +311,26 @@ this->copy_label(tmp);} {} return(WidgetPDial::handle(event));} {} } - decl {Master *master;} {} - decl {int neff1;} {} - decl {int neff2;} {} + decl {Master *master;} {private local + } + decl {int neff1;} {private local + } + decl {int neff2;} {private local + } } -class Panellistitem {: {public Fl_Group} +class Panellistitem {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window panellistitem { - private xywh {315 213 70 260} type Double hide - class Fl_Group + Fl_Window panellistitem {open + private xywh {602 665 100 260} type Double box NO_BOX + class Fl_Group visible } { - Fl_Group panellistitemgroup { - private xywh {0 20 70 240} box THIN_UP_BOX + Fl_Group panellistitemgroup {open + private xywh {0 20 70 240} box UP_FRAME code0 {if (master->part[npart]->Penabled==0) o->deactivate();} + code1 {set_module_parameters( o );} } { Fl_Group {} { xywh {45 65 15 110} box ENGRAVED_FRAME @@ -334,7 +353,7 @@ bankui->show();} } Fl_Slider partvolume { callback {master->part[npart]->setPvolume((int) o->value());} - xywh {10 65 30 110} type {Vert Knob} box FLAT_BOX minimum 127 maximum 0 step 1 value 127 + xywh {10 65 30 110} type {Vert Knob} box NO_BOX minimum 127 maximum 0 step 1 value 127 code0 {o->value(master->part[npart]->Pvolume);} } Fl_Dial partpanning { @@ -416,9 +435,12 @@ panellistitemgroup->redraw();} {} code {panellistitem->hide(); //delete(panellistitem);} {} } - decl {int npart;} {} - decl {Master *master;} {} - decl {BankUI *bankui;} {} + decl {int npart;} {private local + } + decl {Master *master;} {private local + } + decl {BankUI *bankui;} {private local + } } class MasterUI {open @@ -441,7 +463,7 @@ if (( *exitprogram=1; }; \#endif} open - xywh {887 248 390 465} type Double xclass zynaddsubfx visible + xywh {623 378 390 545} type Double align 80 xclass zynaddsubfx visible } { Fl_Menu_Bar mastermenu { xywh {-5 0 690 25} @@ -467,7 +489,7 @@ if (( \#endif { do_load_master(); - }} + }} xywh {20 20 100 20} } MenuItem {} { @@ -684,16 +706,16 @@ if (result!=0) fl_alert("Error: Could not save the file.");} } } Fl_Dial mastervolumedial { - label {M.Vol} + label {Master Volume} callback {master->setPvolume((int) o->value());} - tooltip {Master Volume} xywh {5 30 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 align 130 maximum 127 step 1 + tooltip {Master Volume} xywh {15 32 55 55} box ROUND_UP_BOX labelsize 9 align 130 maximum 127 step 1 code0 {o->value(master->Pvolume);} class WidgetPDial } Fl_Counter masterkeyshiftcounter { label {Master KeyShift} callback {master->setPkeyshift((int) o->value()+64);} - xywh {45 31 90 20} labelsize 11 minimum -64 maximum 64 step 1 + xywh {150 97 120 23} type Simple labelsize 9 minimum -64 maximum 64 step 1 code0 {o->lstep(12);} code1 {o->value(master->Pkeyshift-64);} } @@ -703,31 +725,31 @@ if (result!=0) fl_alert("Error: Could not save the file.");} pthread_mutex_lock(&master->mutex); master->shutup=1; pthread_mutex_unlock(&master->mutex);} - xywh {293 29 92 31} color 231 labelfont 1 + xywh {280 29 105 53} color 90 labelfont 1 } - Fl_Group partuigroup { - xywh {0 242 390 183} box ENGRAVED_FRAME + Fl_Group partuigroup {open + xywh {0 332 390 183} } { - Fl_Group partui { - xywh {4 245 383 175} box FLAT_BOX + Fl_Group partui {open + xywh {4 335 383 175} code0 {o->init(master->part[0],master,0,bankui);} code1 {o->show();} class PartUI } {} } - Fl_Tabs {} { - xywh {0 80 390 160} + Fl_Tabs {} {open + xywh {0 145 390 165} box UP_FRAME } { Fl_Group {} { - label {System Effects} - xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25 + label {System Effects} open + xywh {0 162 390 145} labelsize 15 align 9 } { Fl_Counter syseffnocounter { label {Sys.Effect No.} 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 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + xywh {5 181 80 22} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 code0 {o->bounds(1,NUM_SYS_EFX);} code1 {o->value(nsyseff+1);} } @@ -737,7 +759,7 @@ syseffectui->refresh(master->sysefx[nsyseff]);} master->sysefx[nsyseff]->changeeffect((int) o->value()); pthread_mutex_unlock(&master->mutex); syseffectui->refresh(master->sysefx[nsyseff]);} - xywh {315 125 70 15} down_box BORDER_BOX labelsize 10 + xywh {285 176 100 22} down_box BORDER_BOX labelsize 10 code0 {o->value(master->sysefx[nsyseff]->geteffect());} } { MenuItem {} { @@ -777,11 +799,11 @@ syseffectui->refresh(master->sysefx[nsyseff]);} xywh {90 90 100 20} labelfont 1 labelsize 10 } } - Fl_Group syseffectuigroup { - xywh {5 140 380 95} box FLAT_BOX color 48 + Fl_Group syseffectuigroup {open + xywh {5 203 380 95} color 48 } { Fl_Group syseffectui { - xywh {5 140 380 95} + xywh {5 203 380 95} code0 {o->init(master->sysefx[nsyseff]);} class EffUI } {} @@ -789,24 +811,24 @@ syseffectui->refresh(master->sysefx[nsyseff]);} Fl_Button {} { label {Send to...} callback {syseffsendwindow->show();} - xywh {95 120 75 20} box THIN_UP_BOX labelfont 1 labelsize 11 + xywh {90 181 85 22} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Button {} { label C callback {presetsui->copy(master->sysefx[nsyseff]);} - xywh {215 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {180 187 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {pthread_mutex_lock(&master->mutex); presetsui->paste(master->sysefx[nsyseff],syseffectui); pthread_mutex_unlock(&master->mutex);} - xywh {245 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {210 187 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } Fl_Group {} { - label {Insertion Effects} - xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25 hide + label {Insertion Effects} open + xywh {0 165 390 145} labelsize 15 align 9 hide } { Fl_Counter inseffnocounter { label {Ins.Effect No.} @@ -824,7 +846,7 @@ if (master->Pinsparts[ninseff]!=-1) { inseffectui->deactivate(); inseffectuigroup->deactivate(); };} - xywh {5 120 80 20} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + xywh {5 183 80 22} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 code0 {o->bounds(1,NUM_INS_EFX);} code1 {o->value(ninseff+1);} } @@ -835,7 +857,7 @@ master->insefx[ninseff]->changeeffect((int) o->value()); pthread_mutex_unlock(&master->mutex); inseffectui->refresh(master->insefx[ninseff]); inseffectui->show();} - xywh {315 125 70 15} down_box BORDER_BOX labelsize 10 + xywh {285 173 100 22} down_box BORDER_BOX labelsize 10 code0 {o->value(master->insefx[ninseff]->geteffect());} code1 {if (master->Pinsparts[ninseff]== -1) o->deactivate();} } { @@ -876,11 +898,11 @@ inseffectui->show();} xywh {100 100 100 20} labelfont 1 labelsize 10 } } - Fl_Group inseffectuigroup { - xywh {5 140 380 95} box FLAT_BOX color 48 + Fl_Group inseffectuigroup {open + xywh {5 205 380 95} box FLAT_BOX color 48 } { Fl_Group inseffectui { - xywh {5 140 380 95} + xywh {5 205 380 90} box UP_FRAME code0 {o->init(master->insefx[ninseff]);} code1 {if (master->Pinsparts[ninseff]== -1) o->deactivate();} class EffUI @@ -899,7 +921,7 @@ if ((int) o->value()==1){ inseffectui->activate(); }; master->insefx[ninseff]->cleanup();} open - xywh {95 120 80 20} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 10 + xywh {95 183 80 22} 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+1);o->add(tmp);};} code3 {o->value(master->Pinsparts[ninseff]+2);} @@ -907,24 +929,24 @@ master->insefx[ninseff]->cleanup();} open Fl_Button {} { label C callback {presetsui->copy(master->insefx[ninseff]);} - xywh {215 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {180 185 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {pthread_mutex_lock(&master->mutex); presetsui->paste(master->insefx[ninseff],inseffectui); pthread_mutex_unlock(&master->mutex);} - xywh {245 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {210 185 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } } Fl_Button {} { label Scales callback {microtonalui->show();} - xywh {330 80 56 19} color 231 labeltype ENGRAVED_LABEL labelfont 1 + xywh {320 87 65 23} color 51 labelfont 1 } Fl_Group {} { - xywh {172 30 117 45} box ENGRAVED_BOX + xywh {150 40 117 45} box UP_FRAME } { Fl_Button recordbutton { label {Rec.} @@ -937,7 +959,7 @@ pauselabel->activate(); master->HDDRecorder.start(); master->vuresetpeaks(); mastermenu->redraw();} - tooltip {Start Recording} xywh {181 36 21 21} box ROUND_UP_BOX color 88 labelfont 1 labelsize 10 align 2 deactivate + tooltip {Start Recording} xywh {159 46 21 21} box ROUND_UP_BOX color 88 labelfont 1 labelsize 10 align 2 deactivate } Fl_Button stopbutton { label Stop @@ -949,7 +971,7 @@ pauselabel->deactivate(); recordmenu->activate(); recordmenu->label("&Record"); mastermenu->redraw();} - tooltip {Stop Recording and close the audio file} xywh {259 36 21 21} box THIN_UP_BOX color 4 labelfont 1 labelsize 10 align 2 deactivate + tooltip {Stop Recording and close the audio file} xywh {237 46 21 21} box THIN_UP_BOX color 4 labelfont 1 labelsize 10 align 2 deactivate } Fl_Button pausebutton { label {@||} @@ -957,19 +979,19 @@ mastermenu->redraw();} master->HDDRecorder.pause(); recordbutton->activate(); mastermenu->redraw();} - tooltip {Pause Recording} xywh {220 36 21 21} box THIN_UP_BOX color 4 selection_color 4 labelfont 1 labelcolor 3 align 16 deactivate + tooltip {Pause Recording} xywh {198 46 21 21} box THIN_UP_BOX color 4 selection_color 4 labelfont 1 labelcolor 3 align 16 deactivate } Fl_Box pauselabel { label Pause - xywh {214 56 30 15} labelfont 1 labelsize 10 deactivate + xywh {192 66 30 15} labelfont 1 labelsize 10 deactivate } } - Fl_Group {} { - xywh {1 427 389 33} box ENGRAVED_FRAME + Fl_Group {} {open + xywh {1 512 389 33} } { Fl_Box {} { label {VU-Meter} - xywh {4 430 384 30} box FLAT_BOX color 48 selection_color 75 + xywh {5 515 380 30} box FLAT_BOX color 48 selection_color 75 code0 {o->init(master,-1);} class VUMeter } @@ -977,7 +999,7 @@ mastermenu->redraw();} Fl_Check_Button nrpnbutton { label NRPN callback {master->ctl.NRPN.receive=(int) o->value();} - tooltip {Receive NRPNs} xywh {45 65 47 10} down_box DOWN_BOX labelsize 10 + tooltip {Receive NRPNs} xywh {10 115 60 25} down_box DOWN_BOX labelsize 12 code0 {o->value(master->ctl.NRPN.receive);} } Fl_Counter npartcounter { @@ -994,36 +1016,40 @@ npart=nval; updatepanel(); simplenpartcounter->value(nval+1); simplenpartcounter->do_callback();} - tooltip {The part number} xywh {5 247 70 23} type Simple labelfont 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + tooltip {The part number} xywh {5 312 50 18} 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 {} { label vK callback {virkeyboard->show();} - tooltip {Virtual Keyboard} xywh {292 80 35 19} color 231 labeltype ENGRAVED_LABEL labelfont 1 + tooltip {Virtual Keyboard} xywh {280 87 40 23} color 51 labelfont 1 } - Fl_Button {} { - label {R.D.} - callback {globalfinedetuneslider->value(64.0); + Fl_Group {} {open + xywh {85 32 55 110} box UP_FRAME + } { + Fl_Button {} { + label Reset + callback {globalfinedetuneslider->value(64.0); globalfinedetuneslider->do_callback();} - tooltip {Master fine detune reset} xywh {140 65 30 10} box THIN_UP_BOX labelfont 1 labelsize 10 - } - Fl_Dial globalfinedetuneslider { - label {F.Det.} - callback {master->microtonal.Pglobalfinedetune=(int) o->value();} - tooltip {global fine detune} xywh {143 30 20 20} box ROUND_UP_BOX labelsize 10 align 130 maximum 127 step 1 value 64 - code0 {o->value(master->microtonal.Pglobalfinedetune);} - class WidgetPDial + tooltip {Master fine detune reset} xywh {90 37 45 23} box THIN_UP_BOX labelsize 10 + } + Fl_Dial globalfinedetuneslider { + label {Fine Detune} + callback {master->microtonal.Pglobalfinedetune=(int) o->value();} + tooltip {global fine detune} xywh {90 68 45 45} box ROUND_UP_BOX labelsize 9 align 130 maximum 127 step 1 value 64 + code0 {o->value(master->microtonal.Pglobalfinedetune);} + class WidgetPDial + } } Fl_Button {} { label {Panel Window} callback {updatepanel(); panelwindow->show();} - tooltip {Panel Window} xywh {293 62 92 16} color 183 labelfont 1 labelsize 10 + tooltip {Panel Window} xywh {280 112 105 23} color 51 labelfont 1 labelsize 10 } Fl_Button sm_indicator1 { - label SM selected + label SM xywh {350 5 35 15} box ROUNDED_BOX down_box ROUNDED_BOX color 45 selection_color 93 labelfont 3 labelcolor 39 deactivate } } @@ -1115,7 +1141,7 @@ if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { *exitprogram=1; }; \#endif} open - xywh {672 121 600 335} type Double visible + xywh {277 216 600 335} type Double align 80 visible } { Fl_Menu_Bar simplemastermenu { xywh {0 0 690 25} @@ -1215,8 +1241,8 @@ if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an } } } - Fl_Group simplelistitemgroup { - private xywh {125 65 215 150} box ENGRAVED_BOX + Fl_Group simplelistitemgroup {open + private xywh {125 65 215 145} box UP_FRAME code0 {if (master->part[npart]->Penabled==0) o->deactivate();} } { Fl_Button partname { @@ -1225,12 +1251,12 @@ if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an bankui->cbwig->do_callback(); }; bankui->show();} - xywh {130 72 205 18} box THIN_DOWN_BOX down_box FLAT_BOX color 247 labelfont 1 labelsize 11 align 208 + xywh {130 72 205 18} box THIN_DOWN_BOX down_box FLAT_BOX color 50 labelfont 1 labelsize 11 align 208 } Fl_Slider partpanning { label Pan callback {master->part[npart]->setPpanning((int) o->value());} - xywh {185 95 70 15} type {Horz Knob} box FLAT_BOX maximum 127 step 1 value 64 + xywh {185 95 145 15} type {Horz Knob} box NO_BOX labelsize 11 maximum 127 step 1 value 64 code0 {o->value(master->part[npart]->Ppanning);} } Fl_Choice partrcv { @@ -1244,18 +1270,18 @@ virkeys->midich=(int) o->value();} open } {} Fl_Dial partvolume { callback {master->part[npart]->setPvolume((int) o->value());} - xywh {145 95 30 30} maximum 127 step 1 + xywh {135 95 45 40} labelsize 9 maximum 127 step 1 code0 {o->value(master->part[npart]->Pvolume);} class WidgetPDial } Fl_Box {} { label Volume - xywh {130 125 60 15} + xywh {130 130 55 20} labelsize 10 } Fl_Check_Button simplepartportamento { label Portamento callback {master->part[npart]->ctl.portamento.portamento=(int) o->value();} - tooltip {Enable/Disable the portamento} xywh {260 95 75 20} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Enable/Disable the portamento} xywh {193 127 79 23} down_box DOWN_BOX labelsize 9 code0 {o->value(master->part[npart]->ctl.portamento.portamento);} } Fl_Counter simpleminkcounter { @@ -1263,7 +1289,7 @@ virkeys->midich=(int) o->value();} open callback {master->part[npart]->Pminkey=(int) o->value(); if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_RED); else o->textcolor(FL_BLACK);} - tooltip {Minimum key (that the part receives NoteOn messages)} xywh {210 158 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10 + tooltip {Minimum key (that the part receives NoteOn messages)} xywh {210 158 40 15} type Simple labelsize 10 minimum 0 maximum 127 step 1 textsize 10 code0 {o->value(master->part[npart]->Pminkey);} } Fl_Counter simplemaxkcounter { @@ -1272,7 +1298,7 @@ if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_R if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_RED); else o->textcolor(FL_BLACK);} - tooltip {Maximum key (that the part receives NoteOn messages)} xywh {255 158 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10 + tooltip {Maximum key (that the part receives NoteOn messages)} xywh {255 158 40 15} type Simple labelsize 10 minimum 0 maximum 127 step 1 textsize 10 code0 {o->value(master->part[npart]->Pmaxkey);} } Fl_Button {} { @@ -1300,18 +1326,18 @@ simplemaxkcounter->do_callback();} Fl_Counter simplepartkeyshiftcounter { label KeyShift callback {master->part[npart]->Pkeyshift=(int) o->value()+64;} - xywh {240 120 90 20} labelsize 11 minimum -64 maximum 64 step 1 + xywh {280 120 50 20} type Simple labelsize 11 minimum -64 maximum 64 step 1 code0 {o->lstep(12);} code1 {o->value(master->part[npart]->Pkeyshift-64);} } Fl_Dial simplesyseffsend { - callback {master->setPsysefxvol(npart,nsyseff,(int) o->value());} + callback {master->setPsysefxvol(npart,nsyseff,(int) o->value());} selected xywh {300 160 30 30} maximum 127 step 1 class WidgetPDial } Fl_Box {} { label Effect - xywh {295 190 40 15} + xywh {295 190 40 15} labelsize 10 } } Fl_Check_Button partenabled { @@ -1340,15 +1366,15 @@ o->redraw();} code0 {o->init(master);} class VirKeys } - Fl_Group {} { - xywh {340 30 255 185} box ENGRAVED_BOX + Fl_Group {} {open + xywh {340 30 255 185} } { - Fl_Tabs {} { - xywh {345 35 245 175} align 18 + Fl_Tabs {} {open + xywh {345 35 245 175} box UP_FRAME align 18 } { Fl_Group {} { - label {System Effects} - xywh {345 55 245 155} box ENGRAVED_FRAME labelfont 1 labelsize 12 align 18 hide + label {System Effects} open + xywh {345 55 245 155} box UP_FRAME labelfont 1 labelsize 12 align 18 } { Fl_Counter simplesyseffnocounter { label {Sys.Effect No.} @@ -1406,8 +1432,8 @@ simplesyseffectui->refresh(master->sysefx[nsyseff]);} xywh {100 100 100 20} labelfont 1 labelsize 10 } } - Fl_Group simplesyseffectuigroup { - xywh {350 95 235 95} box FLAT_BOX color 48 + Fl_Group simplesyseffectuigroup {open + xywh {350 95 235 95} color 48 } { Fl_Group simplesyseffectui { xywh {350 95 234 95} @@ -1430,7 +1456,7 @@ pthread_mutex_unlock(&master->mutex);} } Fl_Group {} { label {Insertion Effects} - xywh {345 55 245 155} box ENGRAVED_FRAME labelfont 1 labelsize 12 align 18 + xywh {345 55 245 155} box UP_FRAME labelfont 1 labelsize 12 align 18 hide } { Fl_Counter simpleinseffnocounter { label {Ins.Effect No.} @@ -1538,7 +1564,7 @@ pthread_mutex_unlock(&master->mutex);} } } } - Fl_Group {} { + Fl_Group {} {open xywh {5 300 590 30} box ENGRAVED_FRAME } { Fl_Box {} { @@ -1558,7 +1584,7 @@ pthread_mutex_unlock(&master->mutex);} Fl_Counter simplemasterkeyshiftcounter { label {Master KeyShift} callback {master->setPkeyshift((int) o->value()+64);} - xywh {25 110 90 20} labelsize 11 minimum -64 maximum 64 step 1 + xywh {15 110 90 20} labelsize 11 minimum -64 maximum 64 step 1 code0 {o->lstep(12);} code1 {o->value(master->Pkeyshift-64);} } @@ -1568,18 +1594,18 @@ pthread_mutex_unlock(&master->mutex);} pthread_mutex_lock(&master->mutex); master->shutup=1; pthread_mutex_unlock(&master->mutex);} - xywh {5 149 115 31} color 231 labelfont 1 labelsize 11 + xywh {5 149 115 31} color 90 labelfont 1 labelsize 10 } Fl_Button {} { label Reset callback {simpleglobalfinedetuneslider->value(64.0); simpleglobalfinedetuneslider->do_callback();} - tooltip {Master fine detune reset} xywh {70 32 50 10} box THIN_UP_BOX labelfont 1 labelsize 11 align 128 + tooltip {Master fine detune reset} xywh {70 30 50 17} box THIN_UP_BOX labelsize 11 align 128 } Fl_Dial simpleglobalfinedetuneslider { label {Fine Detune} callback {master->microtonal.Pglobalfinedetune=(int) o->value();} - tooltip {global fine detune} xywh {80 45 30 30} box ROUND_UP_BOX labelsize 11 align 130 maximum 127 step 1 value 64 + tooltip {global fine detune} xywh {80 50 30 30} box ROUND_UP_BOX labelsize 11 align 130 maximum 127 step 1 value 64 code0 {o->value(master->microtonal.Pglobalfinedetune);} class WidgetPDial } @@ -1599,7 +1625,7 @@ virkeys->midich=master->part[npart]->Prcvchn;} callback {virkeys->relaseallkeys(0); virkeys->midioct=(int) o->value(); virkeys->take_focus();} - tooltip {Midi Octave} xywh {5 195 55 20} type Simple labelsize 11 align 8 when 6 minimum 0 maximum 5 step 1 textfont 1 textsize 11 + tooltip {Midi Octave} xywh {5 190 55 20} type Simple labelsize 11 align 8 when 6 minimum 0 maximum 5 step 1 textfont 1 textsize 11 code0 {o->value(virkeys->midioct);} } Fl_Button sm_indicator2 { @@ -1856,17 +1882,30 @@ virkeys->midich=master->part[npart]->Prcvchn; simplerefresh(); bankui->hide();} {} } - decl {Master *master;} {} - decl {MicrotonalUI *microtonalui;} {} - decl {BankUI *bankui;} {} - decl {int ninseff,npart;} {} - decl {int nsyseff;} {} - decl {int *exitprogram;} {} - decl {SysEffSend *syseffsend[NUM_SYS_EFX][NUM_SYS_EFX];} {} - decl {VirKeyboard *virkeyboard;} {} - decl {ConfigUI *configui;} {} - decl {int swapefftype;} {} - decl {char masterwindowlabel[100];} {} - decl {Panellistitem *panellistitem[NUM_MIDI_PARTS];} {} - decl {NioUI nioui;} {} + decl {Master *master;} {private local + } + decl {MicrotonalUI *microtonalui;} {private local + } + decl {BankUI *bankui;} {private local + } + decl {int ninseff,npart;} {private local + } + decl {int nsyseff;} {private local + } + decl {int *exitprogram;} {private local + } + decl {SysEffSend *syseffsend[NUM_SYS_EFX][NUM_SYS_EFX];} {private local + } + decl {VirKeyboard *virkeyboard;} {private local + } + decl {ConfigUI *configui;} {private local + } + decl {int swapefftype;} {private local + } + decl {char masterwindowlabel[100];} {private local + } + decl {Panellistitem *panellistitem[NUM_MIDI_PARTS];} {private local + } + decl {NioUI nioui;} {private local + } } diff --git a/src/UI/MicrotonalUI.fl b/src/UI/MicrotonalUI.fl @@ -209,7 +209,7 @@ o->redraw();} callback {microtonal->Penabled=(int) o->value(); if (microtonal->Penabled==0) microtonalgroup->deactivate(); else microtonalgroup->activate();} - xywh {3 3 102 45} box PLASTIC_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 11 align 148 + xywh {3 3 102 45} box UP_BOX down_box DOWN_BOX labelfont 1 labelsize 11 align 148 code0 {o->value(microtonal->Penabled);} } } diff --git a/src/UI/OscilGenUI.fl b/src/UI/OscilGenUI.fl @@ -1,54 +1,62 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {selected +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local } -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include "../Synth/OscilGen.h"} {public +decl {\#include "../Synth/OscilGen.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local } -decl {\#include "ResonanceUI.h"} {public +decl {\#include "ResonanceUI.h"} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/Fl_Group.H>} {public +decl {\#include <FL/Fl_Group.H>} {public local } -decl {\#include <FL/Fl_Slider.H>} {public +decl {\#include <FL/Fl_Slider.H>} {public local } -decl {\#include <math.h>} {} +decl {\#include <math.h>} {private local +} -decl {\#include <stdio.h>} {} +decl {\#include <stdio.h>} {private local +} -decl {\#include <stdlib.h>} {} +decl {\#include <stdlib.h>} {private local +} -decl {\#include <string.h>} {} +decl {\#include <string.h>} {private local +} -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "EnvelopeUI.h"} {public +decl {\#include "EnvelopeUI.h"} {public local } -decl {\#include "LFOUI.h"} {public +decl {\#include "LFOUI.h"} {public local } -decl {\#include "FilterUI.h"} {public +decl {\#include "FilterUI.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local +} + +decl {\#include <FL/fl_draw.H>} {public local } class OscilSpectrum {: {public Fl_Box} @@ -122,9 +130,12 @@ for (i=0;i<n;i++){ } delete [] spc;} {} } - decl {OscilGen *oscil;} {} - decl {int oscbase;} {} - decl {Master *master;} {} + decl {OscilGen *oscil;} {private local + } + decl {int oscbase;} {private local + } + decl {Master *master;} {private local + } } class PSlider {: {public Fl_Slider} @@ -157,12 +168,14 @@ return(1);} {} } } -class Oscilloscope {: {public Fl_Box} +class Oscilloscope {open : {public Fl_Box} } { - Function {Oscilloscope(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { + Function {Oscilloscope(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {open + } { code {oscil=NULL; phase=64; -oscbase=0;} {} +oscbase=0; +box(FL_FLAT_BOX);} {} } Function {init(OscilGen *oscil_,Master *master_)} {} { code {oscil=oscil_; @@ -179,7 +192,8 @@ oscbase=oscbase_; phase=phase_; master=master_;} {} } - Function {draw()} {} { + Function {draw()} {open + } { code {int ox=x(),oy=y(),lx=w(),ly=h()-1,i; float smps[synth->oscilsize]; pthread_mutex_lock(&master->mutex); @@ -188,7 +202,7 @@ if (oscbase==0) oscil->get(smps,-1.0); pthread_mutex_unlock(&master->mutex); if (damage()!=1){ - fl_color(0,0,0); + fl_color( fl_color_average( FL_BLACK, FL_BACKGROUND_COLOR, 0.5 )); fl_rectf(ox,oy,lx,ly); }; @@ -220,32 +234,40 @@ fl_line_style(0,1); fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2); if (this->active_r()) fl_color(this->parent()->selection_color()); else fl_color(this->parent()->labelcolor()); -int lw=1; + +fl_color( fl_color_add_alpha( fl_color(), 127 ) ); + +int lw=2; //if ((lx<135)||(ly<135)) lw=1; -fl_line_style(0,lw); -int ph=(int)((phase-64.0)/128.0*synth->oscilsize+synth->oscilsize); +fl_line_style(FL_SOLID,lw); +fl_begin_line(); +double ph=((phase-64.0)/128.0*synth->oscilsize+synth->oscilsize); for (i=1;i<lx;i++){ - int k1=(int)((float)synth->oscilsize*(i-1)/lx)+ph; - int k2=(int)((float)synth->oscilsize*i/lx)+ph; - float y1=smps[k1%synth->oscilsize]/max; - float y2=smps[k2%synth->oscilsize]/max; - fl_line(i-1+ox,(int)(y1*ly/2.0)+oy+ly/2,i+ox,(int)(y2*ly/2.0)+oy+ly/2); -};} {} + int k2=(synth->oscilsize*i/lx)+ph; + double y2=smps[k2%synth->oscilsize]/max; + fl_vertex(i+ox,y2*ly/2.0+oy+ly/2); +}; +fl_end_line(); + +fl_line_style(FL_SOLID,0);} {} } - decl {OscilGen *oscil;} {} - decl {int oscbase;} {} - decl {int phase;} {public + decl {OscilGen *oscil;} {private local + } + decl {int oscbase;} {private local + } + decl {int phase;} {public local + } + decl {Master *master;} {private local } - decl {Master *master;} {} } class Oscilharmonic {: {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window harmonic { - private xywh {328 166 90 225} type Double hide - class Fl_Group + Fl_Window harmonic {open + private xywh {335 236 100 225} type Double box NO_BOX + class Fl_Group visible } { Fl_Slider mag { callback {int x=64; @@ -270,7 +292,7 @@ if (cbwidget!=NULL) { applybutton->color(FL_RED); applybutton->redraw(); };} - xywh {0 15 15 115} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 64 + xywh {0 15 15 115} type {Vert Knob} box NO_BOX selection_color 222 maximum 127 step 1 value 64 code0 {o->value(127-oscil->Phmag[n]);} code1 {if (oscil->Phmag[n]==64) o->selection_color(0);} class PSlider @@ -292,7 +314,7 @@ if (cbwidget!=NULL) { applybutton->color(FL_RED); applybutton->redraw(); };} - xywh {0 135 15 75} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 64 + xywh {0 135 15 75} type {Vert Knob} box NO_BOX selection_color 222 maximum 127 step 1 value 64 code0 {o->value(oscil->Phphase[n]);} class PSlider } @@ -344,20 +366,26 @@ if (oscil->Phmag[n]==64) mag->selection_color(0); code {harmonic->hide(); //delete(harmonic);} {} } - decl {OscilGen *oscil;} {} - decl {Fl_Group *display;} {} - decl {int n;} {} - decl {Fl_Widget *oldosc,*cbwidget,*applybutton;} {} - decl {Master *master;} {} + decl {OscilGen *oscil;} {private local + } + decl {Fl_Group *display;} {private local + } + decl {int n;} {private local + } + decl {Fl_Widget *oldosc,*cbwidget,*applybutton;} {private local + } + decl {Master *master;} {private local + } } -class OscilEditor {: {public PresetsUI_} +class OscilEditor {open : {public PresetsUI_} } { - Function {make_window()} {} { + Function {make_window()} {open + } { Fl_Window osceditUI { - label {ADsynth Oscillator Editor} - xywh {131 90 735 595} type Double hide - code0 {if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} + label {ADsynth Oscillator Editor} open + xywh {544 170 735 595} type Double + code0 {if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} visible } { Fl_Button applybutton { label Apply @@ -372,7 +400,7 @@ if (cbapplywidget!=NULL) { code0 {if (!oscil->ADvsPAD) o->hide();} } Fl_Group oscildisplaygroup { - xywh {5 5 360 300} box ENGRAVED_FRAME + xywh {5 5 360 300} box UP_FRAME } { Fl_Group {} {open xywh {10 85 350 190} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 @@ -381,14 +409,14 @@ if (cbapplywidget!=NULL) { } {} Fl_Box {} { label Oscillator - xywh {120 10 110 20} box FLAT_BOX labelfont 1 + xywh {120 10 110 20} labelfont 1 } Fl_Value_Slider rndslider { label rnd callback {oscil->Prand=(int)o->value()+64; oscildisplaygroup->redraw(); oldosc->redraw();} - tooltip {Oscilator Phase Randomness: smaller than 0 is "group", larger than 0 is for each harmonic} xywh {140 285 100 10} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 + tooltip {Oscilator Phase Randomness: smaller than 0 is "group", larger than 0 is for each harmonic} xywh {140 285 100 10} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {if (oscil->ADvsPAD) o->hide();} } Fl_Group {} {open @@ -397,7 +425,7 @@ oldosc->redraw();} code1 {spc->init(oscil,0,master);} } {} Fl_Group {} { - xywh {246 277 115 25} box ENGRAVED_BOX + xywh {246 277 115 25} box UP_FRAME code0 {if (oscil->ADvsPAD) o->hide();} } { Fl_Choice hrndtype { @@ -425,12 +453,8 @@ oldosc->redraw();} } } } - Fl_Box {} { - label {Base Func.} - xywh {495 15 110 20} box FLAT_BOX labelfont 1 - } - Fl_Group basefuncdisplaygroup { - xywh {365 5 360 300} box ENGRAVED_FRAME + Fl_Group basefuncdisplaygroup {open selected + xywh {365 5 360 300} box UP_FRAME } { Fl_Group {} { xywh {370 85 350 190} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 @@ -524,7 +548,7 @@ if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodula } Fl_Box {} { label {Base Func.} - xywh {480 10 110 20} box FLAT_BOX labelfont 1 + xywh {480 10 110 20} labelfont 1 } Fl_Group {} {open xywh {370 30 350 50} box THIN_DOWN_BOX color 32 selection_color 218 labelcolor 63 @@ -536,7 +560,7 @@ if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodula xywh {490 285 25 15} labelsize 12 minimum -63 maximum 63 step 1 } Fl_Group basefuncmodulation { - xywh {550 276 169 25} box ENGRAVED_BOX + xywh {550 276 169 25} box UP_FRAME code0 {if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodulation->deactivate();} } { Fl_Choice bfmodtype { @@ -684,7 +708,7 @@ redrawoscil();} xywh {670 505 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Group {} { - xywh {135 308 150 30} box ENGRAVED_BOX + xywh {135 308 150 30} box UP_FRAME } { Fl_Choice wshbutton { label {Wsh.} @@ -770,7 +794,7 @@ redrawoscil();} tooltip {Auto clear when using the oscillator as base function} xywh {95 313 35 20} box THIN_UP_BOX value 1 labelfont 1 labelsize 10 } Fl_Group {} { - xywh {285 308 155 30} box ENGRAVED_BOX + xywh {285 308 155 30} box UP_FRAME } { Fl_Choice fltbutton { label Filter @@ -859,7 +883,7 @@ redrawoscil();} } } Fl_Group {} { - xywh {590 308 135 30} box ENGRAVED_BOX + xywh {590 308 135 30} box UP_FRAME } { Fl_Choice sabutton { label {Sp.adj.} @@ -892,7 +916,7 @@ redrawoscil();} } } Fl_Group {} { - xywh {665 340 65 65} box ENGRAVED_BOX + xywh {665 340 65 65} box UP_FRAME } { Fl_Counter harmonicshiftcounter { label {Harmonic Shift} @@ -914,8 +938,8 @@ redrawoscil();} xywh {670 385 20 15} box THIN_UP_BOX labelfont 1 labelsize 10 } } - Fl_Group {} { - xywh {665 410 65 90} box ENGRAVED_FRAME + Fl_Group {} {open + xywh {665 410 65 90} box UP_FRAME } { Fl_Choice adhrtype { label {Adpt.Harm.} @@ -977,11 +1001,11 @@ redrawoscil();} Fl_Slider adhrpar { callback {oscil->Padaptiveharmonicspar=(int)o->value(); redrawoscil();} - xywh {670 445 55 10} type {Horz Knob} box FLAT_BOX maximum 100 step 1 value 50 + xywh {670 445 55 10} type {Horz Knob} box NO_BOX maximum 100 step 1 value 50 } } Fl_Group {} { - xywh {440 308 150 30} box ENGRAVED_BOX + xywh {440 308 150 30} box UP_FRAME } { Fl_Choice modtype { label {Mod.} @@ -1051,7 +1075,7 @@ refresh();} xywh {700 545 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Scroll _this_has_to_be_the_last { - xywh {5 340 660 250} type HORIZONTAL box ENGRAVED_BOX + xywh {5 340 660 250} type HORIZONTAL box FLAT_BOX } { Fl_Pack harmonics {open xywh {10 345 650 225} type HORIZONTAL @@ -1136,8 +1160,12 @@ if (cbwidget!=NULL) { applybutton->redraw(); };} {} } - decl {OscilGen *oscil;} {} - decl {Fl_Widget *oldosc,*cbwidget,*cbapplywidget;} {} - decl {Oscilharmonic *h[MAX_AD_HARMONICS];} {} - decl {Master *master;} {} + decl {OscilGen *oscil;} {private local + } + decl {Fl_Widget *oldosc,*cbwidget,*cbapplywidget;} {private local + } + decl {Oscilharmonic *h[MAX_AD_HARMONICS];} {private local + } + decl {Master *master;} {private local + } } diff --git a/src/UI/PADnoteUI.fl b/src/UI/PADnoteUI.fl @@ -1,52 +1,56 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0107 +version 1.0300 header_name {.h} code_name {.cc} -decl {\#include "../Params/PADnoteParameters.h"} {public +decl {\#include "../Params/PADnoteParameters.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local } -decl {\#include "ResonanceUI.h"} {public +decl {\#include "ResonanceUI.h"} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/Fl_Group.H>} {public +decl {\#include <FL/Fl_Group.H>} {public local } -decl {\#include <FL/Fl_File_Chooser.H>} {public +decl {\#include <FL/Fl_File_Chooser.H>} {public local } -decl {\#include <math.h>} {} +decl {\#include <math.h>} {private local +} -decl {\#include <stdio.h>} {} +decl {\#include <stdio.h>} {private local +} -decl {\#include <stdlib.h>} {} +decl {\#include <stdlib.h>} {private local +} -decl {\#include <string.h>} {} +decl {\#include <string.h>} {private local +} -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "EnvelopeUI.h"} {public +decl {\#include "EnvelopeUI.h"} {public local } -decl {\#include "LFOUI.h"} {public +decl {\#include "LFOUI.h"} {public local } -decl {\#include "FilterUI.h"} {public +decl {\#include "FilterUI.h"} {public local } -decl {\#include "OscilGenUI.h"} {public +decl {\#include "OscilGenUI.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local } class PADnoteHarmonicProfile {: {public Fl_Box} @@ -69,16 +73,18 @@ bool active=active_r(); //draw the equivalent bandwidth if (active) fl_color(220,220,220); else fl_color(160,165,165); -fl_line_style(0); +fl_line_style(FL_DASH); int rbw=(int)(realbw*(lx-1.0)/2.0); -for (int i=lx/2-rbw;i<(lx/2+rbw);i++) fl_line(ox+i,oy,ox+i,oy+ly-1); +fl_begin_line(); +for (int i=lx/2-rbw;i<(lx/2+rbw);i++) { fl_vertex(ox+i,oy); } +fl_end_line(); -fl_line_style(0); +fl_line_style(FL_DASH); if (active) fl_color(200,200,200); else fl_color(160,160,160); for (int i=1;i<10;i++){ int kx=(int)(lx/10.0*i); - fl_line(ox+kx,oy,ox+kx,oy+ly-1); + fl_line( ox + kx, oy, ox + kx, oy + ly - 1 ); }; for (int i=1;i<5;i++){ int ky=(int)(ly/5.0*i); @@ -87,22 +93,39 @@ for (int i=1;i<5;i++){ fl_color(120,120,120); -fl_line_style(FL_DOT); +fl_line_style(FL_DASH); fl_line(ox+lx/2,oy,ox+lx/2,oy+ly); //draw the graph -fl_line_style(0); +fl_line_style(FL_SOLID); int old=0; -for (int i=0;i<lx;i++){ - int val=(int) ((ly-2)*smps[i]); + if (active) fl_color(180,210,240); else fl_color(150,150,155); - fl_line(ox+i,oy+ly-1,ox+i,oy+ly-1-val); - if (active) fl_color(0,0,100); - else fl_color(150,150,150); - if (i>0) fl_line(ox+i-1,oy+ly-2-old,ox+i,oy+ly-2-val); + +fl_color( fl_color_add_alpha( fl_color(), 127 ) ); + +fl_begin_polygon(); +fl_vertex( ox, oy + h() ); +for (int i=0;i<lx;i++){ + int val=(int) ((ly-2)*smps[i]); + +// fl_vertex(ox+i,oy+ly-1); + fl_vertex(ox+i,oy+ly-1-val); + + // if (active) fl_color(0,0,100); + // else fl_color(150,150,150); + +// if (i>0) +// { +// fl_vertex(ox+i-1,oy+ly-2-old); +// fl_vertex(ox+i,oy+ly-2-val); +// } + old=val; }; +fl_vertex( ox + w(), oy + h() ); +fl_end_polygon(); fl_line_style(FL_DASH); @@ -113,8 +136,9 @@ fl_line(ox+lx/2+rbw,oy,ox+lx/2+rbw,oy+ly-1); fl_line_style(0);} {} } - decl {Master *master;} {} - decl {PADnoteParameters *pars;} {public + decl {Master *master;} {private local + } + decl {PADnoteParameters *pars;} {public local } } @@ -208,8 +232,9 @@ for (int i=0;i<lx;i++){ };} {} } - decl {Master *master;} {} - decl {PADnoteParameters *pars;} {public + decl {Master *master;} {private local + } + decl {PADnoteParameters *pars;} {public local } } @@ -227,19 +252,19 @@ make_window();} {} } { Fl_Window padnotewindow { label {PAD synth Parameters} open - xywh {281 302 535 450} type Double visible + xywh {291 369 535 435} type Double visible } { Fl_Tabs {} { callback {if (o->value()!=harmonicstructuregroup) applybutton->hide(); - else applybutton->show();} - xywh {0 0 535 395} + else applybutton->show();} open + xywh {0 0 535 395} box UP_FRAME } { Fl_Group harmonicstructuregroup { - label {Harmonic Structure} - xywh {0 20 535 375} box ENGRAVED_BOX + label {Harmonic Structure} open selected + xywh {0 20 535 375} box UP_FRAME } { Fl_Group bwprofilegroup { - xywh {5 30 90 260} box ENGRAVED_BOX + xywh {5 30 90 260} box UP_FRAME code0 {if (pars->Pmode!=0) o->deactivate();} } { Fl_Dial hpbasepar1 { @@ -450,7 +475,7 @@ cbwidget->do_callback();} code1 {if (pars->Pmode!=0) o->deactivate();} } Fl_Group {} { - xywh {315 295 215 45} box ENGRAVED_BOX + xywh {315 295 215 45} box UP_FRAME } { Fl_Choice hrpostype { label OvertonesPosition @@ -559,7 +584,7 @@ cbwidget->do_callback();} } } Fl_Group overtonepos { - xywh {5 345 525 45} box FLAT_BOX color 54 selection_color 218 labelcolor 63 + xywh {5 345 525 45} box FLAT_BOX color 51 selection_color 218 labelcolor 63 code0 {PADnoteOvertonePosition *opui=new PADnoteOvertonePosition(o->x(),o->y(),o->w(),o->h(),"");} code1 {opui->init(pars,master);} } {} @@ -720,7 +745,7 @@ cbwidget->do_callback();} } } Fl_Group hprofile { - xywh {100 45 430 90} box FLAT_BOX color 54 selection_color 218 labelcolor 63 + xywh {100 45 430 90} box FLAT_BOX color 51 selection_color 218 labelcolor 63 code0 {PADnoteHarmonicProfile *hpui=new PADnoteHarmonicProfile(o->x(),o->y(),o->w(),o->h(),"");} code1 {hpui->init(pars,master);} code2 {if (pars->Pmode!=0) { o->deactivate(); o->color(48);};} @@ -768,12 +793,12 @@ cbwidget->do_callback();} } } Fl_Group {} { - label {Envelopes&LFOs} - xywh {0 20 535 375} box ENGRAVED_BOX hide + label {Envelopes&LFOs} open + xywh {0 20 535 375} box UP_FRAME hide } { Fl_Group {} { label FREQUENCY - xywh {5 275 525 115} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 275 525 115} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group freqenv { label {PADSynth - Frequency Envelope} open @@ -798,7 +823,7 @@ pars->PCoarseDetune = k*1024+ if (k<0) k+=1024; pars->PCoarseDetune = k+ (pars->PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {455 365 60 20} labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {455 365 70 20} type Simple labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} @@ -813,7 +838,7 @@ pars->PCoarseDetune = k+ Fl_Slider detune { callback {pars->PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {60 295 295 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {60 295 295 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->PDetune-8192);} } Fl_Value_Output detunevalueoutput { @@ -826,7 +851,7 @@ detunevalueoutput->do_callback();} label {Detune Type} callback {pars->PDetuneType=(int) o->value()+1; detunevalueoutput->do_callback();} open - xywh {450 335 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {450 330 75 20} 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);} } {} @@ -850,18 +875,18 @@ if (x==0) fixedfreqetdial->deactivate(); } Fl_Group {} { label AMPLITUDE - xywh {5 25 240 250} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 25 240 250} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider volume { label Vol callback {pars->PVolume=(int)o->value();} - tooltip Volume xywh {10 50 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 50 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PVolume);} } Fl_Value_Slider vsns { label {V.Sns} callback {pars->PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 70 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 70 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PAmpVelocityScaleFunction);} } Fl_Dial pan { @@ -921,7 +946,7 @@ hprofile->redraw();} } Fl_Group {} { label FILTER - xywh {245 25 285 250} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {245 25 285 250} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group filterenv { label {PADSynth - Filter Envelope} open @@ -956,23 +981,23 @@ if (resui!=NULL) { resui->applybutton->color(FL_GRAY); resui->applybutton->redraw(); };} - xywh {45 405 185 40} box THIN_UP_BOX labelfont 1 labelsize 16 + xywh {300 400 135 30} box THIN_UP_BOX code0 {o->color(FL_RED);} } Fl_Button {} { label Close callback {padnotewindow->hide();} - xywh {320 405 175 40} box THIN_UP_BOX labelsize 17 + xywh {440 400 90 30} box THIN_UP_BOX } Fl_Button {} { label C callback {presetsui->copy(pars);} - xywh {240 430 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {65 400 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {presetsui->paste(pars,this);} - xywh {270 430 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {95 400 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label export @@ -983,8 +1008,8 @@ fl_filename_setext(filename,""); -pars->export2wav(filename);} selected - tooltip {export samples as wav file} xywh {240 405 55 15} box THIN_UP_BOX color 255 labelsize 11 align 128 +pars->export2wav(filename);} + tooltip {export samples as wav file} xywh {5 400 55 30} box THIN_UP_BOX color 51 labelsize 11 align 128 } } } @@ -1088,14 +1113,14 @@ delete(resui); padnotewindow->hide(); delete(padnotewindow);} {} } - decl {PADnoteParameters *pars;} {public + decl {PADnoteParameters *pars;} {public local } - decl {Master *master;} {public + decl {Master *master;} {public local } - decl {OscilEditor *oscui;} {public + decl {OscilEditor *oscui;} {public local } - decl {Oscilloscope *osc;} {public + decl {Oscilloscope *osc;} {public local } - decl {ResonanceUI *resui;} {public + decl {ResonanceUI *resui;} {public local } } diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl @@ -1,54 +1,56 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <string.h>} {public +decl {\#include <string.h>} {public local } -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "EffUI.h"} {public +decl {\#include "EffUI.h"} {public local } -decl {\#include "BankUI.h"} {public +decl {\#include "BankUI.h"} {public local } -decl {\#include "ADnoteUI.h"} {public +decl {\#include "ADnoteUI.h"} {public local } -decl {\#include "SUBnoteUI.h"} {public +decl {\#include "SUBnoteUI.h"} {public local } -decl {\#include "PADnoteUI.h"} {public +decl {\#include "PADnoteUI.h"} {public local } -decl {\#include "../Misc/Config.h"} {public +decl {\#include "../Misc/Config.h"} {public local } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local } -decl {\#include "../Misc/Part.h"} {public +decl {\#include "../Misc/Part.h"} {public local } -class PartSysEffSend {: {public Fl_Group} +class PartSysEffSend {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { Fl_Window syseffsend { - private xywh {584 83 90 35} type Double hide - class Fl_Group + private xywh {586 106 100 100} type Double box NO_BOX + class Fl_Group visible } { Fl_Dial {} { label 01 @@ -78,21 +80,24 @@ end();} {} code {syseffsend->hide(); //delete(syseffsend);} {} } - decl {Master *master;} {} - decl {int neff;} {} - decl {int npart;} {} + decl {Master *master;} {private local + } + decl {int neff;} {private local + } + decl {int npart;} {private local + } } -class PartKitItem {: {public Fl_Group} +class PartKitItem {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { Fl_Window partkititem { - private xywh {113 271 670 30} type Double hide - class Fl_Group + private xywh {470 383 670 100} type Double box NO_BOX + class Fl_Group visible } { Fl_Group partkititemgroup { - private xywh {55 0 605 20} box FLAT_BOX + private xywh {55 0 605 20} code0 {if (part->kit[n].Penabled==0) o->deactivate();} } { Fl_Counter minkcounter { @@ -249,8 +254,7 @@ partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0 } else o->value(1);} } } - Function {init(Part *part_,int n_,Master *master_,class PartUI *partui_)} {selected - } { + Function {init(Part *part_,int n_,Master *master_,class PartUI *partui_)} {} { code {part=part_; n=n_; partui=partui_; @@ -263,22 +267,27 @@ end();} {} code {partkititem->hide(); //delete(partkititem);} {} } - decl {Part *part;} {} - decl {int n;} {} - decl {Master *master;} {} - decl {char label[10];} {} - decl {class PartUI *partui;} {} + decl {Part *part;} {private local + } + decl {int n;} {private local + } + decl {Master *master;} {private local + } + decl {char label[10];} {private local + } + decl {class PartUI *partui;} {private local + } } -class PartUI {: {public Fl_Group} +class PartUI {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window partgroup { - private xywh {424 178 385 180} type Double hide - class Fl_Group + Fl_Window partgroup {open + private xywh {685 241 385 180} type Double box NO_BOX + class Fl_Group visible } { - Fl_Group partgroupui { + Fl_Group partgroupui {open xywh {0 0 385 180} code0 {if (part->Penabled==0) o->deactivate();} } { @@ -297,7 +306,7 @@ class PartUI {: {public Fl_Group} code1 {o->value(part->Pkeyshift-64);} } Fl_Scroll {} {open - xywh {166 91 125 60} box ENGRAVED_FRAME labelfont 1 labelsize 10 align 21 + xywh {166 91 125 49} box UP_BOX labelfont 1 labelsize 10 align 21 } { Fl_Pack {} {open xywh {171 96 115 35} type HORIZONTAL @@ -315,7 +324,7 @@ if (event==FL_RIGHT_MOUSE){ if (event==FL_LEFT_MOUSE) bankui->show(); else instrumenteditwindow->show(); };} - tooltip {left mousebutton - to choose/save/.. from/to bank or right mousebutton to change the name or middle button to change the instrument information} xywh {195 5 185 20} box THIN_DOWN_BOX down_box FLAT_BOX labelfont 1 labelsize 11 align 84 + tooltip {left mousebutton - to choose/save/.. from/to bank or right mousebutton to change the name or middle button to change the instrument information} xywh {195 5 185 20} box UP_FRAME down_box DOWN_FRAME labelfont 1 labelsize 11 align 84 code0 {o->label((char *)part->Pname);} } Fl_Box {} { @@ -369,7 +378,7 @@ if (part->Pminkey>part->Pmaxkey) o->textcolor(FL_RED); Fl_Button {} { label Controllers callback {ctlwindow->show();} - xywh {295 90 85 30} box PLASTIC_UP_BOX labelfont 1 labelsize 11 + xywh {295 90 85 30} labelfont 1 labelsize 11 } Fl_Check_Button {} { label Portamento @@ -380,7 +389,7 @@ if (part->Pminkey>part->Pmaxkey) o->textcolor(FL_RED); Fl_Button {} { label {Edit instrument} callback {instrumenteditwindow->show();} - xywh {15 90 130 30} box PLASTIC_UP_BOX color 230 labelfont 1 labelsize 13 + xywh {15 90 130 30} color 52 labelfont 1 labelsize 13 } Fl_Button {} { label m @@ -452,8 +461,8 @@ if (part->Penabled==0) partgroupui->deactivate(); } } Fl_Window ctlwindow { - label Controllers - private xywh {542 212 500 130} type Double hide + label Controllers open + private xywh {779 238 500 130} type Double box NO_BOX visible } { Fl_Check_Button {} { label Expr @@ -528,16 +537,16 @@ if (part->ctl.sustain.receive==0) { Fl_Button {} { label Close callback {ctlwindow->hide();} - xywh {330 105 95 20} box THIN_UP_BOX + xywh {400 107 95 20} box THIN_UP_BOX } Fl_Button {} { label {Reset all controllers} callback {part->SetController(C_resetallcontrollers,0);} - xywh {5 105 210 20} box THIN_UP_BOX + xywh {5 107 210 20} box THIN_UP_BOX } Fl_Group {} { label Portamento - xywh {280 15 160 90} box ENGRAVED_FRAME labelfont 1 labelsize 10 + xywh {280 15 160 90} box UP_FRAME labelsize 10 } { Fl_Check_Button {} { label Rcv @@ -604,19 +613,19 @@ else {propta->deactivate();proptb->deactivate();}} } Fl_Group {} { label Resonance - xywh {440 15 50 90} box ENGRAVED_BOX labelfont 1 labelsize 10 + xywh {445 15 50 90} box UP_FRAME labelsize 10 } { Fl_Dial {} { label BWdpth callback {part->ctl.resonancebandwidth.depth=(int) o->value();} - tooltip {BandWidth controller depth} xywh {450 60 25 25} labelsize 10 maximum 127 step 1 + tooltip {BandWidth controller depth} xywh {455 60 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.resonancebandwidth.depth);} class WidgetPDial } Fl_Dial {} { label CFdpth callback {part->ctl.resonancecenter.depth=(int) o->value();} - tooltip {Center Frequency controller Depth} xywh {450 20 25 25} labelsize 10 maximum 127 step 1 + tooltip {Center Frequency controller Depth} xywh {455 20 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.resonancecenter.depth);} class WidgetPDial } @@ -635,8 +644,8 @@ else {propta->deactivate();proptb->deactivate();}} } } Fl_Window partfx { - label {Part's Insert Effects} - private xywh {121 424 390 145} type Double hide + label {Part's Insert Effects} selected + private xywh {551 637 390 145} type Double box NO_BOX visible } { Fl_Counter inseffnocounter { label {FX No.} @@ -756,16 +765,16 @@ pthread_mutex_unlock(&master->mutex);} } } Fl_Window instrumentkitlist { - label {Instrument Kit} - xywh {113 324 670 370} type Double hide + label {Instrument Kit} open + xywh {583 543 670 370} type Double box NO_BOX visible } { Fl_Button {} { label {Close Window} callback {instrumentkitlist->hide();} xywh {375 350 160 20} box THIN_UP_BOX } - Fl_Scroll kitlist { - xywh {0 15 670 330} type VERTICAL box THIN_UP_BOX + Fl_Scroll kitlist {open + xywh {0 15 670 330} type VERTICAL box UP_FRAME code0 {if (part->Pkitmode==0) o->deactivate();} } { Fl_Pack {} { @@ -837,11 +846,11 @@ if (part->Pkitmode==0) { } } Fl_Window instrumenteditwindow { - label {Instrument Edit} - xywh {182 214 395 360} type Double hide + label {Instrument Edit} open + xywh {244 602 395 360} type Double box NO_BOX visible } { Fl_Group {} { - xywh {0 220 395 110} box ENGRAVED_FRAME + xywh {0 220 395 110} box UP_FRAME } { Fl_Group {} { label PADsynth @@ -850,7 +859,7 @@ if (part->Pkitmode==0) { Fl_Button padeditbutton { label Edit callback {showparameters(0,2);} - xywh {215 280 80 35} box PLASTIC_UP_BOX color 222 selection_color 220 labelfont 1 labelsize 13 align 128 + xywh {215 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 code0 {if (part->kit[0].Ppadenabled==0) o->deactivate();} } Fl_Check_Button padsynenabledcheck { @@ -859,7 +868,7 @@ if (part->Pkitmode==0) { part->kit[0].Ppadenabled=x; if (x==0) padeditbutton->deactivate(); else padeditbutton->activate();} - tooltip {enable/disable PADsynth} xywh {215 255 80 20} box PLASTIC_UP_BOX down_box DOWN_BOX color 222 selection_color 218 labelfont 1 labelsize 11 + tooltip {enable/disable PADsynth} xywh {215 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 51 labelfont 1 labelsize 11 code1 {o->value(part->kit[0].Ppadenabled);} } } @@ -873,13 +882,13 @@ if (x==0) padeditbutton->deactivate(); part->kit[0].Padenabled=x; if (x==0) adeditbutton->deactivate(); else adeditbutton->activate();} - tooltip {enable/disable ADsynth} xywh {15 255 80 20} box PLASTIC_UP_BOX down_box DOWN_BOX color 222 selection_color 218 labelfont 1 labelsize 11 + tooltip {enable/disable ADsynth} xywh {15 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 51 labelfont 1 labelsize 11 code1 {o->value(part->kit[0].Padenabled);} } Fl_Button adeditbutton { label Edit callback {showparameters(0,0);} - xywh {15 281 80 34} box PLASTIC_UP_BOX color 222 selection_color 220 labelfont 1 labelsize 13 align 128 + xywh {15 281 80 34} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 code0 {if (part->kit[0].Padenabled==0) o->deactivate();} } } @@ -893,29 +902,29 @@ if (x==0) adeditbutton->deactivate(); part->kit[0].Psubenabled=x; if (x==0) subeditbutton->deactivate(); else subeditbutton->activate();} - tooltip {enable/disable SUBsynth} xywh {115 255 80 20} box PLASTIC_UP_BOX down_box DOWN_BOX color 222 selection_color 218 labelfont 1 labelsize 11 + tooltip {enable/disable SUBsynth} xywh {115 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 51 labelfont 1 labelsize 11 code1 {o->value(part->kit[0].Psubenabled);} } Fl_Button subeditbutton { label Edit callback {showparameters(0,1);} - xywh {115 280 80 35} box PLASTIC_UP_BOX color 222 selection_color 220 labelfont 1 labelsize 13 align 128 + xywh {115 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 code0 {if (part->kit[0].Psubenabled==0) o->deactivate();} } } Fl_Button {} { label {Kit Edit} callback {instrumentkitlist->show();} - xywh {310 245 80 35} box PLASTIC_UP_BOX color 238 selection_color 220 labelfont 1 align 128 + xywh {310 245 80 35} color 51 selection_color 51 labelfont 1 align 128 } Fl_Button {} { label Effects callback {partfx->show();} - xywh {310 290 80 35} box PLASTIC_UP_BOX color 230 labelfont 1 labelsize 13 + xywh {310 290 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 } } Fl_Group {} { - xywh {0 5 395 215} box ENGRAVED_FRAME + xywh {0 5 395 215} box UP_FRAME } { Fl_Input {} { label {Author and Copyright} @@ -1107,15 +1116,26 @@ delete(instrumentkitlist); instrumenteditwindow->hide(); delete(instrumenteditwindow);} {} } - decl {Part *part;} {} - decl {Master *master;} {} - decl {BankUI *bankui;} {} - decl {ADnoteUI *adnoteui;} {} - decl {SUBnoteUI *subnoteui;} {} - decl {PADnoteUI *padnoteui;} {} - decl {PartSysEffSend *psyef[NUM_SYS_EFX];} {} - decl {int npart;} {} - decl {int ninseff;} {} - decl {int lastkititem;} {} - decl {PartKitItem *partkititem[NUM_KIT_ITEMS];} {} + decl {Part *part;} {private local + } + decl {Master *master;} {private local + } + decl {BankUI *bankui;} {private local + } + decl {ADnoteUI *adnoteui;} {private local + } + decl {SUBnoteUI *subnoteui;} {private local + } + decl {PADnoteUI *padnoteui;} {private local + } + decl {PartSysEffSend *psyef[NUM_SYS_EFX];} {private local + } + decl {int npart;} {private local + } + decl {int ninseff;} {private local + } + decl {int lastkititem;} {private local + } + decl {PartKitItem *partkititem[NUM_KIT_ITEMS];} {private local + } } diff --git a/src/UI/PresetsUI.fl b/src/UI/PresetsUI.fl @@ -39,7 +39,7 @@ pastewin->hide();delete(pastewin);} {} Function {make_window()} {} { Fl_Window copywin { label {Copy to Clipboard/Preset} - xywh {190 173 265 430} type Double box PLASTIC_THIN_UP_BOX color 238 hide modal + xywh {190 173 265 430} type Double box THIN_UP_BOX color 238 hide modal } { Fl_Browser copybrowse { callback {int val=o->value(); @@ -93,7 +93,7 @@ if (strlen(tmp)>0) { } Fl_Window pastewin { label {Paste from Clipboard/Preset} - xywh {463 173 265 430} type Double box PLASTIC_THIN_UP_BOX color 238 hide modal + xywh {463 173 265 430} type Double box THIN_UP_BOX color 238 hide modal } { Fl_Browser pastebrowse { callback {if (o->value()==0) { diff --git a/src/UI/ResonanceUI.fl b/src/UI/ResonanceUI.fl @@ -1,38 +1,44 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0107 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include <FL/fl_draw.H>} {public +decl {\#include <FL/fl_draw.H>} {public local } -decl {\#include <FL/Fl_Value_Output.H>} {public +decl {\#include <FL/Fl_Value_Output.H>} {public local } -decl {\#include <math.h>} {} +decl {\#include <math.h>} {private local +} -decl {\#include <stdio.h>} {} +decl {\#include <stdio.h>} {private local +} -decl {\#include <stdlib.h>} {} +decl {\#include <stdlib.h>} {private local +} -decl {\#include <string.h>} {} +decl {\#include <string.h>} {private local +} -decl {\#include "../Synth/Resonance.h"} {public +decl {\#include "../Synth/Resonance.h"} {public local } -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local } -class ResonanceGraph {: {public Fl_Box} +class ResonanceGraph {open : {public Fl_Box} } { Function {ResonanceGraph(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {respar=NULL; @@ -46,7 +52,8 @@ dbvalue=dbvalue_; oldx=-1; khzval=-1;} {} } - Function {draw_freq_line(float freq,int type)} {} { + Function {draw_freq_line(float freq,int type)} {open + } { code {float freqx=respar->getfreqpos(freq); switch(type){ case 0:fl_line_style(FL_SOLID);break; @@ -59,11 +66,12 @@ if ((freqx>0.0)&&(freqx<1.0)) fl_line(x()+(int) (freqx*w()),y(), x()+(int) (freqx*w()),y()+h());} {} } - Function {draw()} {} { + Function {draw()} {open + } { code {int ox=x(),oy=y(),lx=w(),ly=h(),i,ix,iy,oiy; float freqx; -fl_color(FL_BLACK); +fl_color(FL_DARK1); fl_rectf(ox,oy,lx,ly); @@ -106,14 +114,18 @@ for (i=1;i<GY;i++){ //draw the data fl_color(FL_RED); -fl_line_style(FL_SOLID); +fl_line_style(FL_SOLID,2); +fl_begin_line(); oiy=(int)(respar->Prespoints[0]/128.0*ly); for (i=1;i<N_RES_POINTS;i++){ ix=(int)(i*1.0/N_RES_POINTS*lx); - iy=(int)(respar->Prespoints[i]/128.0*ly); - fl_line(ox+ix-1,oy+ly-oiy,ox+ix,oy+ly-iy); + iy=(respar->Prespoints[i]/128.0*ly); + fl_vertex(ox+ix,oy+ly-oiy); oiy=iy; -};} {} +}; +fl_end_line(); +fl_line_style(FL_SOLID,0);} {selected + } } Function {handle(int event)} {return_type int } { @@ -175,13 +187,18 @@ return(1);} {} code {this->cbwidget=cbwidget; this->applybutton=applybutton;} {} } - decl {Fl_Value_Output *khzvalue;} {} - decl {Fl_Value_Output *dbvalue;} {} - decl {Resonance *respar;} {} - decl {int oldx,oldy;} {} - decl {float khzval;} {public + decl {Fl_Value_Output *khzvalue;} {private local + } + decl {Fl_Value_Output *dbvalue;} {private local + } + decl {Resonance *respar;} {private local + } + decl {int oldx,oldy;} {private local + } + decl {float khzval;} {public local + } + decl {Fl_Widget *cbwidget,*applybutton;} {private local } - decl {Fl_Widget *cbwidget,*applybutton;} {} } class ResonanceUI {open : PresetsUI_ @@ -189,7 +206,7 @@ class ResonanceUI {open : PresetsUI_ Function {make_window()} {open } { Fl_Window resonancewindow { - label Resonance selected + label Resonance open xywh {120 70 780 305} type Double hide } { Fl_Value_Output khzvalue { @@ -385,8 +402,10 @@ p1st->value(respar->Pprotectthefundamental); rg->redraw();} {} } - decl {Resonance *respar;} {public + decl {Resonance *respar;} {public local + } + decl {ResonanceGraph *rg;} {private local + } + decl {Fl_Widget *cbwidget,*cbapplywidget;} {private local } - decl {ResonanceGraph *rg;} {} - decl {Fl_Widget *cbwidget,*cbapplywidget;} {} } diff --git a/src/UI/SUBnoteUI.fl b/src/UI/SUBnoteUI.fl @@ -1,39 +1,41 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include <stdio.h>} {public +decl {\#include <stdio.h>} {public local } -decl {\#include <string.h>} {public +decl {\#include <string.h>} {public local } -decl {\#include "../globals.h"} {public +decl {\#include "../globals.h"} {public local } -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {\#include "EnvelopeUI.h"} {public +decl {\#include "EnvelopeUI.h"} {public local } -decl {\#include "FilterUI.h"} {public +decl {\#include "FilterUI.h"} {public local } -decl {\#include "../Misc/Util.h"} {public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "../Params/SUBnoteParameters.h"} {public +decl {\#include "../Params/SUBnoteParameters.h"} {public local } -decl {\#include "PresetsUI.h"} {public +decl {\#include "PresetsUI.h"} {public local } class SUBnoteharmonic {: {public Fl_Group} @@ -51,7 +53,7 @@ if (Fl::event_button1()) x=127-(int)o->value(); pars->Phmag[n]=x; if (pars->Phmag[n]==0) o->selection_color(0); else o->selection_color(222);} - tooltip {harmonic's magnitude} xywh {0 15 10 115} type {Vert Knob} box FLAT_BOX selection_color 222 labelcolor 0 maximum 127 step 1 value 127 + tooltip {harmonic's magnitude} xywh {0 15 10 115} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 127 code0 {o->value(127-pars->Phmag[n]);} code1 {if (pars->Phmag[n]==0) o->selection_color(0);} } @@ -92,27 +94,30 @@ end();} {} Function {refresh()} {} { code {mag->value(127-pars->Phmag[n]); if (pars->Phmag[n]==0) mag->selection_color(0); -bw->value(127-pars->Phrelbw[n]);} {selected - } +bw->value(127-pars->Phrelbw[n]);} {} } Function {~SUBnoteharmonic()} {} { code {harmonic->hide(); hide(); //delete(harmonic);} {} } - decl {SUBnoteParameters *pars;} {} - decl {int n;} {} + decl {SUBnoteParameters *pars;} {private local + } + decl {int n;} {private local + } } -class SUBnoteUI {: {public PresetsUI_} +class SUBnoteUI {open : {public PresetsUI_} } { - Function {make_window()} {} { + Function {make_window()} {open + } { Fl_Window SUBparameters { - label {SUBsynth Parameters} - xywh {26 214 735 390} type Double hide + label {SUBsynth Parameters} open + xywh {544 466 735 390} type Double visible } { Fl_Scroll {} { - xywh {5 140 435 245} type HORIZONTAL box THIN_UP_BOX + label scroll open + xywh {5 140 435 245} type HORIZONTAL box FLAT_BOX labeltype NO_LABEL } { Fl_Pack harmonics {open xywh {10 145 425 235} type HORIZONTAL @@ -126,18 +131,18 @@ class SUBnoteUI {: {public PresetsUI_} } Fl_Group {} { label AMPLITUDE - xywh {5 5 215 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 + xywh {5 5 215 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 } { Fl_Value_Slider vol { label Vol callback {pars->PVolume=(int)o->value();} - tooltip Volume xywh {10 25 140 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 25 140 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PVolume);} } Fl_Value_Slider vsns { label {V.Sns} callback {pars->PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 45 140 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 45 140 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PAmpVelocityScaleFunction);} } Fl_Dial pan { @@ -155,7 +160,7 @@ class SUBnoteUI {: {public PresetsUI_} } {} } Fl_Group {} { - xywh {495 325 235 35} box THIN_UP_FRAME + xywh {495 325 235 35} box UP_FRAME } { Fl_Counter filterstages { label {Filter Stages} @@ -169,23 +174,23 @@ class SUBnoteUI {: {public PresetsUI_} xywh {585 340 65 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 11 code0 {o->value(pars->Phmagtype);} } { - menuitem {} { + MenuItem {} { label Linear xywh {20 20 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-40dB} xywh {30 30 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-60dB} xywh {40 40 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-80dB} xywh {50 50 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-100dB} xywh {60 60 100 20} labelfont 1 labelsize 11 } @@ -196,15 +201,15 @@ class SUBnoteUI {: {public PresetsUI_} xywh {670 340 50 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 11 code0 {o->value(pars->Pstart);} } { - menuitem {} { + MenuItem {} { label Zero xywh {30 30 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label RND xywh {40 40 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {Max.} xywh {50 50 100 20} labelfont 1 labelsize 11 } @@ -212,7 +217,7 @@ class SUBnoteUI {: {public PresetsUI_} } Fl_Group freqsettingsui { label FREQUENCY - xywh {440 5 290 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 + xywh {440 5 290 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 } { Fl_Group freqenvelopegroup { label {SUBsynth - Frequency Envelope} open @@ -255,7 +260,7 @@ pars->PCoarseDetune = k+ Fl_Slider detune { callback {pars->PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {495 25 230 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {495 25 230 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->PDetune-8192);} } Fl_Value_Output detunevalueoutput { @@ -292,8 +297,8 @@ detunevalueoutput->do_callback();} open } Fl_Check_Button stereo { label Stereo - callback {pars->Pstereo=(int) o->value();} - xywh {440 325 55 35} box THIN_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 10 + callback {pars->Pstereo=(int) o->value();} selected + xywh {440 325 55 35} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(pars->Pstereo);} } Fl_Button {} { @@ -311,7 +316,7 @@ SUBparameters->redraw();} } Fl_Group bandwidthsettingsui { label BANDWIDTH - xywh {220 5 220 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 + xywh {220 5 220 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 } { Fl_Group bandwidthenvelopegroup { label {SUBsynth - BandWidth Envelope} open @@ -333,19 +338,19 @@ bandwidthsettingsui->redraw();} Fl_Value_Slider bandwidth { label {Band Width} callback {pars->Pbandwidth=(int) o->value();} - xywh {225 40 115 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 1 maximum 127 step 1 + xywh {225 40 115 15} type {Horz Knob} box NO_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->Pbandwidth);} } Fl_Value_Slider bwidthscale { label {B.Width Scale} callback {pars->Pbwscale=(int) o->value()+64;} - tooltip {How much I increase the BandWidth according to lower/higher harmonics} xywh {345 40 90 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 1 minimum -64 maximum 63 step 1 + tooltip {How much I increase the BandWidth according to lower/higher harmonics} xywh {345 40 90 15} type {Horz Knob} box NO_BOX labelsize 10 align 1 minimum -64 maximum 63 step 1 code0 {o->value(pars->Pbwscale-64);} } } Fl_Group globalfiltergroup { label FILTER - xywh {440 140 290 185} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {440 140 290 185} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {if (pars->PGlobalFilterEnabled==0) o->deactivate();} } { Fl_Group filterenv { @@ -356,7 +361,7 @@ bandwidthsettingsui->redraw();} } {} Fl_Group filterui { label {SUBsynthl - Filter} open - xywh {445 170 275 75} box FLAT_BOX color 50 align 144 + xywh {445 165 275 75} box FLAT_BOX color 50 align 144 code0 {o->init(pars->GlobalFilter,&pars->PGlobalFilterVelocityScale,&pars->PGlobalFilterVelocityScaleFunction);} class FilterUI } {} @@ -444,6 +449,8 @@ make_window();} {} SUBparameters->hide(); delete(SUBparameters);} {} } - decl {SUBnoteParameters *pars;} {} - decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {} + decl {SUBnoteParameters *pars;} {private local + } + decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {private local + } } diff --git a/src/UI/VirKeyboard.fl b/src/UI/VirKeyboard.fl @@ -1,55 +1,77 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 +version 1.0300 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local +} -decl {//License: GNU GPL version 2 or later} {} +decl {//License: GNU GPL version 2 or later} {private local +} -decl {\#include <stdlib.h>} {public +decl {\#include <stdlib.h>} {public local } -decl {\#include <FL/fl_draw.H>} {public +decl {\#include <FL/fl_draw.H>} {public local } -decl {\#include <FL/Fl_Box.H>} {public +decl {\#include <FL/Fl_Box.H>} {public local } -decl {\#include "../globals.h"} {public +decl {\#include "../globals.h"} {public local } -decl {\#include "../Misc/Master.h"} {public +decl {\#include "../Misc/Master.h"} {public local } -decl {\#include "../Misc/Util.h"} {selected public +decl {\#include "../Misc/Util.h"} {public local } -decl {\#include "WidgetPDial.h"} {public +decl {\#include "WidgetPDial.h"} {public local } -decl {const int keyspos[12]={0,-1,1,-2,2,3,-4,4,-5,5,-6,6};} {} +decl {\#include "common.H"} {public local +} -decl {const int keysoct1qwerty[]={'q','2','w','3','e','r','5','t','6','y','7','u','i','9','o','0','p','[','=',']','\\\\',FL_Enter,0};} {} +decl {\#ifdef NTK_GUI + \#include "FL/Fl_Shared_Image.H" + \#endif} {public local +} -decl {const int keysoct2qwerty[]={'z','s','x','d','c','v','g','b','h','n','j','m',',','l','.',';','/',0};} {} +decl {const int keyspos[12]={0,-1,1,-2,2,3,-4,4,-5,5,-6,6};} {private local +} -decl {const int keysoct1dw[]={'\\'','2',',','3','.','p','5','y','6','f','7','g','c','9','r','0','l','/',']','=','\\\\',FL_Enter,0};} {} +decl {const int keysoct1qwerty[]={'q','2','w','3','e','r','5','t','6','y','7','u','i','9','o','0','p','[','=',']','\\\\',FL_Enter,0};} {private local +} -decl {const int keysoct2dw[]={';','o','q','e','j','k','i','x','d','b','h','m','w','n','v','s','z',0};} {} +decl {const int keysoct2qwerty[]={'z','s','x','d','c','v','g','b','h','n','j','m',',','l','.',';','/',0};} {private local +} -decl {const int keysoct1qwertz[]={'q','2','w','3','e','r','5','t','6','z','7','u','i','9','o','0','p',252,'\\'','+','\\\\',FL_Enter,0};} {} +decl {const int keysoct1dw[]={'\\'','2',',','3','.','p','5','y','6','f','7','g','c','9','r','0','l','/',']','=','\\\\',FL_Enter,0};} {private local +} -decl {const int keysoct2qwertz[]={'y','s','x','d','c','v','g','b','h','n','j','m',',','l','.',246,'-',0};} {} +decl {const int keysoct2dw[]={';','o','q','e','j','k','i','x','d','b','h','m','w','n','v','s','z',0};} {private local +} -decl {const int keysoct1az[]={'a',233,'z','\\"','e','r','(','t','-','y',232,'u','i',231,'o',224,'p',65106,'=','$',0};} {} +decl {const int keysoct1qwertz[]={'q','2','w','3','e','r','5','t','6','z','7','u','i','9','o','0','p',252,'\\'','+','\\\\',FL_Enter,0};} {private local +} -decl {const int keysoct2az[]={'w','s','x','d','c','v','g','b','h','n','j',',',';','l',':','m','!',0};} {} +decl {const int keysoct2qwertz[]={'y','s','x','d','c','v','g','b','h','n','j','m',',','l','.',246,'-',0};} {private local +} + +decl {const int keysoct1az[]={'a',233,'z','\\"','e','r','(','t','-','y',232,'u','i',231,'o',224,'p',65106,'=','$',0};} {private local +} + +decl {const int keysoct2az[]={'w','s','x','d','c','v','g','b','h','n','j',',',';','l',':','m','!',0};} {private local +} class VirKeys {: {public Fl_Box} } { - decl {static const int N_OCT=6;} {} - decl {static const int SIZE_WHITE=14;} {} - decl {static const int SIZE_BLACK=8;} {} + decl {static const int N_OCT=6;} {private local + } + decl {static const int SIZE_WHITE=14;} {private local + } + decl {static const int SIZE_BLACK=8;} {private local + } Function {VirKeys(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {master=NULL;} {} } @@ -67,6 +89,43 @@ rndvelocity=0;} {} Function {draw()} {} { code {int ox=x(),oy=y(),lx=w(),ly=h()-1,i; +\#ifdef NTK_GUI + Fl_Image *white_up = Fl_Shared_Image::get( PIXMAP_PATH "white_key.png" ); + Fl_Image *white_down = Fl_Shared_Image::get( PIXMAP_PATH "white_key_pressed.png" ); + Fl_Image *black_up = Fl_Shared_Image::get( PIXMAP_PATH "black_key.png" ); + Fl_Image *black_down = Fl_Shared_Image::get( PIXMAP_PATH "black_key_pressed.png" ); + +Fl_Image *key; + +for (i=0;i<N_OCT*12;i++) { + int noct=i/12; + int kv=keyspos[i%12]; + + if (kv>=0){//white keys + if (pressed[i]==0) + key = white_up; + else + key = white_down; + + key->draw( ox + (kv + 7 * noct ) * white_up->w() + 3, oy ); + } +} + +for (i=0;i<N_OCT*12;i++){ + int noct=i/12; + int kv=keyspos[i%12]; + + if ( kv < 0 ) { + kv=keyspos[(i+1)%12]; + if (pressed[i]==0) + key = black_up; + else + key = black_down; + + key->draw( ox + (kv + 7 * noct ) * white_up->w() - black_up->w() / 2 + 2, oy ); + } +} +\#else if (damage()!=1){ fl_color(250,240,230); fl_rectf(ox,oy,lx,ly); @@ -80,8 +139,8 @@ if (damage()!=1){ if ((ik==1)||(ik==2)||(ik==4)||(ik==5)||(ik==6)) fl_rectf(ox+i*SIZE_WHITE-SIZE_BLACK/2,oy, SIZE_BLACK+1,ly*3/5); - }; -}; + } +} for (i=0;i<N_OCT*12;i++){ @@ -101,8 +160,10 @@ for (i=0;i<N_OCT*12;i++){ else fl_color(FL_BLUE); fl_rectf(ox+(kv+7*noct)*SIZE_WHITE-SIZE_BLACK/2+2,oy+2, SIZE_BLACK-3,ly*3/5-5); - }; -};} {} + } +} +\#endif +} {} } Function {handle(int event)} {return_type int } { @@ -225,25 +286,29 @@ pthread_mutex_unlock(&master->mutex);} {} Function {relaseallkeys(int type)} {} { code {for (int i=0;i<N_OCT*12;i++) relasekey(i,type);} {} } - decl {Master *master;} {} - decl {int pressed[N_OCT*12+1];} {} - decl {unsigned char midich;} {public + decl {Master *master;} {private local + } + decl {int pressed[N_OCT*12+1];} {private local } - decl {unsigned char midivel;} {public + decl {unsigned char midich;} {public local } - decl {char midioct,keyoct1,keyoct2;} {public + decl {unsigned char midivel;} {public local } - decl {unsigned char rndvelocity;} {public + decl {char midioct,keyoct1,keyoct2;} {public local + } + decl {unsigned char rndvelocity;} {public local } } -class VirKeyboard {} { - Function {make_window()} {} { +class VirKeyboard {open +} { + Function {make_window()} {open + } { Fl_Window virkeyboardwindow { label {Virtual Keyboard - ZynAddSubFX} callback {relaseallkeys(); -virkeyboardwindow->hide();} - xywh {95 563 650 130} type Double hide +virkeyboardwindow->hide();} open + xywh {97 574 650 130} type Double visible } { Fl_Box virkeys { label Keyboard @@ -270,8 +335,8 @@ virkeys->take_focus();} Fl_Value_Slider {} { label Vel callback {virkeys->midivel=(int) o->value(); -virkeys->take_focus();} - tooltip Velocity xywh {95 105 100 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum 1 maximum 127 step 1 +virkeys->take_focus();} selected + tooltip Velocity xywh {95 105 100 15} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum 1 maximum 127 step 1 code0 {o->value(virkeys->midivel);} } Fl_Counter {} { @@ -378,7 +443,7 @@ virkeys->take_focus();} master->setController(virkeys->midich,C_pitchwheel,-(int) o->value()); pthread_mutex_unlock(&master->mutex); virkeys->take_focus();} - tooltip {Pitch Wheel} xywh {625 10 20 95} box PLASTIC_UP_BOX labelsize 8 align 1 when 3 minimum -8192 maximum 8192 step 64 + tooltip {Pitch Wheel} xywh {625 10 20 95} box UP_BOX labelsize 8 align 1 when 3 minimum -8192 maximum 8192 step 64 } Fl_Button {} { label R @@ -418,6 +483,8 @@ make_window();} {} Function {relaseallkeys()} {} { code {virkeys->relaseallkeys(0);} {} } - decl {Master *master;} {} - decl {int midictl;} {} + decl {Master *master;} {private local + } + decl {int midictl;} {private local + } } diff --git a/src/UI/WidgetPDial.cpp b/src/UI/WidgetPDial.cpp @@ -115,6 +115,9 @@ WidgetPDial::~WidgetPDial() int WidgetPDial::handle(int event) { +#ifdef NTK_GUI + return Fl_Dial::handle( event ); +#else double dragsize, min = minimum(), max = maximum(); int my; @@ -153,30 +156,42 @@ int WidgetPDial::handle(int event) break; } return 0; +#endif } void WidgetPDial::drawgradient(int cx, int cy, int sx, double m1, double m2) { +#ifdef NTK_GUI + return; +#else for(int i = (int)(m1 * sx); i < (int)(m2 * sx); i++) { double tmp = 1.0f - powf(i * 1.0f / sx, 2.0f); pdialcolor(140 + (int) (tmp * 90), 140 + (int)(tmp * 90), 140 + (int) (tmp * 100)); - fl_arc(cx + sx / 2 - i / 2, cy + sx / 2 - i / 2, i, i, 0, 360); + fl_arc(cx + sx / 2 - i / 2, cy + sx / 2 - i / 2, i, i, 0, 360 ); } +#endif } void WidgetPDial::draw() { +#ifdef NTK_GUI + box( FL_NO_BOX ); + + Fl_Dial::draw(); + + return; +#else int cx = x(), cy = y(), sx = w(), sy = h(); //clears the button face pdialcolor(190, 190, 200); fl_pie(cx - 1, cy - 1, sx + 2, sy + 2, 0, 360); - //Draws the button face (gradinet) - drawgradient(cx, cy, sx, 0.5f, 1.0f); + /* //Draws the button face (gradinet) */ + drawgradient(cx, cy, sx, 0.5f, 1.0f); double val = (value() - minimum()) / (maximum() - minimum()); @@ -190,6 +205,8 @@ void WidgetPDial::draw() drawgradient(cx, cy, sx, 0.0f, 0.75f); + + //draws the value double a = -(a2 - a1) * val - a1; @@ -220,6 +237,7 @@ void WidgetPDial::draw() fl_end_polygon(); fl_pop_matrix(); +#endif } void WidgetPDial::pdialcolor(int r, int g, int b) diff --git a/src/UI/common.H b/src/UI/common.H @@ -0,0 +1,29 @@ + +/*******************************************************************************/ +/* Copyright (C) 2012 Jonathan Moore Liles */ +/* */ +/* This program is free software; you can redistribute it and/or modify it */ +/* under the terms of the GNU General Public License as published by the */ +/* Free Software Foundation; either version 2 of the License, or (at your */ +/* option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, but WITHOUT */ +/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ +/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */ +/* more details. */ +/* */ +/* You should have received a copy of the GNU General Public License along */ +/* with This program; see the file COPYING. If not,write to the Free Software */ +/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*******************************************************************************/ + +class Fl_Widget; +extern void set_module_parameters ( Fl_Widget * ); + +#ifdef FLTK_GUI +#define fl_color_add_alpha( x,y ) x +#undef FL_NO_BOX +#undef FL_UP_FRAME +#define FL_NO_BOX FL_FLAT_BOX +#define FL_UP_FRAME FL_UP_BOX +#endif diff --git a/src/main.cpp b/src/main.cpp @@ -20,6 +20,10 @@ */ +#include <FL/Fl.H> + +#include "UI/common.H" + #include <iostream> #include <cmath> #include <cctype> @@ -37,7 +41,6 @@ #include "Misc/Dump.h" extern Dump dump; -#include <FL/Fl.H> //Nio System #include "Nio/Nio.h" @@ -50,8 +53,12 @@ extern Dump dump; QApplication *app; #elif defined FLTK_GUI - #include "UI/MasterUI.h" +#elif defined NTK_GUI +#include "UI/MasterUI.h" +#include <FL/Fl_Shared_Image.H> +#include <FL/Fl_Tiled_Image.H> +#include <FL/Fl_Dial.H> #endif // FLTK_GUI MasterUI *ui; @@ -88,6 +95,30 @@ void sigterm_exit(int /*sig*/) Pexitprogram = 1; } + +#ifndef DISABLE_GUI + +#ifdef NTK_GUI +static Fl_Tiled_Image *module_backdrop; +#endif + +void +set_module_parameters ( Fl_Widget *o ) +{ +#ifdef NTK_GUI + o->box( FL_DOWN_FRAME ); + o->align( o->align() | FL_ALIGN_IMAGE_BACKDROP ); + o->color( FL_BLACK ); + o->image( module_backdrop ); + o->labeltype( FL_SHADOW_LABEL ); +#else + o->box( FL_UP_BOX ); + o->color( FL_CYAN ); + o->labeltype( FL_EMBOSSED_LABEL ); +#endif +} +#endif + /* * Program initialisation */ @@ -400,9 +431,25 @@ int main(int argc, char *argv[]) #ifndef DISABLE_GUI - ui = new MasterUI(master, &Pexitprogram); - if(!noui) { +#ifdef NTK_GUI + fl_register_images(); + + Fl_Dial::default_style( Fl_Dial::PIXMAP_DIAL ); + Fl_Dial::default_image( Fl_Shared_Image::get( PIXMAP_PATH "/knob.png" ) ); + + Fl::scheme_bg( new Fl_Tiled_Image( Fl_Shared_Image::get( PIXMAP_PATH "/window_backdrop.png" ))); + module_backdrop = new Fl_Tiled_Image( Fl_Shared_Image::get( PIXMAP_PATH "/module_backdrop.png" )); + + Fl::background( 50, 50, 50 ); + Fl::background2( 70, 70, 70 ); + Fl::foreground( 255,255,255 ); +#endif + + ui = new MasterUI(master, &Pexitprogram); + + if ( !noui) + { ui->showUI(); if(!ioGood)