From 8603b0dd5d145c8a19e7ea86dd47989633cad058 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 21 Nov 2012 23:01:15 +0000 Subject: [PATCH] Update ZynAddSubFX to latest git --- c++/carla-native/zynaddsubfx/CMakeLists.txt | 22 +- c++/carla-native/zynaddsubfx/Misc/Master.cpp | 21 +- c++/carla-native/zynaddsubfx/Misc/Master.h | 3 +- .../zynaddsubfx/Misc/Recorder.cpp | 14 +- c++/carla-native/zynaddsubfx/Misc/Util.cpp | 5 - c++/carla-native/zynaddsubfx/Nio/Nio.cpp | 25 ++- c++/carla-native/zynaddsubfx/Nio/Nio.h | 9 + .../zynaddsubfx/Output/DSSIaudiooutput.cpp | 12 + .../zynaddsubfx/Params/PresetsStore.h | 7 +- .../zynaddsubfx/Tests/AdNoteTest.h | 27 ++- .../zynaddsubfx/Tests/CMakeLists.txt | 3 + .../zynaddsubfx/Tests/ControllerTest.h | 2 +- c++/carla-native/zynaddsubfx/Tests/EchoTest.h | 5 +- .../zynaddsubfx/Tests/MicrotonalTest.h | 2 +- .../zynaddsubfx/Tests/OscilGenTest.h | 21 ++ .../zynaddsubfx/Tests/PadNoteTest.h | 207 ++++++++++++++++++ .../zynaddsubfx/Tests/SubNoteTest.h | 22 ++ c++/carla-native/zynaddsubfx/UI/ADnoteUI.fl | 97 ++++---- c++/carla-native/zynaddsubfx/UI/BankUI.fl | 63 +++--- c++/carla-native/zynaddsubfx/UI/EffUI.fl | 53 ++--- c++/carla-native/zynaddsubfx/UI/EnvelopeUI.fl | 62 +++--- c++/carla-native/zynaddsubfx/UI/FilterUI.fl | 58 ++--- c++/carla-native/zynaddsubfx/UI/LFOUI.fl | 35 ++- c++/carla-native/zynaddsubfx/UI/MasterUI.fl | 121 ++++------ c++/carla-native/zynaddsubfx/UI/NSM.C | 37 ++-- c++/carla-native/zynaddsubfx/UI/OscilGenUI.fl | 97 ++++---- c++/carla-native/zynaddsubfx/UI/PADnoteUI.fl | 66 +++--- c++/carla-native/zynaddsubfx/UI/PartUI.fl | 103 ++++----- .../zynaddsubfx/UI/ResonanceUI.fl | 57 ++--- c++/carla-native/zynaddsubfx/UI/SUBnoteUI.fl | 42 ++-- .../zynaddsubfx/UI/VirKeyboard.fl | 89 +++----- c++/carla-native/zynaddsubfx/main.cpp | 4 + 32 files changed, 759 insertions(+), 632 deletions(-) create mode 100644 c++/carla-native/zynaddsubfx/Tests/PadNoteTest.h diff --git a/c++/carla-native/zynaddsubfx/CMakeLists.txt b/c++/carla-native/zynaddsubfx/CMakeLists.txt index 0899ba0..7a913fd 100644 --- a/c++/carla-native/zynaddsubfx/CMakeLists.txt +++ b/c++/carla-native/zynaddsubfx/CMakeLists.txt @@ -13,7 +13,8 @@ find_package(Alsa) pkg_check_modules(JACK jack) pkg_check_modules(PORTAUDIO portaudio-2.0>=19) set(FLTK_SKIP_OPENGL true) -find_package(NTK) +pkg_check_modules(NTK ntk) +pkg_check_modules(NTK_IMAGES ntk_images) find_package(FLTK) find_package(OpenGL) #for FLTK find_package(CxxTest) @@ -255,24 +256,19 @@ if(FltkGui) 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}) + find_program( FLTK_FLUID_EXECUTABLE ntk-fluid) + + message(STATUS ${NTK_LDFLAGS} ${NTK_IMAGES_LDFLAGS}) - set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) + set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_IMAGES_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) add_definitions(-DNTK_GUI) message(STATUS "Will build NTK gui") include_directories( - ${NTK_INCLUDE_DIR} + ${NTK_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/UI" "${CMAKE_CURRENT_BINARY_DIR}/UI" ) @@ -333,8 +329,8 @@ message(STATUS "using link directories: ${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIR add_executable(zynaddsubfx main.cpp) target_link_libraries(zynaddsubfx - zynaddsubfx_nio zynaddsubfx_core + zynaddsubfx_nio ${GUI_LIBRARIES} ${NIO_LIBRARIES} ${AUDIO_LIBRARIES} @@ -347,8 +343,6 @@ if (DssiEnable) target_link_libraries(zynaddsubfx_dssi zynaddsubfx_core - ${NIO_LIBRARIES} - ${AUDIO_LIBRARIES} ${OS_LIBRARIES} ) if (${CMAKE_SIZEOF_VOID_P} EQUAL "8") diff --git a/c++/carla-native/zynaddsubfx/Misc/Master.cpp b/c++/carla-native/zynaddsubfx/Misc/Master.cpp index 33e75cd..c3321b1 100644 --- a/c++/carla-native/zynaddsubfx/Misc/Master.cpp +++ b/c++/carla-native/zynaddsubfx/Misc/Master.cpp @@ -40,8 +40,6 @@ using namespace std; -static Master* masterInstance = nullptr; - vuData::vuData(void) :outpeakl(0.0f), outpeakr(0.0f), maxoutpeakl(0.0f), maxoutpeakr(0.0f), rmspeakl(0.0f), rmspeakr(0.0f), clipped(0) @@ -121,21 +119,13 @@ bool Master::mutexLock(lockset request) return false; } -Master& Master::getInstance() +Master &Master::getInstance() { - if (! masterInstance) - masterInstance = new Master; - - return *masterInstance; -} + static Master *instance = NULL; + if(!instance) + instance = new Master; -void Master::deleteInstance() -{ - if (masterInstance) - { - delete masterInstance; - masterInstance = nullptr; - } + return *instance; } /* @@ -529,7 +519,6 @@ Master::~Master() delete sysefx[nefx]; delete fft; - FFT_cleanup(); pthread_mutex_destroy(&mutex); pthread_mutex_destroy(&vumutex); diff --git a/c++/carla-native/zynaddsubfx/Misc/Master.h b/c++/carla-native/zynaddsubfx/Misc/Master.h index 3503837..32509a9 100644 --- a/c++/carla-native/zynaddsubfx/Misc/Master.h +++ b/c++/carla-native/zynaddsubfx/Misc/Master.h @@ -57,8 +57,7 @@ class Master /** Destructor*/ ~Master(); - static Master& getInstance(); - static void deleteInstance(); + static Master &getInstance(); /**Saves all settings to a XML file * @return 0 for ok or <0 if there is an error*/ diff --git a/c++/carla-native/zynaddsubfx/Misc/Recorder.cpp b/c++/carla-native/zynaddsubfx/Misc/Recorder.cpp index 78aef06..fede701 100644 --- a/c++/carla-native/zynaddsubfx/Misc/Recorder.cpp +++ b/c++/carla-native/zynaddsubfx/Misc/Recorder.cpp @@ -23,8 +23,7 @@ #include #include "Recorder.h" #include "WavFile.h" -#include "../Nio/OutMgr.h" -#include "../Nio/WavEngine.h" +#include "../Nio/Nio.h" Recorder::Recorder() :status(0), notetrigger(0) @@ -46,8 +45,7 @@ int Recorder::preparefile(std::string filename_, int overwrite) return 1; } - OutMgr::getInstance(). wave->newFile(new WavFile(filename_, - synth->samplerate, 2)); + Nio::waveNew(new WavFile(filename_, synth->samplerate, 2)); status = 1; //ready @@ -62,15 +60,15 @@ void Recorder::start() void Recorder::stop() { - OutMgr::getInstance(). wave->Stop(); - OutMgr::getInstance(). wave->destroyFile(); + Nio::waveStop(); + Nio::waveStart(); status = 0; } void Recorder::pause() { status = 0; - OutMgr::getInstance(). wave->Stop(); + Nio::waveStop(); } int Recorder::recording() @@ -85,7 +83,7 @@ void Recorder::triggernow() { if(status == 2) { if(notetrigger != 1) - OutMgr::getInstance().wave->Start(); + Nio::waveStart(); notetrigger = 1; } } diff --git a/c++/carla-native/zynaddsubfx/Misc/Util.cpp b/c++/carla-native/zynaddsubfx/Misc/Util.cpp index 02ee498..d75ab2f 100644 --- a/c++/carla-native/zynaddsubfx/Misc/Util.cpp +++ b/c++/carla-native/zynaddsubfx/Misc/Util.cpp @@ -211,11 +211,6 @@ float interpolate(const float *data, size_t len, float pos) r_pos = l_pos + 1; const float leftness = pos - l_pos; return data[l_pos] * leftness + data[r_pos] * (1.0f - leftness); - -#ifdef NDEBUG - // unused - (void)len; -#endif } float cinterpolate(const float *data, size_t len, float pos) diff --git a/c++/carla-native/zynaddsubfx/Nio/Nio.cpp b/c++/carla-native/zynaddsubfx/Nio/Nio.cpp index a9aa45b..0026437 100644 --- a/c++/carla-native/zynaddsubfx/Nio/Nio.cpp +++ b/c++/carla-native/zynaddsubfx/Nio/Nio.cpp @@ -4,6 +4,7 @@ #include "EngineMgr.h" #include "MidiIn.h" #include "AudioOut.h" +#include "WavEngine.h" #include #include using std::string; @@ -17,8 +18,8 @@ EngineMgr *eng = NULL; string postfix; bool Nio::autoConnect = false; -string Nio::defaultSource = ""; //IN_DEFAULT; -string Nio::defaultSink = ""; //OUT_DEFAULT; +string Nio::defaultSource = IN_DEFAULT; +string Nio::defaultSink = OUT_DEFAULT; void Nio::init(void) { @@ -115,3 +116,23 @@ void Nio::preferedSampleRate(unsigned &rate) void Nio::preferedSampleRate(unsigned &) {} #endif + +void Nio::waveNew(class WavFile *wave) +{ + out->wave->newFile(wave); +} + +void Nio::waveStart(void) +{ + out->wave->Start(); +} + +void Nio::waveStop(void) +{ + out->wave->Stop(); +} + +void Nio::waveEnd(void) +{ + out->wave->destroyFile(); +} diff --git a/c++/carla-native/zynaddsubfx/Nio/Nio.h b/c++/carla-native/zynaddsubfx/Nio/Nio.h index 0cae472..ba050b8 100644 --- a/c++/carla-native/zynaddsubfx/Nio/Nio.h +++ b/c++/carla-native/zynaddsubfx/Nio/Nio.h @@ -3,6 +3,8 @@ #include #include +class WavFile; + /**Interface to Nio Subsystem * * Should be only externally included header */ @@ -30,6 +32,13 @@ namespace Nio //Get the prefered sample rate from jack (if running) void preferedSampleRate(unsigned &rate); + + //Wave writing + void waveNew(class WavFile *wave); + void waveStart(void); + void waveStop(void); + void waveEnd(void); + extern bool autoConnect; extern std::string defaultSource; extern std::string defaultSink; diff --git a/c++/carla-native/zynaddsubfx/Output/DSSIaudiooutput.cpp b/c++/carla-native/zynaddsubfx/Output/DSSIaudiooutput.cpp index 162836c..1499792 100644 --- a/c++/carla-native/zynaddsubfx/Output/DSSIaudiooutput.cpp +++ b/c++/carla-native/zynaddsubfx/Output/DSSIaudiooutput.cpp @@ -37,6 +37,18 @@ using std::string; using std::vector; +//Dummy variables and functions for linking purposes +const char *instance_name = 0; +class WavFile; +namespace Nio { + bool start(void){return 1;}; + void stop(void){}; + void waveNew(WavFile *){} + void waveStart(void){} + void waveStop(void){} + void waveEnd(void){} +} + // // Static stubs for LADSPA member functions // diff --git a/c++/carla-native/zynaddsubfx/Params/PresetsStore.h b/c++/carla-native/zynaddsubfx/Params/PresetsStore.h index 8aa2f56..a2f48fd 100644 --- a/c++/carla-native/zynaddsubfx/Params/PresetsStore.h +++ b/c++/carla-native/zynaddsubfx/Params/PresetsStore.h @@ -20,8 +20,8 @@ */ -#ifndef _PRESETSTORE_H_ -#define _PRESETSTORE_H_ +#ifndef PRESETSTORE_H +#define PRESETSTORE_H #include #include @@ -67,5 +67,4 @@ class PresetsStore }; extern PresetsStore presetsstore; - -#endif // _PRESETSTORE_H_ +#endif diff --git a/c++/carla-native/zynaddsubfx/Tests/AdNoteTest.h b/c++/carla-native/zynaddsubfx/Tests/AdNoteTest.h index fe5e172..c296e9c 100644 --- a/c++/carla-native/zynaddsubfx/Tests/AdNoteTest.h +++ b/c++/carla-native/zynaddsubfx/Tests/AdNoteTest.h @@ -1,3 +1,27 @@ +/* + ZynAddSubFX - a software synthesizer + + AdNoteTest.h - CxxTest for Synth/ADnote + Copyright (C) 2009-2011 Mark McCurry + Copyright (C) 2009 Harald Hvaal + Authors: Mark McCurry, Harald Hvaal + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + + #include #include #include @@ -9,9 +33,10 @@ #include "../Params/Presets.h" #include "../DSP/FFTwrapper.h" #include "../globals.h" +SYNTH_T *synth; using namespace std; -SYNTH_T *synth; + class AdNoteTest:public CxxTest::TestSuite { diff --git a/c++/carla-native/zynaddsubfx/Tests/CMakeLists.txt b/c++/carla-native/zynaddsubfx/Tests/CMakeLists.txt index c1f860f..a3e0054 100644 --- a/c++/carla-native/zynaddsubfx/Tests/CMakeLists.txt +++ b/c++/carla-native/zynaddsubfx/Tests/CMakeLists.txt @@ -11,6 +11,7 @@ CXXTEST_ADD_TEST(ADnoteTest AdNoteTest.cpp CXXTEST_ADD_TEST(SUBnoteTest SubNoteTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/SubNoteTest.h) CXXTEST_ADD_TEST(OscilGenTest OscilGenTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/OscilGenTest.h) CXXTEST_ADD_TEST(RandTest RandTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/RandTest.h) +CXXTEST_ADD_TEST(PADnoteTest PadNoteTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/PadNoteTest.h) #Extra libraries added to make test and full compilation use the same library #links for quirky compilers @@ -25,3 +26,5 @@ target_link_libraries(MicrotonalTest ${test_lib}) target_link_libraries(OscilGenTest ${test_lib}) target_link_libraries(XMLwrapperTest ${test_lib}) target_link_libraries(RandTest ${test_lib}) +target_link_libraries(PADnoteTest ${test_lib}) + diff --git a/c++/carla-native/zynaddsubfx/Tests/ControllerTest.h b/c++/carla-native/zynaddsubfx/Tests/ControllerTest.h index 1a6147a..f9b9704 100644 --- a/c++/carla-native/zynaddsubfx/Tests/ControllerTest.h +++ b/c++/carla-native/zynaddsubfx/Tests/ControllerTest.h @@ -2,7 +2,7 @@ ZynAddSubFX - a software synthesizer ControllerTest.h - CxxTest for Params/Controller - Copyright (C) 2009-2009 Mark McCurry + Copyright (C) 2009-2011 Mark McCurry Author: Mark McCurry This program is free software; you can redistribute it and/or modify diff --git a/c++/carla-native/zynaddsubfx/Tests/EchoTest.h b/c++/carla-native/zynaddsubfx/Tests/EchoTest.h index 08e5e9d..bf94b97 100644 --- a/c++/carla-native/zynaddsubfx/Tests/EchoTest.h +++ b/c++/carla-native/zynaddsubfx/Tests/EchoTest.h @@ -2,8 +2,9 @@ ZynAddSubFX - a software synthesizer EchoTest.h - CxxTest for Effect/Echo - Copyright (C) 2009-2009 Mark McCurry - Author: Mark McCurry + Copyright (C) 2009-2011 Mark McCurry + Copyright (C) 2009 Harald Hvaal + Authors: Mark McCurry, Harald Hvaal This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License diff --git a/c++/carla-native/zynaddsubfx/Tests/MicrotonalTest.h b/c++/carla-native/zynaddsubfx/Tests/MicrotonalTest.h index ae0641c..6ce1ca5 100644 --- a/c++/carla-native/zynaddsubfx/Tests/MicrotonalTest.h +++ b/c++/carla-native/zynaddsubfx/Tests/MicrotonalTest.h @@ -2,7 +2,7 @@ ZynAddSubFX - a software synthesizer MicrotonalTest.h - CxxTest for Misc/Microtonal - Copyright (C) 2009-2009 Mark McCurry + Copyright (C) 2009-2012 Mark McCurry Author: Mark McCurry This program is free software; you can redistribute it and/or modify diff --git a/c++/carla-native/zynaddsubfx/Tests/OscilGenTest.h b/c++/carla-native/zynaddsubfx/Tests/OscilGenTest.h index 1c7c5d4..b0e13b2 100644 --- a/c++/carla-native/zynaddsubfx/Tests/OscilGenTest.h +++ b/c++/carla-native/zynaddsubfx/Tests/OscilGenTest.h @@ -1,3 +1,24 @@ +/* + ZynAddSubFX - a software synthesizer + + AdNoteTest.h - CxxTest for Synth/OscilGen + Copyright (C) 20011-2012 Mark McCurry + Author: Mark McCurry + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ #include #include #include "../Synth/OscilGen.h" diff --git a/c++/carla-native/zynaddsubfx/Tests/PadNoteTest.h b/c++/carla-native/zynaddsubfx/Tests/PadNoteTest.h new file mode 100644 index 0000000..5e202b3 --- /dev/null +++ b/c++/carla-native/zynaddsubfx/Tests/PadNoteTest.h @@ -0,0 +1,207 @@ +/* + ZynAddSubFX - a software synthesizer + + PadNoteTest.h - CxxTest for Synth/PADnote + Copyright (C) 20012 zco + Author: zco + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + + +//Based Upon AdNoteTest.h and SubNoteTest.h +#include +#include +#include +#include +#include +#include "../Misc/Master.h" +#include "../Misc/Util.h" +#include "../Synth/PADnote.h" +#include "../Params/Presets.h" +#include "../DSP/FFTwrapper.h" +#include "../globals.h" +SYNTH_T *synth; + +using namespace std; + +class PadNoteTest:public CxxTest::TestSuite +{ + public: + PADnote *note; + Master *master; + FFTwrapper *fft; + Controller *controller; + unsigned char testnote; + + + float *outR, *outL; + + void setUp() { + synth = new SYNTH_T; + //First the sensible settings and variables that have to be set: + synth->buffersize = 256; + + outL = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + *(outL + i) = 0; + outR = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + *(outR + i) = 0; + + //next the bad global variables that for some reason have not been properly placed in some + //initialization routine, but rather exist as cryptic oneliners in main.cpp: + denormalkillbuf = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + denormalkillbuf[i] = 0; + + //phew, glad to get thouse out of my way. took me a lot of sweat and gdb to get this far... + + fft = new FFTwrapper(synth->oscilsize); + //prepare the default settings + PADnoteParameters *defaultPreset = new PADnoteParameters(fft,NULL); + + + //Assert defaults + ///TS_ASSERT(!defaultPreset->VoicePar[1].Enabled); + + XMLwrapper *wrap = new XMLwrapper(); + cout << string(SOURCE_DIR) + string("/guitar-adnote.xmz") + << endl; + wrap->loadXMLfile(string(SOURCE_DIR) + + string("/guitar-adnote.xmz")); + TS_ASSERT(wrap->enterbranch("MASTER")); + TS_ASSERT(wrap->enterbranch("PART", 2)); + TS_ASSERT(wrap->enterbranch("INSTRUMENT")); + TS_ASSERT(wrap->enterbranch("INSTRUMENT_KIT")); + TS_ASSERT(wrap->enterbranch("INSTRUMENT_KIT_ITEM", 0)); + TS_ASSERT(wrap->enterbranch("PAD_SYNTH_PARAMETERS")); + defaultPreset->getfromXML(wrap); + + + //defaultPreset->defaults(); + defaultPreset->applyparameters(false); + + //verify xml was loaded + ///TS_ASSERT(defaultPreset->VoicePar[1].Enabled); + + + + controller = new Controller(); + + //lets go with.... 50! as a nice note + testnote = 50; + float freq = 440.0f * powf(2.0f, (testnote - 69.0f) / 12.0f); + + note = new PADnote(defaultPreset, + controller, + freq, + 120, + 0, + testnote, + false); + + //delete defaultPreset; + delete wrap; + } + + void willNoteBeRunButIsHereForLinkingReasonsHowsThisForCamelCaseEh() + { + master = new Master(); + } + + void tearDown() { + delete note; + delete controller; + delete fft; + delete [] outL; + delete [] outR; + delete [] denormalkillbuf; + FFT_cleanup(); + delete synth; + } + + void testDefaults() { + int sampleCount = 0; + + +//#define WRITE_OUTPUT + +#ifdef WRITE_OUTPUT + ofstream file("padnoteout", ios::out); +#endif + note->noteout(outL, outR); + +#ifdef WRITE_OUTPUT + for(int i = 0; i < synth->buffersize; ++i) + file << outL[i] << std::endl; + +#endif + sampleCount += synth->buffersize; + + TS_ASSERT_DELTA(outL[255], 0.0660f, 0.0001f); + + + note->relasekey(); + + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], -0.0729f, 0.0001f); + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], 0.0613f, 0.0001f); + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], 0.0378f, 0.0005f); + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], -0.0070f, 0.0001f); + + while(!note->finished()) { + note->noteout(outL, outR); + +#ifdef WRITE_OUTPUT + for(int i = 0; i < synth->buffersize; ++i) + file << outL[i] << std::endl; + +#endif + sampleCount += synth->buffersize; + } +#ifdef WRITE_OUTPUT + file.close(); +#endif + + TS_ASSERT_EQUALS(sampleCount, 2304); + } + +#define OUTPUT_PROFILE +#ifdef OUTPUT_PROFILE + void testSpeed() { + const int samps = 15000; + + int t_on = clock(); // timer before calling func + for(int i = 0; i < samps; ++i) + note->noteout(outL, outR); + int t_off = clock(); // timer when func returns + + printf("PadNoteTest: %f seconds for %d Samples to be generated.\n", + (static_cast(t_off - t_on)) / CLOCKS_PER_SEC, samps); + } +#endif +}; diff --git a/c++/carla-native/zynaddsubfx/Tests/SubNoteTest.h b/c++/carla-native/zynaddsubfx/Tests/SubNoteTest.h index b97a342..0708a73 100644 --- a/c++/carla-native/zynaddsubfx/Tests/SubNoteTest.h +++ b/c++/carla-native/zynaddsubfx/Tests/SubNoteTest.h @@ -1,3 +1,25 @@ +/* + ZynAddSubFX - a software synthesizer + + AdNoteTest.h - CxxTest for Synth/SUBnote + Copyright (C) 2009-2011 Mark McCurry + Author: Mark McCurry + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + //Based Upon AdNoteTest.h #include #include diff --git a/c++/carla-native/zynaddsubfx/UI/ADnoteUI.fl b/c++/carla-native/zynaddsubfx/UI/ADnoteUI.fl index e710574..ed20e82 100644 --- a/c++/carla-native/zynaddsubfx/UI/ADnoteUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/ADnoteUI.fl @@ -1,59 +1,53 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include "../Params/ADnoteParameters.h"} {public local +decl {\#include "../Params/ADnoteParameters.h"} {public } -decl {\#include "../Misc/Util.h"} {public local +decl {\#include "../Misc/Util.h"} {public } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -decl {\#include "ResonanceUI.h"} {public local +decl {\#include "ResonanceUI.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "EnvelopeUI.h"} {public local +decl {\#include "EnvelopeUI.h"} {public } -decl {\#include "LFOUI.h"} {public local +decl {\#include "LFOUI.h"} {public } -decl {\#include "FilterUI.h"} {public local +decl {\#include "FilterUI.h"} {public } -decl {\#include "OscilGenUI.h"} {public local +decl {\#include "OscilGenUI.h"} {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } class ADvoicelistitem {open : {public Fl_Group} @@ -61,7 +55,7 @@ class ADvoicelistitem {open : {public Fl_Group} Function {make_window()} {open private } { Fl_Window ADnoteVoiceListItem {open - private xywh {259 713 615 100} type Double box UP_FRAME + private xywh {262 736 615 100} type Double box UP_FRAME class Fl_Group visible } { Fl_Group voicelistitemgroup { @@ -172,14 +166,10 @@ ADnoteVoiceListItem->redraw();} {} code {ADnoteVoiceListItem->hide(); //delete(ADnoteVoiceListItem);} {} } - decl {ADnoteParameters *pars;} {private local - } - decl {int nvoice;} {private local - } - decl {Oscilloscope *osc;} {private local - } - decl {Master *master;} {private local - } + decl {ADnoteParameters *pars;} {} + decl {int nvoice;} {} + decl {Oscilloscope *osc;} {} + decl {Master *master;} {} } class ADvoiceUI {open : {public Fl_Group} @@ -188,7 +178,7 @@ class ADvoiceUI {open : {public Fl_Group} } { Fl_Window ADnoteVoiceParameters { label Voice open - xywh {81 282 765 590} type Double box NO_BOX + xywh {84 305 765 590} type Double box NO_BOX class Fl_Group visible } { Fl_Group voiceparametersgroup {open @@ -808,18 +798,12 @@ if (oscedit!=NULL) { }; //delete (ADnoteVoiceParameters);} {} } - 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 - } + decl {int nvoice;} {} + decl {ADnoteParameters *pars;} {} + decl {OscilEditor *oscedit;} {} + decl {Oscilloscope *osc;} {} + decl {Oscilloscope *oscFM;} {} + decl {Master *master;} {} } class ADnoteUI {open : {public PresetsUI_} @@ -828,7 +812,7 @@ class ADnoteUI {open : {public PresetsUI_} } { Fl_Window ADnoteGlobalParameters { label {ADsynth Global Parameters of the Instrument} open - xywh {454 296 540 430} type Double visible + xywh {457 319 540 430} type Double visible } { Fl_Group {} { label FREQUENCY open @@ -1037,7 +1021,7 @@ resui->resonancewindow->show();} } Fl_Window ADnoteVoice { label {ADsynth Voice Parameters} open - xywh {907 477 765 620} type Double visible + xywh {512 361 765 620} type Double visible } { Fl_Group advoice { xywh {0 0 765 585} @@ -1170,14 +1154,9 @@ for (int i=0;irefreshlist(); resui->refresh(); currentvoicecounter->do_callback();} {} } - 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 - } + decl {ADnoteParameters *pars;} {} + decl {ResonanceUI *resui;} {} + decl {Master *master;} {} + decl {int nvoice;} {} + decl {ADvoicelistitem *voicelistitem[NUM_VOICES];} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/BankUI.fl b/c++/carla-native/zynaddsubfx/UI/BankUI.fl index 13c5ead..70c273a 100644 --- a/c++/carla-native/zynaddsubfx/UI/BankUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/BankUI.fl @@ -1,41 +1,39 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -decl {\#include "../Misc/Part.h"} {public local +decl {\#include "../Misc/Part.h"} {public } -decl {\#include "../Misc/Bank.h"} {public local +decl {\#include "../Misc/Bank.h"} {public } -decl {\#include "../Misc/Config.h"} {public local +decl {\#include "../Misc/Config.h"} {public } -decl {\#include "../Misc/Util.h"} {public local +decl {\#include "../Misc/Util.h"} {public } class BankProcess_ {} { @@ -43,7 +41,7 @@ class BankProcess_ {} { } { code {;} {} } - decl {Bank *bank;} {public local + decl {Bank *bank;} {public } } @@ -54,7 +52,8 @@ class BankSlot {open : {public Fl_Button,BankProcess_} code {what=NULL; whatslot=NULL; nslot=0; -nselected=NULL;} {} +nselected=NULL;} {selected + } } Function {handle(int event)} {return_type int } { @@ -101,12 +100,9 @@ if (*nselected==nslot) copy_label(bank->getnamenumbered(nslot).c_str());} {} } - decl {int *what,*whatslot,nslot,highlight, *nselected;} {private local - } - decl {void (BankProcess_:: *fnc)(void);} {private local - } - decl {BankProcess_ *bp;} {private local - } + decl {int *what,*whatslot,nslot,highlight, *nselected;} {} + decl {void (BankProcess_:: *fnc)(void);} {} + decl {BankProcess_ *bp;} {} } class BankUI {open : {public BankProcess_} @@ -114,8 +110,8 @@ class BankUI {open : {public BankProcess_} Function {make_window()} {open } { Fl_Window bankuiwindow { - label Bank selected - xywh {807 447 785 575} type Double + label Bank + xywh {492 406 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.");} visible } { @@ -362,16 +358,11 @@ removeselection(); if (beginnerui) modeselect->hide(); else modeselect->show();} {} } - 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 + 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 } } diff --git a/c++/carla-native/zynaddsubfx/UI/EffUI.fl b/c++/carla-native/zynaddsubfx/UI/EffUI.fl index 762aa4d..07e3267 100644 --- a/c++/carla-native/zynaddsubfx/UI/EffUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/EffUI.fl @@ -1,44 +1,42 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {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 +decl {\#include "common.H"} {public } class EQGraph {: {public Fl_Box} @@ -158,14 +156,11 @@ 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;} {private local - } - decl {float khzval;} {public local - } - decl {EffectMgr *eff;} {private local - } - decl {int maxdB;} {private local + decl {int oldx,oldy;} {} + decl {float khzval;} {public } + decl {EffectMgr *eff;} {} + decl {int maxdB;} {} } class EffUI {open : {public Fl_Group,public PresetsUI_} @@ -1473,10 +1468,8 @@ this->show();} {} } { code {refresh(eff);} {} } - decl {EffectMgr *eff;} {private local - } - decl {int eqband;} {private local - } + decl {EffectMgr *eff;} {} + decl {int eqband;} {} } class SimpleEffUI {open : {public Fl_Group,public PresetsUI_} @@ -2354,8 +2347,6 @@ this->show();} {} Function {refresh()} {} { code {refresh(eff);} {} } - decl {EffectMgr *eff;} {private local - } - decl {int eqband;} {private local - } + decl {EffectMgr *eff;} {} + decl {int eqband;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/EnvelopeUI.fl b/c++/carla-native/zynaddsubfx/UI/EnvelopeUI.fl index d6281ba..34a41c6 100644 --- a/c++/carla-native/zynaddsubfx/UI/EnvelopeUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/EnvelopeUI.fl @@ -1,44 +1,42 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../globals.h"} {public local +decl {\#include "../globals.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../Params/EnvelopeParams.h"} {public local +decl {\#include "../Params/EnvelopeParams.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } -decl {\#include "common.H"} {public local +decl {\#include "common.H"} {public } class EnvelopeFreeEdit {: {public Fl_Box} @@ -192,15 +190,11 @@ if ((event==FL_DRAG)&&(currentpoint>=0)){ return(1);} {} } - 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 + decl {Fl_Box *pair;} {} + decl {EnvelopeParams *env;} {} + decl {int oldx,oldy;} {} + decl {int currentpoint,cpx,cpdt;} {} + decl {int lastpoint;} {public } } @@ -225,7 +219,7 @@ delete (freemodeeditwindow);} {} } { Fl_Window freemodeeditwindow { label Envelope - xywh {948 246 575 180} type Double visible + xywh {702 269 575 180} type Double visible } { Fl_Box freeedit { label Envelope @@ -347,7 +341,7 @@ envfree->redraw();} Function {make_ADSR_window()} {open } { Fl_Window envADSR {open - xywh {341 765 205 70} type Double color 50 labelfont 1 + xywh {344 788 205 70} type Double color 50 labelfont 1 class Fl_Group visible } { Fl_Group {} { @@ -427,7 +421,7 @@ freeedit->redraw();} Function {make_ASR_window()} {open } { Fl_Window envASR {open - xywh {645 644 210 70} type Double + xywh {648 667 210 70} type Double class Fl_Group visible } { Fl_Group {} { @@ -501,7 +495,7 @@ freeedit->redraw();} Function {make_ADSRfilter_window()} {open } { Fl_Window envADSRfilter {open selected - xywh {624 546 275 70} type Double color 50 labelfont 1 + xywh {627 569 275 70} type Double color 50 labelfont 1 class Fl_Group visible } { Fl_Group {} { @@ -591,7 +585,7 @@ freeedit->redraw();} Function {make_ASRbw_window()} {open } { Fl_Window envASRbw {open - xywh {359 619 210 71} type Double + xywh {362 642 210 70} type Double code0 {set_module_parameters(o);} class Fl_Group visible } { @@ -666,7 +660,7 @@ freeedit->redraw();} Function {make_free_window()} {open } { Fl_Window envfree {open - xywh {373 413 205 70} type Double color 50 labelfont 1 resizable + xywh {376 436 205 70} type Double color 50 labelfont 1 resizable code0 {set_module_parameters(o);} class Fl_Group visible } { @@ -869,8 +863,6 @@ envwindow->resize(this->x(),this->y(),this->w(),this->h()); envwindow->show();} {} } - decl {EnvelopeParams *env;} {private local - } - decl {Fl_Group *envwindow;} {private local - } + decl {EnvelopeParams *env;} {} + decl {Fl_Group *envwindow;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/FilterUI.fl b/c++/carla-native/zynaddsubfx/UI/FilterUI.fl index 9df04f7..0bae429 100644 --- a/c++/carla-native/zynaddsubfx/UI/FilterUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/FilterUI.fl @@ -1,47 +1,44 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private global +decl {\#include } {global } -decl {\#include } {private global +decl {\#include } {global } -decl {\#include "../globals.h"} {public local +decl {\#include "../globals.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../Params/FilterParams.h"} {public local +decl {\#include "../Params/FilterParams.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } -decl {\#include "common.H"} {public local +decl {\#include "common.H"} {public } class FormantFilterGraph {open : {public Fl_Box} @@ -155,14 +152,10 @@ fl_line_style(FL_SOLID,0);} {} Function {~FormantFilterGraph()} {} { code {delete [] graphpoints;} {} } - decl {FilterParams *pars;} {private local - } - decl {int oldx,oldy;} {private local - } - decl {int *nvowel,*nformant;} {private local - } - decl {float *graphpoints;} {private local - } + decl {FilterParams *pars;} {} + decl {int oldx,oldy;} {} + decl {int *nvowel,*nformant;} {} + decl {float *graphpoints;} {} } class FilterUI {open : {public Fl_Group,PresetsUI_} @@ -183,7 +176,7 @@ delete (formantparswindow);} {} Function {make_window()} {open } { Fl_Window filterui {open - xywh {495 323 275 70} type Double color 50 labelfont 1 + xywh {498 346 275 70} type Double color 50 labelfont 1 class Fl_Group visible } { Fl_Group filterparamswindow { @@ -353,7 +346,7 @@ pars->changed=true;} open } { Fl_Window formantparswindow { label {Formant Filter Parameters} selected - xywh {515 450 700 205} type Double visible + xywh {518 473 700 205} type Double visible } { Fl_Group {} { xywh {485 47 105 113} box THIN_UP_BOX @@ -639,10 +632,7 @@ formant_q_dial->when(0); formant_amp_dial->when(0); strchdial->when(0);} {} } - decl {FilterParams *pars;} {private local - } - decl {unsigned char *velsnsamp,*velsns;} {private local - } - decl {int nvowel,nformant,nseqpos;} {private local - } + decl {FilterParams *pars;} {} + decl {unsigned char *velsnsamp,*velsns;} {} + decl {int nvowel,nformant,nseqpos;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/LFOUI.fl b/c++/carla-native/zynaddsubfx/UI/LFOUI.fl index 52c8a29..889a386 100644 --- a/c++/carla-native/zynaddsubfx/UI/LFOUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/LFOUI.fl @@ -1,44 +1,42 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../globals.h"} {public local +decl {\#include "../globals.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../Params/LFOParams.h"} {public local +decl {\#include "../Params/LFOParams.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } -decl {\#include "common.H"} {public local +decl {\#include "common.H"} {public } class LFOUI {open : {public Fl_Group, PresetsUI_} @@ -54,7 +52,7 @@ hide(); Function {make_window()} {open } { Fl_Window lfoui {open selected - xywh {627 328 230 70} type Double color 50 labelfont 1 + xywh {630 351 230 70} type Double color 50 labelfont 1 class Fl_Group visible } { Fl_Group lfoparamswindow { @@ -179,6 +177,5 @@ lfoui->resize(this->x(),this->y(),this->w(),this->h()); lfoparamswindow->label(this->label());} {} } - decl {LFOParams *pars;} {private local - } + decl {LFOParams *pars;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/MasterUI.fl b/c++/carla-native/zynaddsubfx/UI/MasterUI.fl index 29b338e..57ed016 100644 --- a/c++/carla-native/zynaddsubfx/UI/MasterUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/MasterUI.fl @@ -1,74 +1,72 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2009 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2009 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "ADnoteUI.h"} {public local +decl {\#include "ADnoteUI.h"} {public } -decl {\#include "SUBnoteUI.h"} {public local +decl {\#include "SUBnoteUI.h"} {public } -decl {\#include "EffUI.h"} {public local +decl {\#include "EffUI.h"} {public } -decl {\#include "VirKeyboard.h"} {public local +decl {\#include "VirKeyboard.h"} {public } -decl {\#include "ConfigUI.h"} {public local +decl {\#include "ConfigUI.h"} {public } -decl {\#include "BankUI.h"} {public local +decl {\#include "BankUI.h"} {public } -decl {\#include "PartUI.h"} {public local +decl {\#include "PartUI.h"} {public } -decl {\#include "MicrotonalUI.h"} {public local +decl {\#include "MicrotonalUI.h"} {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } decl {\#include "NioUI.h"} {public global } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -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 {\#include "common.H"} {public } decl {\#if USE_NSM \#include "NSM.H" extern NSM_Client *nsm; -\#endif} {public local +\#endif} {public } -decl {\#include "../globals.h"} {public local +decl {\#include "../globals.h"} {public } class VUMeter {: {public Fl_Box} @@ -268,14 +266,10 @@ float tmp=ly*1.0/MIN_DB; }; return(1);} {} } - decl {Master *master;} {private local - } - decl {int npart;} {private local - } - decl {float olddbl,olddbr;} {private local - } - decl {float oldrmsdbl,oldrmsdbr;} {private local - } + decl {Master *master;} {} + decl {int npart;} {} + decl {float olddbl,olddbr;} {} + decl {float oldrmsdbl,oldrmsdbr;} {} } class SysEffSend {open : {public WidgetPDial} @@ -311,12 +305,9 @@ this->copy_label(tmp);} {} return(WidgetPDial::handle(event));} {} } - decl {Master *master;} {private local - } - decl {int neff1;} {private local - } - decl {int neff2;} {private local - } + decl {Master *master;} {} + decl {int neff1;} {} + decl {int neff2;} {} } class Panellistitem {open : {public Fl_Group} @@ -324,7 +315,7 @@ class Panellistitem {open : {public Fl_Group} Function {make_window()} {open private } { Fl_Window panellistitem {open - private xywh {605 688 100 260} type Double box NO_BOX + private xywh {608 711 100 260} type Double box NO_BOX class Fl_Group visible } { Fl_Group panellistitemgroup {open @@ -435,12 +426,9 @@ panellistitemgroup->redraw();} {} code {panellistitem->hide(); //delete(panellistitem);} {} } - decl {int npart;} {private local - } - decl {Master *master;} {private local - } - decl {BankUI *bankui;} {private local - } + decl {int npart;} {} + decl {Master *master;} {} + decl {BankUI *bankui;} {} } class MasterUI {open @@ -463,7 +451,7 @@ if (( *exitprogram=1; }; \#endif} open - xywh {77 347 390 525} type Double align 80 xclass zynaddsubfx visible + xywh {80 370 390 525} type Double xclass zynaddsubfx visible } { Fl_Menu_Bar mastermenu { xywh {-5 0 690 25} @@ -1141,7 +1129,7 @@ if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { *exitprogram=1; }; \#endif} open - xywh {280 239 600 335} type Double align 80 visible + xywh {283 262 600 335} type Double visible } { Fl_Menu_Bar simplemastermenu { xywh {0 0 690 25} @@ -1882,30 +1870,17 @@ virkeys->midich=master->part[npart]->Prcvchn; simplerefresh(); bankui->hide();} {} } - 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 - } + 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;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/NSM.C b/c++/carla-native/zynaddsubfx/UI/NSM.C index 098abd0..7b7e6fc 100644 --- a/c++/carla-native/zynaddsubfx/UI/NSM.C +++ b/c++/carla-native/zynaddsubfx/UI/NSM.C @@ -105,7 +105,7 @@ NSM_Client::command_open(const char *name, return r; } -static void save_callback(Fl_Widget *w, void *v) +static void save_callback(Fl_Widget *, void *v) { MasterUI *ui = static_cast(v); ui->do_save_master(); @@ -118,17 +118,22 @@ NSM_Client::command_active(bool active) Fl_Menu_Item *m; //TODO see if there is a cleaner way of doing this without voiding //constness - if(m=const_cast(ui->mastermenu->find_item( - "&File/&Open Parameters..."))) + if((m=const_cast(ui->mastermenu->find_item( + "&File/&Open Parameters...")))) m->label("&Import Parameters..."); - if(m=const_cast(ui->simplemastermenu->find_item( - "&File/&Open Parameters..."))) + if((m=const_cast(ui->simplemastermenu->find_item( + "&File/&Open Parameters...")))) m->label("&Import Parameters..."); //TODO get this menu entry inserted at the right point - if(!ui->mastermenu->find_item("&File/&Export Parameters...")) + if((m=const_cast(ui->mastermenu->find_item("&File/&Export Parameters...")))) + m->show(); + else ui->mastermenu->add("&File/&Export Parameters...",0,save_callback,ui); - if(!ui->simplemastermenu->find_item("&File/&Export Parameters...")) + + if((m=const_cast(ui->simplemastermenu->find_item("&File/&Export Parameters...")))) + m->show(); + else ui->simplemastermenu->add("&File/&Export Parameters...",0,save_callback,ui); ui->sm_indicator1->value(1); @@ -138,19 +143,17 @@ NSM_Client::command_active(bool active) } else { Fl_Menu_Item *m; - if(m=const_cast(ui->mastermenu->find_item( - "&File/&Import Parameters..."))) + if((m=const_cast(ui->mastermenu->find_item( + "&File/&Import Parameters...")))) m->label("&Open Parameters..."); - if(m=const_cast(ui->simplemastermenu->find_item( - "&File/&Open Parameters..."))) + if((m=const_cast(ui->simplemastermenu->find_item( + "&File/&Open Parameters...")))) m->label("&Open Parameters..."); - int m_idx=ui->mastermenu->find_index("&File/&Export Parameters..."); - if(m_idx==-1) - ui->mastermenu->remove(m_idx); - m_idx=ui->simplemastermenu->find_index("&File/&Export Parameters..."); - if(m_idx==-1) - ui->simplemastermenu->remove(m_idx); + if((m=const_cast(ui->mastermenu->find_item("&File/&Export Parameters...")))) + m->hide(); + if((m=const_cast(ui->simplemastermenu->find_item("&File/&Export Parameters...")))) + m->hide(); ui->sm_indicator1->value(0); ui->sm_indicator2->value(0); diff --git a/c++/carla-native/zynaddsubfx/UI/OscilGenUI.fl b/c++/carla-native/zynaddsubfx/UI/OscilGenUI.fl index 2aa88c2..c616db7 100644 --- a/c++/carla-native/zynaddsubfx/UI/OscilGenUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/OscilGenUI.fl @@ -1,62 +1,56 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include "../Synth/OscilGen.h"} {public local +decl {\#include "../Synth/OscilGen.h"} {public } -decl {\#include "../Misc/Util.h"} {public local +decl {\#include "../Misc/Util.h"} {public } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -decl {\#include "ResonanceUI.h"} {public local +decl {\#include "ResonanceUI.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "EnvelopeUI.h"} {public local +decl {\#include "EnvelopeUI.h"} {public } -decl {\#include "LFOUI.h"} {public local +decl {\#include "LFOUI.h"} {public } -decl {\#include "FilterUI.h"} {public local +decl {\#include "FilterUI.h"} {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } -decl {\#include } {public local +decl {\#include } {public } class OscilSpectrum {: {public Fl_Box} @@ -130,12 +124,9 @@ for (i=0;iPhmag[n]==64) mag->selection_color(0); code {harmonic->hide(); //delete(harmonic);} {} } - 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 - } + decl {OscilGen *oscil;} {} + decl {Fl_Group *display;} {} + decl {int n;} {} + decl {Fl_Widget *oldosc,*cbwidget,*applybutton;} {} + decl {Master *master;} {} } class OscilEditor {open : {public PresetsUI_} @@ -384,7 +367,7 @@ class OscilEditor {open : {public PresetsUI_} } { Fl_Window osceditUI { label {ADsynth Oscillator Editor} open - xywh {544 170 735 595} type Double + xywh {542 193 735 595} type Double code0 {if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} visible } { Fl_Button applybutton { @@ -1160,12 +1143,8 @@ if (cbwidget!=NULL) { applybutton->redraw(); };} {} } - 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 - } + decl {OscilGen *oscil;} {} + decl {Fl_Widget *oldosc,*cbwidget,*cbapplywidget;} {} + decl {Oscilharmonic *h[MAX_AD_HARMONICS];} {} + decl {Master *master;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/PADnoteUI.fl b/c++/carla-native/zynaddsubfx/UI/PADnoteUI.fl index aebc11c..b7c79e8 100644 --- a/c++/carla-native/zynaddsubfx/UI/PADnoteUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/PADnoteUI.fl @@ -1,56 +1,52 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {\#include "../Params/PADnoteParameters.h"} {public local +decl {\#include "../Params/PADnoteParameters.h"} {public } -decl {\#include "../Misc/Util.h"} {public local +decl {\#include "../Misc/Util.h"} {public } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -decl {\#include "ResonanceUI.h"} {public local +decl {\#include "ResonanceUI.h"} {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "EnvelopeUI.h"} {public local +decl {\#include "EnvelopeUI.h"} {public } -decl {\#include "LFOUI.h"} {public local +decl {\#include "LFOUI.h"} {public } -decl {\#include "FilterUI.h"} {public local +decl {\#include "FilterUI.h"} {public } -decl {\#include "OscilGenUI.h"} {public local +decl {\#include "OscilGenUI.h"} {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } class PADnoteHarmonicProfile {: {public Fl_Box} @@ -98,8 +94,6 @@ fl_line(ox+lx/2,oy,ox+lx/2,oy+ly); //draw the graph fl_line_style(FL_SOLID); -int old=0; - if (active) fl_color(180,210,240); else fl_color(150,150,155); @@ -121,8 +115,6 @@ for (int i=0;ivalue()!=harmonicstructuregroup) applybutton->hide(); @@ -1113,14 +1103,14 @@ delete(resui); padnotewindow->hide(); delete(padnotewindow);} {} } - decl {PADnoteParameters *pars;} {public local + decl {PADnoteParameters *pars;} {public } - decl {Master *master;} {public local + decl {Master *master;} {public } - decl {OscilEditor *oscui;} {public local + decl {OscilEditor *oscui;} {public } - decl {Oscilloscope *osc;} {public local + decl {Oscilloscope *osc;} {public } - decl {ResonanceUI *resui;} {public local + decl {ResonanceUI *resui;} {public } } diff --git a/c++/carla-native/zynaddsubfx/UI/PartUI.fl b/c++/carla-native/zynaddsubfx/UI/PartUI.fl index 6066dc3..8e591ac 100644 --- a/c++/carla-native/zynaddsubfx/UI/PartUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/PartUI.fl @@ -1,47 +1,45 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "EffUI.h"} {public local +decl {\#include "EffUI.h"} {public } -decl {\#include "BankUI.h"} {public local +decl {\#include "BankUI.h"} {public } -decl {\#include "ADnoteUI.h"} {public local +decl {\#include "ADnoteUI.h"} {public } -decl {\#include "SUBnoteUI.h"} {public local +decl {\#include "SUBnoteUI.h"} {public } -decl {\#include "PADnoteUI.h"} {public local +decl {\#include "PADnoteUI.h"} {public } -decl {\#include "../Misc/Config.h"} {public local +decl {\#include "../Misc/Config.h"} {public } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -decl {\#include "../Misc/Part.h"} {public local +decl {\#include "../Misc/Part.h"} {public } class PartSysEffSend {open : {public Fl_Group} @@ -49,7 +47,7 @@ class PartSysEffSend {open : {public Fl_Group} Function {make_window()} {open private } { Fl_Window syseffsend { - private xywh {586 106 100 100} type Double box NO_BOX + private xywh {589 129 100 100} type Double box NO_BOX class Fl_Group visible } { Fl_Dial {} { @@ -80,12 +78,9 @@ end();} {} code {syseffsend->hide(); //delete(syseffsend);} {} } - decl {Master *master;} {private local - } - decl {int neff;} {private local - } - decl {int npart;} {private local - } + decl {Master *master;} {} + decl {int neff;} {} + decl {int npart;} {} } class PartKitItem {open : {public Fl_Group} @@ -93,7 +88,7 @@ class PartKitItem {open : {public Fl_Group} Function {make_window()} {open private } { Fl_Window partkititem { - private xywh {470 383 670 100} type Double box NO_BOX + private xywh {473 406 670 100} type Double box NO_BOX class Fl_Group visible } { Fl_Group partkititemgroup { @@ -267,16 +262,11 @@ end();} {} code {partkititem->hide(); //delete(partkititem);} {} } - 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 - } + decl {Part *part;} {} + decl {int n;} {} + decl {Master *master;} {} + decl {char label[10];} {} + decl {class PartUI *partui;} {} } class PartUI {open : {public Fl_Group} @@ -284,7 +274,7 @@ class PartUI {open : {public Fl_Group} Function {make_window()} {open private } { Fl_Window partgroup {open - private xywh {685 241 385 180} type Double box NO_BOX + private xywh {688 264 385 180} type Double box NO_BOX class Fl_Group visible } { Fl_Group partgroupui {open @@ -462,7 +452,7 @@ if (part->Penabled==0) partgroupui->deactivate(); } Fl_Window ctlwindow { label Controllers open - private xywh {779 238 500 130} type Double box NO_BOX visible + private xywh {777 261 500 130} type Double box NO_BOX visible } { Fl_Check_Button {} { label Expr @@ -645,7 +635,7 @@ else {propta->deactivate();proptb->deactivate();}} } Fl_Window partfx { label {Part's Insert Effects} selected - private xywh {551 637 390 145} type Double box NO_BOX visible + private xywh {554 660 390 145} type Double box NO_BOX visible } { Fl_Counter inseffnocounter { label {FX No.} @@ -766,7 +756,7 @@ pthread_mutex_unlock(&master->mutex);} } Fl_Window instrumentkitlist { label {Instrument Kit} open - xywh {583 543 670 370} type Double box NO_BOX visible + xywh {586 566 670 370} type Double box NO_BOX visible } { Fl_Button {} { label {Close Window} @@ -847,7 +837,7 @@ if (part->Pkitmode==0) { } Fl_Window instrumenteditwindow { label {Instrument Edit} open - xywh {244 602 395 360} type Double box NO_BOX visible + xywh {247 621 395 360} type Double box NO_BOX visible } { Fl_Group {} { xywh {0 220 395 110} box UP_FRAME @@ -1116,26 +1106,15 @@ delete(instrumentkitlist); instrumenteditwindow->hide(); delete(instrumenteditwindow);} {} } - 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 - } + 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];} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/ResonanceUI.fl b/c++/carla-native/zynaddsubfx/UI/ResonanceUI.fl index b112be8..12e591a 100644 --- a/c++/carla-native/zynaddsubfx/UI/ResonanceUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/ResonanceUI.fl @@ -1,41 +1,35 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include } {private local -} +decl {\#include } {} -decl {\#include "../Synth/Resonance.h"} {public local +decl {\#include "../Synth/Resonance.h"} {public } -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } class ResonanceGraph {open : {public Fl_Box} @@ -187,18 +181,13 @@ return(1);} {} code {this->cbwidget=cbwidget; this->applybutton=applybutton;} {} } - 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_Value_Output *khzvalue;} {} + decl {Fl_Value_Output *dbvalue;} {} + decl {Resonance *respar;} {} + decl {int oldx,oldy;} {} + decl {float khzval;} {public } + decl {Fl_Widget *cbwidget,*applybutton;} {} } class ResonanceUI {open : PresetsUI_ @@ -402,10 +391,8 @@ p1st->value(respar->Pprotectthefundamental); rg->redraw();} {} } - decl {Resonance *respar;} {public local - } - decl {ResonanceGraph *rg;} {private local - } - decl {Fl_Widget *cbwidget,*cbapplywidget;} {private local + decl {Resonance *respar;} {public } + decl {ResonanceGraph *rg;} {} + decl {Fl_Widget *cbwidget,*cbapplywidget;} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/SUBnoteUI.fl b/c++/carla-native/zynaddsubfx/UI/SUBnoteUI.fl index 4f9ab6b..245414d 100644 --- a/c++/carla-native/zynaddsubfx/UI/SUBnoteUI.fl +++ b/c++/carla-native/zynaddsubfx/UI/SUBnoteUI.fl @@ -1,41 +1,39 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {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 "../Params/SUBnoteParameters.h"} {public local +decl {\#include "../Params/SUBnoteParameters.h"} {public } -decl {\#include "PresetsUI.h"} {public local +decl {\#include "PresetsUI.h"} {public } class SUBnoteharmonic {: {public Fl_Group} @@ -101,10 +99,8 @@ bw->value(127-pars->Phrelbw[n]);} {} hide(); //delete(harmonic);} {} } - decl {SUBnoteParameters *pars;} {private local - } - decl {int n;} {private local - } + decl {SUBnoteParameters *pars;} {} + decl {int n;} {} } class SUBnoteUI {open : {public PresetsUI_} @@ -113,7 +109,7 @@ class SUBnoteUI {open : {public PresetsUI_} } { Fl_Window SUBparameters { label {SUBsynth Parameters} open - xywh {544 466 735 390} type Double visible + xywh {542 489 735 390} type Double visible } { Fl_Scroll {} { label scroll open @@ -449,8 +445,6 @@ make_window();} {} SUBparameters->hide(); delete(SUBparameters);} {} } - decl {SUBnoteParameters *pars;} {private local - } - decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {private local - } + decl {SUBnoteParameters *pars;} {} + decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {} } diff --git a/c++/carla-native/zynaddsubfx/UI/VirKeyboard.fl b/c++/carla-native/zynaddsubfx/UI/VirKeyboard.fl index 596dcb0..c07a74e 100644 --- a/c++/carla-native/zynaddsubfx/UI/VirKeyboard.fl +++ b/c++/carla-native/zynaddsubfx/UI/VirKeyboard.fl @@ -1,77 +1,63 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0300 +version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} -decl {//License: GNU GPL version 2 or later} {private local -} +decl {//License: GNU GPL version 2 or later} {} -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include } {public local +decl {\#include } {public } -decl {\#include "../globals.h"} {public local +decl {\#include "../globals.h"} {public } -decl {\#include "../Misc/Master.h"} {public local +decl {\#include "../Misc/Master.h"} {public } -decl {\#include "../Misc/Util.h"} {public local +decl {\#include "../Misc/Util.h"} {public } -decl {\#include "WidgetPDial.h"} {public local +decl {\#include "WidgetPDial.h"} {public } -decl {\#include "common.H"} {public local +decl {\#include "common.H"} {public } decl {\#ifdef NTK_GUI \#include "FL/Fl_Shared_Image.H" - \#endif} {public local + \#endif} {public } -decl {const int keyspos[12]={0,-1,1,-2,2,3,-4,4,-5,5,-6,6};} {private local -} +decl {const int keyspos[12]={0,-1,1,-2,2,3,-4,4,-5,5,-6,6};} {} -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 keysoct1qwerty[]={'q','2','w','3','e','r','5','t','6','y','7','u','i','9','o','0','p','[','=',']','\\\\',FL_Enter,0};} {} -decl {const int keysoct2qwerty[]={'z','s','x','d','c','v','g','b','h','n','j','m',',','l','.',';','/',0};} {private local -} +decl {const int keysoct2qwerty[]={'z','s','x','d','c','v','g','b','h','n','j','m',',','l','.',';','/',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 keysoct1dw[]={'\\'','2',',','3','.','p','5','y','6','f','7','g','c','9','r','0','l','/',']','=','\\\\',FL_Enter,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 keysoct2dw[]={';','o','q','e','j','k','i','x','d','b','h','m','w','n','v','s','z',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 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 keysoct2qwertz[]={'y','s','x','d','c','v','g','b','h','n','j','m',',','l','.',246,'-',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 keysoct1az[]={'a',233,'z','\\"','e','r','(','t','-','y',232,'u','i',231,'o',224,'p',65106,'=','$',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 keysoct2az[]={'w','s','x','d','c','v','g','b','h','n','j',',',';','l',':','m','!',0};} {private local -} +decl {const int keysoct2az[]={'w','s','x','d','c','v','g','b','h','n','j',',',';','l',':','m','!',0};} {} class VirKeys {: {public Fl_Box} } { - 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 - } + decl {static const int N_OCT=6;} {} + decl {static const int SIZE_WHITE=14;} {} + decl {static const int SIZE_BLACK=8;} {} Function {VirKeys(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {master=NULL;} {} } @@ -171,8 +157,7 @@ for (i=0;imutex);} {} Function {relaseallkeys(int type)} {} { code {for (int i=0;ihide();} open - xywh {97 574 650 130} type Double visible + xywh {100 597 650 130} type Double visible } { Fl_Box virkeys { label Keyboard @@ -452,7 +435,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 UP_BOX labelsize 8 align 1 when 3 minimum -8192 maximum 8192 step 64 + tooltip {Pitch Wheel} xywh {625 10 20 95} labelsize 8 align 1 when 3 minimum -8192 maximum 8192 step 64 } Fl_Button {} { label R @@ -492,8 +475,6 @@ make_window();} {} Function {relaseallkeys()} {} { code {virkeys->relaseallkeys(0);} {} } - decl {Master *master;} {private local - } - decl {int midictl;} {private local - } + decl {Master *master;} {} + decl {int midictl;} {} } diff --git a/c++/carla-native/zynaddsubfx/main.cpp b/c++/carla-native/zynaddsubfx/main.cpp index 0ebde8b..39ed01d 100644 --- a/c++/carla-native/zynaddsubfx/main.cpp +++ b/c++/carla-native/zynaddsubfx/main.cpp @@ -35,6 +35,7 @@ #include +#include "DSP/FFTwrapper.h" #include "Misc/Master.h" #include "Misc/Part.h" #include "Misc/Util.h" @@ -164,6 +165,7 @@ void exitprogram() #endif delete [] denormalkillbuf; + FFT_cleanup(); } int main(int argc, char *argv[]) @@ -530,7 +532,9 @@ int main(int argc, char *argv[]) } #endif //LASH +#if USE_NSM done: +#endif Fl::wait(0.02f); #else