@@ -13,7 +13,8 @@ find_package(Alsa) | |||||
pkg_check_modules(JACK jack) | pkg_check_modules(JACK jack) | ||||
pkg_check_modules(PORTAUDIO portaudio-2.0>=19) | pkg_check_modules(PORTAUDIO portaudio-2.0>=19) | ||||
set(FLTK_SKIP_OPENGL true) | 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(FLTK) | ||||
find_package(OpenGL) #for FLTK | find_package(OpenGL) #for FLTK | ||||
find_package(CxxTest) | find_package(CxxTest) | ||||
@@ -255,24 +256,19 @@ if(FltkGui) | |||||
endif() | endif() | ||||
if(NtkGui) | 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) | add_definitions(-DNTK_GUI) | ||||
message(STATUS "Will build NTK gui") | message(STATUS "Will build NTK gui") | ||||
include_directories( | include_directories( | ||||
${NTK_INCLUDE_DIR} | |||||
${NTK_INCLUDE_DIRS} | |||||
"${CMAKE_CURRENT_SOURCE_DIR}/UI" | "${CMAKE_CURRENT_SOURCE_DIR}/UI" | ||||
"${CMAKE_CURRENT_BINARY_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) | add_executable(zynaddsubfx main.cpp) | ||||
target_link_libraries(zynaddsubfx | target_link_libraries(zynaddsubfx | ||||
zynaddsubfx_nio | |||||
zynaddsubfx_core | zynaddsubfx_core | ||||
zynaddsubfx_nio | |||||
${GUI_LIBRARIES} | ${GUI_LIBRARIES} | ||||
${NIO_LIBRARIES} | ${NIO_LIBRARIES} | ||||
${AUDIO_LIBRARIES} | ${AUDIO_LIBRARIES} | ||||
@@ -347,8 +343,6 @@ if (DssiEnable) | |||||
target_link_libraries(zynaddsubfx_dssi | target_link_libraries(zynaddsubfx_dssi | ||||
zynaddsubfx_core | zynaddsubfx_core | ||||
${NIO_LIBRARIES} | |||||
${AUDIO_LIBRARIES} | |||||
${OS_LIBRARIES} | ${OS_LIBRARIES} | ||||
) | ) | ||||
if (${CMAKE_SIZEOF_VOID_P} EQUAL "8") | if (${CMAKE_SIZEOF_VOID_P} EQUAL "8") | ||||
@@ -40,8 +40,6 @@ | |||||
using namespace std; | using namespace std; | ||||
static Master* masterInstance = nullptr; | |||||
vuData::vuData(void) | vuData::vuData(void) | ||||
:outpeakl(0.0f), outpeakr(0.0f), maxoutpeakl(0.0f), maxoutpeakr(0.0f), | :outpeakl(0.0f), outpeakr(0.0f), maxoutpeakl(0.0f), maxoutpeakr(0.0f), | ||||
rmspeakl(0.0f), rmspeakr(0.0f), clipped(0) | rmspeakl(0.0f), rmspeakr(0.0f), clipped(0) | ||||
@@ -121,21 +119,13 @@ bool Master::mutexLock(lockset request) | |||||
return false; | 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 sysefx[nefx]; | ||||
delete fft; | delete fft; | ||||
FFT_cleanup(); | |||||
pthread_mutex_destroy(&mutex); | pthread_mutex_destroy(&mutex); | ||||
pthread_mutex_destroy(&vumutex); | pthread_mutex_destroy(&vumutex); | ||||
@@ -57,8 +57,7 @@ class Master | |||||
/** Destructor*/ | /** Destructor*/ | ||||
~Master(); | ~Master(); | ||||
static Master& getInstance(); | |||||
static void deleteInstance(); | |||||
static Master &getInstance(); | |||||
/**Saves all settings to a XML file | /**Saves all settings to a XML file | ||||
* @return 0 for ok or <0 if there is an error*/ | * @return 0 for ok or <0 if there is an error*/ | ||||
@@ -23,8 +23,7 @@ | |||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include "Recorder.h" | #include "Recorder.h" | ||||
#include "WavFile.h" | #include "WavFile.h" | ||||
#include "../Nio/OutMgr.h" | |||||
#include "../Nio/WavEngine.h" | |||||
#include "../Nio/Nio.h" | |||||
Recorder::Recorder() | Recorder::Recorder() | ||||
:status(0), notetrigger(0) | :status(0), notetrigger(0) | ||||
@@ -46,8 +45,7 @@ int Recorder::preparefile(std::string filename_, int overwrite) | |||||
return 1; | return 1; | ||||
} | } | ||||
OutMgr::getInstance(). wave->newFile(new WavFile(filename_, | |||||
synth->samplerate, 2)); | |||||
Nio::waveNew(new WavFile(filename_, synth->samplerate, 2)); | |||||
status = 1; //ready | status = 1; //ready | ||||
@@ -62,15 +60,15 @@ void Recorder::start() | |||||
void Recorder::stop() | void Recorder::stop() | ||||
{ | { | ||||
OutMgr::getInstance(). wave->Stop(); | |||||
OutMgr::getInstance(). wave->destroyFile(); | |||||
Nio::waveStop(); | |||||
Nio::waveStart(); | |||||
status = 0; | status = 0; | ||||
} | } | ||||
void Recorder::pause() | void Recorder::pause() | ||||
{ | { | ||||
status = 0; | status = 0; | ||||
OutMgr::getInstance(). wave->Stop(); | |||||
Nio::waveStop(); | |||||
} | } | ||||
int Recorder::recording() | int Recorder::recording() | ||||
@@ -85,7 +83,7 @@ void Recorder::triggernow() | |||||
{ | { | ||||
if(status == 2) { | if(status == 2) { | ||||
if(notetrigger != 1) | if(notetrigger != 1) | ||||
OutMgr::getInstance().wave->Start(); | |||||
Nio::waveStart(); | |||||
notetrigger = 1; | notetrigger = 1; | ||||
} | } | ||||
} | } | ||||
@@ -211,11 +211,6 @@ float interpolate(const float *data, size_t len, float pos) | |||||
r_pos = l_pos + 1; | r_pos = l_pos + 1; | ||||
const float leftness = pos - l_pos; | const float leftness = pos - l_pos; | ||||
return data[l_pos] * leftness + data[r_pos] * (1.0f - leftness); | 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) | float cinterpolate(const float *data, size_t len, float pos) | ||||
@@ -4,6 +4,7 @@ | |||||
#include "EngineMgr.h" | #include "EngineMgr.h" | ||||
#include "MidiIn.h" | #include "MidiIn.h" | ||||
#include "AudioOut.h" | #include "AudioOut.h" | ||||
#include "WavEngine.h" | |||||
#include <iostream> | #include <iostream> | ||||
#include <algorithm> | #include <algorithm> | ||||
using std::string; | using std::string; | ||||
@@ -17,8 +18,8 @@ EngineMgr *eng = NULL; | |||||
string postfix; | string postfix; | ||||
bool Nio::autoConnect = false; | 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) | void Nio::init(void) | ||||
{ | { | ||||
@@ -115,3 +116,23 @@ void Nio::preferedSampleRate(unsigned &rate) | |||||
void Nio::preferedSampleRate(unsigned &) | void Nio::preferedSampleRate(unsigned &) | ||||
{} | {} | ||||
#endif | #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(); | |||||
} |
@@ -3,6 +3,8 @@ | |||||
#include <string> | #include <string> | ||||
#include <set> | #include <set> | ||||
class WavFile; | |||||
/**Interface to Nio Subsystem | /**Interface to Nio Subsystem | ||||
* | * | ||||
* Should be only externally included header */ | * Should be only externally included header */ | ||||
@@ -30,6 +32,13 @@ namespace Nio | |||||
//Get the prefered sample rate from jack (if running) | //Get the prefered sample rate from jack (if running) | ||||
void preferedSampleRate(unsigned &rate); | void preferedSampleRate(unsigned &rate); | ||||
//Wave writing | |||||
void waveNew(class WavFile *wave); | |||||
void waveStart(void); | |||||
void waveStop(void); | |||||
void waveEnd(void); | |||||
extern bool autoConnect; | extern bool autoConnect; | ||||
extern std::string defaultSource; | extern std::string defaultSource; | ||||
extern std::string defaultSink; | extern std::string defaultSink; | ||||
@@ -37,6 +37,18 @@ | |||||
using std::string; | using std::string; | ||||
using std::vector; | 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 | // Static stubs for LADSPA member functions | ||||
// | // | ||||
@@ -20,8 +20,8 @@ | |||||
*/ | */ | ||||
#ifndef _PRESETSTORE_H_ | |||||
#define _PRESETSTORE_H_ | |||||
#ifndef PRESETSTORE_H | |||||
#define PRESETSTORE_H | |||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
@@ -67,5 +67,4 @@ class PresetsStore | |||||
}; | }; | ||||
extern PresetsStore presetsstore; | extern PresetsStore presetsstore; | ||||
#endif // _PRESETSTORE_H_ | |||||
#endif |
@@ -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 <cxxtest/TestSuite.h> | #include <cxxtest/TestSuite.h> | ||||
#include <iostream> | #include <iostream> | ||||
#include <fstream> | #include <fstream> | ||||
@@ -9,9 +33,10 @@ | |||||
#include "../Params/Presets.h" | #include "../Params/Presets.h" | ||||
#include "../DSP/FFTwrapper.h" | #include "../DSP/FFTwrapper.h" | ||||
#include "../globals.h" | #include "../globals.h" | ||||
SYNTH_T *synth; | |||||
using namespace std; | using namespace std; | ||||
SYNTH_T *synth; | |||||
class AdNoteTest:public CxxTest::TestSuite | class AdNoteTest:public CxxTest::TestSuite | ||||
{ | { | ||||
@@ -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(SUBnoteTest SubNoteTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/SubNoteTest.h) | ||||
CXXTEST_ADD_TEST(OscilGenTest OscilGenTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/OscilGenTest.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(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 | #Extra libraries added to make test and full compilation use the same library | ||||
#links for quirky compilers | #links for quirky compilers | ||||
@@ -25,3 +26,5 @@ target_link_libraries(MicrotonalTest ${test_lib}) | |||||
target_link_libraries(OscilGenTest ${test_lib}) | target_link_libraries(OscilGenTest ${test_lib}) | ||||
target_link_libraries(XMLwrapperTest ${test_lib}) | target_link_libraries(XMLwrapperTest ${test_lib}) | ||||
target_link_libraries(RandTest ${test_lib}) | target_link_libraries(RandTest ${test_lib}) | ||||
target_link_libraries(PADnoteTest ${test_lib}) | |||||
@@ -2,7 +2,7 @@ | |||||
ZynAddSubFX - a software synthesizer | ZynAddSubFX - a software synthesizer | ||||
ControllerTest.h - CxxTest for Params/Controller | ControllerTest.h - CxxTest for Params/Controller | ||||
Copyright (C) 2009-2009 Mark McCurry | |||||
Copyright (C) 2009-2011 Mark McCurry | |||||
Author: Mark McCurry | Author: Mark McCurry | ||||
This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||
@@ -2,8 +2,9 @@ | |||||
ZynAddSubFX - a software synthesizer | ZynAddSubFX - a software synthesizer | ||||
EchoTest.h - CxxTest for Effect/Echo | 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 | 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 | it under the terms of version 2 of the GNU General Public License | ||||
@@ -2,7 +2,7 @@ | |||||
ZynAddSubFX - a software synthesizer | ZynAddSubFX - a software synthesizer | ||||
MicrotonalTest.h - CxxTest for Misc/Microtonal | MicrotonalTest.h - CxxTest for Misc/Microtonal | ||||
Copyright (C) 2009-2009 Mark McCurry | |||||
Copyright (C) 2009-2012 Mark McCurry | |||||
Author: Mark McCurry | Author: Mark McCurry | ||||
This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||
@@ -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 <cxxtest/TestSuite.h> | #include <cxxtest/TestSuite.h> | ||||
#include <string> | #include <string> | ||||
#include "../Synth/OscilGen.h" | #include "../Synth/OscilGen.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 <cxxtest/TestSuite.h> | |||||
#include <iostream> | |||||
#include <fstream> | |||||
#include <ctime> | |||||
#include <string> | |||||
#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<float>(t_off - t_on)) / CLOCKS_PER_SEC, samps); | |||||
} | |||||
#endif | |||||
}; |
@@ -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 | //Based Upon AdNoteTest.h | ||||
#include <cxxtest/TestSuite.h> | #include <cxxtest/TestSuite.h> | ||||
#include <iostream> | #include <iostream> | ||||
@@ -1,59 +1,53 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <FL/Fl_Box.H>} {public local | |||||
decl {\#include <FL/Fl_Box.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_Group.H>} {public local | |||||
decl {\#include <FL/Fl_Group.H>} {public | |||||
} | } | ||||
decl {\#include <math.h>} {private local | |||||
} | |||||
decl {\#include <math.h>} {} | |||||
decl {\#include <stdio.h>} {private local | |||||
} | |||||
decl {\#include <stdio.h>} {} | |||||
decl {\#include <stdlib.h>} {private local | |||||
} | |||||
decl {\#include <stdlib.h>} {} | |||||
decl {\#include <string.h>} {private local | |||||
} | |||||
decl {\#include <string.h>} {} | |||||
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} | class ADvoicelistitem {open : {public Fl_Group} | ||||
@@ -61,7 +55,7 @@ class ADvoicelistitem {open : {public Fl_Group} | |||||
Function {make_window()} {open private | Function {make_window()} {open private | ||||
} { | } { | ||||
Fl_Window ADnoteVoiceListItem {open | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group voicelistitemgroup { | Fl_Group voicelistitemgroup { | ||||
@@ -172,14 +166,10 @@ ADnoteVoiceListItem->redraw();} {} | |||||
code {ADnoteVoiceListItem->hide(); | code {ADnoteVoiceListItem->hide(); | ||||
//delete(ADnoteVoiceListItem);} {} | //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} | class ADvoiceUI {open : {public Fl_Group} | ||||
@@ -188,7 +178,7 @@ class ADvoiceUI {open : {public Fl_Group} | |||||
} { | } { | ||||
Fl_Window ADnoteVoiceParameters { | Fl_Window ADnoteVoiceParameters { | ||||
label Voice open | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group voiceparametersgroup {open | Fl_Group voiceparametersgroup {open | ||||
@@ -808,18 +798,12 @@ if (oscedit!=NULL) { | |||||
}; | }; | ||||
//delete (ADnoteVoiceParameters);} {} | //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_} | class ADnoteUI {open : {public PresetsUI_} | ||||
@@ -828,7 +812,7 @@ class ADnoteUI {open : {public PresetsUI_} | |||||
} { | } { | ||||
Fl_Window ADnoteGlobalParameters { | Fl_Window ADnoteGlobalParameters { | ||||
label {ADsynth Global Parameters of the Instrument} open | 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 {} { | Fl_Group {} { | ||||
label FREQUENCY open | label FREQUENCY open | ||||
@@ -1037,7 +1021,7 @@ resui->resonancewindow->show();} | |||||
} | } | ||||
Fl_Window ADnoteVoice { | Fl_Window ADnoteVoice { | ||||
label {ADsynth Voice Parameters} open | label {ADsynth Voice Parameters} open | ||||
xywh {907 477 765 620} type Double visible | |||||
xywh {512 361 765 620} type Double visible | |||||
} { | } { | ||||
Fl_Group advoice { | Fl_Group advoice { | ||||
xywh {0 0 765 585} | xywh {0 0 765 585} | ||||
@@ -1170,14 +1154,9 @@ for (int i=0;i<NUM_VOICES;i++) voicelistitem[i]->refreshlist(); | |||||
resui->refresh(); | resui->refresh(); | ||||
currentvoicecounter->do_callback();} {} | 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];} {} | |||||
} | } |
@@ -1,41 +1,39 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <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 <FL/Fl_Button.H>} {public local | |||||
decl {\#include <FL/Fl_Button.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_File_Chooser.H>} {public local | |||||
decl {\#include <FL/Fl_File_Chooser.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 | |||||
} | } | ||||
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_ {} { | class BankProcess_ {} { | ||||
@@ -43,7 +41,7 @@ class BankProcess_ {} { | |||||
} { | } { | ||||
code {;} {} | code {;} {} | ||||
} | } | ||||
decl {Bank *bank;} {public local | |||||
decl {Bank *bank;} {public | |||||
} | } | ||||
} | } | ||||
@@ -54,7 +52,8 @@ class BankSlot {open : {public Fl_Button,BankProcess_} | |||||
code {what=NULL; | code {what=NULL; | ||||
whatslot=NULL; | whatslot=NULL; | ||||
nslot=0; | nslot=0; | ||||
nselected=NULL;} {} | |||||
nselected=NULL;} {selected | |||||
} | |||||
} | } | ||||
Function {handle(int event)} {return_type int | Function {handle(int event)} {return_type int | ||||
} { | } { | ||||
@@ -101,12 +100,9 @@ if (*nselected==nslot) | |||||
copy_label(bank->getnamenumbered(nslot).c_str());} {} | 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_} | class BankUI {open : {public BankProcess_} | ||||
@@ -114,8 +110,8 @@ class BankUI {open : {public BankProcess_} | |||||
Function {make_window()} {open | Function {make_window()} {open | ||||
} { | } { | ||||
Fl_Window bankuiwindow { | 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());} | 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 | 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(); | if (beginnerui) modeselect->hide(); | ||||
else modeselect->show();} {} | 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 | |||||
} | } | ||||
} | } |
@@ -1,44 +1,42 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <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 | |||||
decl {\#include "common.H"} {public | |||||
} | } | ||||
class EQGraph {: {public Fl_Box} | 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; | code {if (freq<0.00001) freq=0.00001; | ||||
return(log(freq/20.0)/log(1000.0));} {} | 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_} | class EffUI {open : {public Fl_Group,public PresetsUI_} | ||||
@@ -1473,10 +1468,8 @@ this->show();} {} | |||||
} { | } { | ||||
code {refresh(eff);} {} | 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_} | class SimpleEffUI {open : {public Fl_Group,public PresetsUI_} | ||||
@@ -2354,8 +2347,6 @@ this->show();} {} | |||||
Function {refresh()} {} { | Function {refresh()} {} { | ||||
code {refresh(eff);} {} | code {refresh(eff);} {} | ||||
} | } | ||||
decl {EffectMgr *eff;} {private local | |||||
} | |||||
decl {int eqband;} {private local | |||||
} | |||||
decl {EffectMgr *eff;} {} | |||||
decl {int eqband;} {} | |||||
} | } |
@@ -1,44 +1,42 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <stdio.h>} {public local | |||||
decl {\#include <stdio.h>} {public | |||||
} | } | ||||
decl {\#include <stdlib.h>} {public local | |||||
decl {\#include <stdlib.h>} {public | |||||
} | } | ||||
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/EnvelopeParams.h"} {public local | |||||
decl {\#include "../Params/EnvelopeParams.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 | |||||
decl {\#include "common.H"} {public | |||||
} | } | ||||
class EnvelopeFreeEdit {: {public Fl_Box} | class EnvelopeFreeEdit {: {public Fl_Box} | ||||
@@ -192,15 +190,11 @@ if ((event==FL_DRAG)&&(currentpoint>=0)){ | |||||
return(1);} {} | 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 { | Fl_Window freemodeeditwindow { | ||||
label Envelope | label Envelope | ||||
xywh {948 246 575 180} type Double visible | |||||
xywh {702 269 575 180} type Double visible | |||||
} { | } { | ||||
Fl_Box freeedit { | Fl_Box freeedit { | ||||
label Envelope | label Envelope | ||||
@@ -347,7 +341,7 @@ envfree->redraw();} | |||||
Function {make_ADSR_window()} {open | Function {make_ADSR_window()} {open | ||||
} { | } { | ||||
Fl_Window envADSR {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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group {} { | Fl_Group {} { | ||||
@@ -427,7 +421,7 @@ freeedit->redraw();} | |||||
Function {make_ASR_window()} {open | Function {make_ASR_window()} {open | ||||
} { | } { | ||||
Fl_Window envASR {open | Fl_Window envASR {open | ||||
xywh {645 644 210 70} type Double | |||||
xywh {648 667 210 70} type Double | |||||
class Fl_Group visible | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group {} { | Fl_Group {} { | ||||
@@ -501,7 +495,7 @@ freeedit->redraw();} | |||||
Function {make_ADSRfilter_window()} {open | Function {make_ADSRfilter_window()} {open | ||||
} { | } { | ||||
Fl_Window envADSRfilter {open selected | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group {} { | Fl_Group {} { | ||||
@@ -591,7 +585,7 @@ freeedit->redraw();} | |||||
Function {make_ASRbw_window()} {open | Function {make_ASRbw_window()} {open | ||||
} { | } { | ||||
Fl_Window envASRbw {open | Fl_Window envASRbw {open | ||||
xywh {359 619 210 71} type Double | |||||
xywh {362 642 210 70} type Double | |||||
code0 {set_module_parameters(o);} | code0 {set_module_parameters(o);} | ||||
class Fl_Group visible | class Fl_Group visible | ||||
} { | } { | ||||
@@ -666,7 +660,7 @@ freeedit->redraw();} | |||||
Function {make_free_window()} {open | Function {make_free_window()} {open | ||||
} { | } { | ||||
Fl_Window envfree {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);} | code0 {set_module_parameters(o);} | ||||
class Fl_Group visible | class Fl_Group visible | ||||
} { | } { | ||||
@@ -869,8 +863,6 @@ envwindow->resize(this->x(),this->y(),this->w(),this->h()); | |||||
envwindow->show();} {} | envwindow->show();} {} | ||||
} | } | ||||
decl {EnvelopeParams *env;} {private local | |||||
} | |||||
decl {Fl_Group *envwindow;} {private local | |||||
} | |||||
decl {EnvelopeParams *env;} {} | |||||
decl {Fl_Group *envwindow;} {} | |||||
} | } |
@@ -1,47 +1,44 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <cmath>} {private local | |||||
} | |||||
decl {\#include <cmath>} {} | |||||
decl {\#include <stdio.h>} {private global | |||||
decl {\#include <stdio.h>} {global | |||||
} | } | ||||
decl {\#include <stdlib.h>} {private global | |||||
decl {\#include <stdlib.h>} {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 | |||||
decl {\#include "common.H"} {public | |||||
} | } | ||||
class FormantFilterGraph {open : {public Fl_Box} | class FormantFilterGraph {open : {public Fl_Box} | ||||
@@ -155,14 +152,10 @@ fl_line_style(FL_SOLID,0);} {} | |||||
Function {~FormantFilterGraph()} {} { | Function {~FormantFilterGraph()} {} { | ||||
code {delete [] graphpoints;} {} | 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_} | class FilterUI {open : {public Fl_Group,PresetsUI_} | ||||
@@ -183,7 +176,7 @@ delete (formantparswindow);} {} | |||||
Function {make_window()} {open | Function {make_window()} {open | ||||
} { | } { | ||||
Fl_Window filterui {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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group filterparamswindow { | Fl_Group filterparamswindow { | ||||
@@ -353,7 +346,7 @@ pars->changed=true;} open | |||||
} { | } { | ||||
Fl_Window formantparswindow { | Fl_Window formantparswindow { | ||||
label {Formant Filter Parameters} selected | label {Formant Filter Parameters} selected | ||||
xywh {515 450 700 205} type Double visible | |||||
xywh {518 473 700 205} type Double visible | |||||
} { | } { | ||||
Fl_Group {} { | Fl_Group {} { | ||||
xywh {485 47 105 113} box THIN_UP_BOX | xywh {485 47 105 113} box THIN_UP_BOX | ||||
@@ -639,10 +632,7 @@ formant_q_dial->when(0); | |||||
formant_amp_dial->when(0); | formant_amp_dial->when(0); | ||||
strchdial->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;} {} | |||||
} | } |
@@ -1,44 +1,42 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <stdio.h>} {public local | |||||
decl {\#include <stdio.h>} {public | |||||
} | } | ||||
decl {\#include <stdlib.h>} {public local | |||||
decl {\#include <stdlib.h>} {public | |||||
} | } | ||||
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/LFOParams.h"} {public local | |||||
decl {\#include "../Params/LFOParams.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 | |||||
decl {\#include "common.H"} {public | |||||
} | } | ||||
class LFOUI {open : {public Fl_Group, PresetsUI_} | class LFOUI {open : {public Fl_Group, PresetsUI_} | ||||
@@ -54,7 +52,7 @@ hide(); | |||||
Function {make_window()} {open | Function {make_window()} {open | ||||
} { | } { | ||||
Fl_Window lfoui {open selected | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group lfoparamswindow { | Fl_Group lfoparamswindow { | ||||
@@ -179,6 +177,5 @@ lfoui->resize(this->x(),this->y(),this->w(),this->h()); | |||||
lfoparamswindow->label(this->label());} {} | lfoparamswindow->label(this->label());} {} | ||||
} | } | ||||
decl {LFOParams *pars;} {private local | |||||
} | |||||
decl {LFOParams *pars;} {} | |||||
} | } |
@@ -1,74 +1,72 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <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 "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 "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 | decl {\#if USE_NSM | ||||
\#include "NSM.H" | \#include "NSM.H" | ||||
extern NSM_Client *nsm; | 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} | class VUMeter {: {public Fl_Box} | ||||
@@ -268,14 +266,10 @@ float tmp=ly*1.0/MIN_DB; | |||||
}; | }; | ||||
return(1);} {} | 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} | class SysEffSend {open : {public WidgetPDial} | ||||
@@ -311,12 +305,9 @@ this->copy_label(tmp);} {} | |||||
return(WidgetPDial::handle(event));} {} | 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} | class Panellistitem {open : {public Fl_Group} | ||||
@@ -324,7 +315,7 @@ class Panellistitem {open : {public Fl_Group} | |||||
Function {make_window()} {open private | Function {make_window()} {open private | ||||
} { | } { | ||||
Fl_Window panellistitem {open | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group panellistitemgroup {open | Fl_Group panellistitemgroup {open | ||||
@@ -435,12 +426,9 @@ panellistitemgroup->redraw();} {} | |||||
code {panellistitem->hide(); | code {panellistitem->hide(); | ||||
//delete(panellistitem);} {} | //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 | class MasterUI {open | ||||
@@ -463,7 +451,7 @@ if (( | |||||
*exitprogram=1; | *exitprogram=1; | ||||
}; | }; | ||||
\#endif} open | \#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 { | Fl_Menu_Bar mastermenu { | ||||
xywh {-5 0 690 25} | xywh {-5 0 690 25} | ||||
@@ -1141,7 +1129,7 @@ if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { | |||||
*exitprogram=1; | *exitprogram=1; | ||||
}; | }; | ||||
\#endif} open | \#endif} open | ||||
xywh {280 239 600 335} type Double align 80 visible | |||||
xywh {283 262 600 335} type Double visible | |||||
} { | } { | ||||
Fl_Menu_Bar simplemastermenu { | Fl_Menu_Bar simplemastermenu { | ||||
xywh {0 0 690 25} | xywh {0 0 690 25} | ||||
@@ -1882,30 +1870,17 @@ virkeys->midich=master->part[npart]->Prcvchn; | |||||
simplerefresh(); | simplerefresh(); | ||||
bankui->hide();} {} | 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;} {} | |||||
} | } |
@@ -105,7 +105,7 @@ NSM_Client::command_open(const char *name, | |||||
return r; | return r; | ||||
} | } | ||||
static void save_callback(Fl_Widget *w, void *v) | |||||
static void save_callback(Fl_Widget *, void *v) | |||||
{ | { | ||||
MasterUI *ui = static_cast<MasterUI*>(v); | MasterUI *ui = static_cast<MasterUI*>(v); | ||||
ui->do_save_master(); | ui->do_save_master(); | ||||
@@ -118,17 +118,22 @@ NSM_Client::command_active(bool active) | |||||
Fl_Menu_Item *m; | Fl_Menu_Item *m; | ||||
//TODO see if there is a cleaner way of doing this without voiding | //TODO see if there is a cleaner way of doing this without voiding | ||||
//constness | //constness | ||||
if(m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item( | |||||
"&File/&Open Parameters..."))) | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item( | |||||
"&File/&Open Parameters...")))) | |||||
m->label("&Import Parameters..."); | m->label("&Import Parameters..."); | ||||
if(m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item( | |||||
"&File/&Open Parameters..."))) | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item( | |||||
"&File/&Open Parameters...")))) | |||||
m->label("&Import Parameters..."); | m->label("&Import Parameters..."); | ||||
//TODO get this menu entry inserted at the right point | //TODO get this menu entry inserted at the right point | ||||
if(!ui->mastermenu->find_item("&File/&Export Parameters...")) | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item("&File/&Export Parameters...")))) | |||||
m->show(); | |||||
else | |||||
ui->mastermenu->add("&File/&Export Parameters...",0,save_callback,ui); | ui->mastermenu->add("&File/&Export Parameters...",0,save_callback,ui); | ||||
if(!ui->simplemastermenu->find_item("&File/&Export Parameters...")) | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item("&File/&Export Parameters...")))) | |||||
m->show(); | |||||
else | |||||
ui->simplemastermenu->add("&File/&Export Parameters...",0,save_callback,ui); | ui->simplemastermenu->add("&File/&Export Parameters...",0,save_callback,ui); | ||||
ui->sm_indicator1->value(1); | ui->sm_indicator1->value(1); | ||||
@@ -138,19 +143,17 @@ NSM_Client::command_active(bool active) | |||||
} | } | ||||
else { | else { | ||||
Fl_Menu_Item *m; | Fl_Menu_Item *m; | ||||
if(m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item( | |||||
"&File/&Import Parameters..."))) | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item( | |||||
"&File/&Import Parameters...")))) | |||||
m->label("&Open Parameters..."); | m->label("&Open Parameters..."); | ||||
if(m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item( | |||||
"&File/&Open Parameters..."))) | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item( | |||||
"&File/&Open Parameters...")))) | |||||
m->label("&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<Fl_Menu_Item *>(ui->mastermenu->find_item("&File/&Export Parameters...")))) | |||||
m->hide(); | |||||
if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item("&File/&Export Parameters...")))) | |||||
m->hide(); | |||||
ui->sm_indicator1->value(0); | ui->sm_indicator1->value(0); | ||||
ui->sm_indicator2->value(0); | ui->sm_indicator2->value(0); | ||||
@@ -1,62 +1,56 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <FL/Fl_Box.H>} {public local | |||||
decl {\#include <FL/Fl_Box.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_Group.H>} {public local | |||||
decl {\#include <FL/Fl_Group.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_Slider.H>} {public local | |||||
decl {\#include <FL/Fl_Slider.H>} {public | |||||
} | } | ||||
decl {\#include <math.h>} {private local | |||||
} | |||||
decl {\#include <math.h>} {} | |||||
decl {\#include <stdio.h>} {private local | |||||
} | |||||
decl {\#include <stdio.h>} {} | |||||
decl {\#include <stdlib.h>} {private local | |||||
} | |||||
decl {\#include <stdlib.h>} {} | |||||
decl {\#include <string.h>} {private local | |||||
} | |||||
decl {\#include <string.h>} {} | |||||
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 <FL/fl_draw.H>} {public local | |||||
decl {\#include <FL/fl_draw.H>} {public | |||||
} | } | ||||
class OscilSpectrum {: {public Fl_Box} | class OscilSpectrum {: {public Fl_Box} | ||||
@@ -130,12 +124,9 @@ for (i=0;i<n;i++){ | |||||
} | } | ||||
delete [] spc;} {} | delete [] spc;} {} | ||||
} | } | ||||
decl {OscilGen *oscil;} {private local | |||||
} | |||||
decl {int oscbase;} {private local | |||||
} | |||||
decl {Master *master;} {private local | |||||
} | |||||
decl {OscilGen *oscil;} {} | |||||
decl {int oscbase;} {} | |||||
decl {Master *master;} {} | |||||
} | } | ||||
class PSlider {: {public Fl_Slider} | class PSlider {: {public Fl_Slider} | ||||
@@ -251,14 +242,11 @@ fl_end_line(); | |||||
fl_line_style(FL_SOLID,0);} {} | fl_line_style(FL_SOLID,0);} {} | ||||
} | } | ||||
decl {OscilGen *oscil;} {private local | |||||
} | |||||
decl {int oscbase;} {private local | |||||
} | |||||
decl {int phase;} {public local | |||||
} | |||||
decl {Master *master;} {private local | |||||
decl {OscilGen *oscil;} {} | |||||
decl {int oscbase;} {} | |||||
decl {int phase;} {public | |||||
} | } | ||||
decl {Master *master;} {} | |||||
} | } | ||||
class Oscilharmonic {: {public Fl_Group} | class Oscilharmonic {: {public Fl_Group} | ||||
@@ -266,7 +254,7 @@ class Oscilharmonic {: {public Fl_Group} | |||||
Function {make_window()} {open private | Function {make_window()} {open private | ||||
} { | } { | ||||
Fl_Window harmonic {open | Fl_Window harmonic {open | ||||
private xywh {335 236 100 225} type Double box NO_BOX | |||||
private xywh {338 259 100 225} type Double box NO_BOX | |||||
class Fl_Group visible | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Slider mag { | Fl_Slider mag { | ||||
@@ -366,16 +354,11 @@ if (oscil->Phmag[n]==64) mag->selection_color(0); | |||||
code {harmonic->hide(); | code {harmonic->hide(); | ||||
//delete(harmonic);} {} | //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_} | class OscilEditor {open : {public PresetsUI_} | ||||
@@ -384,7 +367,7 @@ class OscilEditor {open : {public PresetsUI_} | |||||
} { | } { | ||||
Fl_Window osceditUI { | Fl_Window osceditUI { | ||||
label {ADsynth Oscillator Editor} open | 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 | code0 {if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} visible | ||||
} { | } { | ||||
Fl_Button applybutton { | Fl_Button applybutton { | ||||
@@ -1160,12 +1143,8 @@ if (cbwidget!=NULL) { | |||||
applybutton->redraw(); | 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;} {} | |||||
} | } |
@@ -1,56 +1,52 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <FL/Fl_Box.H>} {public local | |||||
decl {\#include <FL/Fl_Box.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_Group.H>} {public local | |||||
decl {\#include <FL/Fl_Group.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_File_Chooser.H>} {public local | |||||
decl {\#include <FL/Fl_File_Chooser.H>} {public | |||||
} | } | ||||
decl {\#include <math.h>} {private local | |||||
} | |||||
decl {\#include <math.h>} {} | |||||
decl {\#include <stdio.h>} {private local | |||||
} | |||||
decl {\#include <stdio.h>} {} | |||||
decl {\#include <stdlib.h>} {private local | |||||
} | |||||
decl {\#include <stdlib.h>} {} | |||||
decl {\#include <string.h>} {private local | |||||
} | |||||
decl {\#include <string.h>} {} | |||||
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} | class PADnoteHarmonicProfile {: {public Fl_Box} | ||||
@@ -98,8 +94,6 @@ fl_line(ox+lx/2,oy,ox+lx/2,oy+ly); | |||||
//draw the graph | //draw the graph | ||||
fl_line_style(FL_SOLID); | fl_line_style(FL_SOLID); | ||||
int old=0; | |||||
if (active) fl_color(180,210,240); | if (active) fl_color(180,210,240); | ||||
else fl_color(150,150,155); | else fl_color(150,150,155); | ||||
@@ -121,8 +115,6 @@ for (int i=0;i<lx;i++){ | |||||
// fl_vertex(ox+i-1,oy+ly-2-old); | // fl_vertex(ox+i-1,oy+ly-2-old); | ||||
// fl_vertex(ox+i,oy+ly-2-val); | // fl_vertex(ox+i,oy+ly-2-val); | ||||
// } | // } | ||||
old=val; | |||||
}; | }; | ||||
fl_vertex( ox + w(), oy + h() ); | fl_vertex( ox + w(), oy + h() ); | ||||
fl_end_polygon(); | fl_end_polygon(); | ||||
@@ -136,9 +128,8 @@ fl_line(ox+lx/2+rbw,oy,ox+lx/2+rbw,oy+ly-1); | |||||
fl_line_style(0);} {} | fl_line_style(0);} {} | ||||
} | } | ||||
decl {Master *master;} {private local | |||||
} | |||||
decl {PADnoteParameters *pars;} {public local | |||||
decl {Master *master;} {} | |||||
decl {PADnoteParameters *pars;} {public | |||||
} | } | ||||
} | } | ||||
@@ -232,9 +223,8 @@ for (int i=0;i<lx;i++){ | |||||
};} {} | };} {} | ||||
} | } | ||||
decl {Master *master;} {private local | |||||
} | |||||
decl {PADnoteParameters *pars;} {public local | |||||
decl {Master *master;} {} | |||||
decl {PADnoteParameters *pars;} {public | |||||
} | } | ||||
} | } | ||||
@@ -252,7 +242,7 @@ make_window();} {} | |||||
} { | } { | ||||
Fl_Window padnotewindow { | Fl_Window padnotewindow { | ||||
label {PAD synth Parameters} open | label {PAD synth Parameters} open | ||||
xywh {291 369 535 435} type Double visible | |||||
xywh {294 392 535 435} type Double visible | |||||
} { | } { | ||||
Fl_Tabs {} { | Fl_Tabs {} { | ||||
callback {if (o->value()!=harmonicstructuregroup) applybutton->hide(); | callback {if (o->value()!=harmonicstructuregroup) applybutton->hide(); | ||||
@@ -1113,14 +1103,14 @@ delete(resui); | |||||
padnotewindow->hide(); | padnotewindow->hide(); | ||||
delete(padnotewindow);} {} | 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 | |||||
} | } | ||||
} | } |
@@ -1,47 +1,45 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <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 "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} | class PartSysEffSend {open : {public Fl_Group} | ||||
@@ -49,7 +47,7 @@ class PartSysEffSend {open : {public Fl_Group} | |||||
Function {make_window()} {open private | Function {make_window()} {open private | ||||
} { | } { | ||||
Fl_Window syseffsend { | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Dial {} { | Fl_Dial {} { | ||||
@@ -80,12 +78,9 @@ end();} {} | |||||
code {syseffsend->hide(); | code {syseffsend->hide(); | ||||
//delete(syseffsend);} {} | //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} | class PartKitItem {open : {public Fl_Group} | ||||
@@ -93,7 +88,7 @@ class PartKitItem {open : {public Fl_Group} | |||||
Function {make_window()} {open private | Function {make_window()} {open private | ||||
} { | } { | ||||
Fl_Window partkititem { | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group partkititemgroup { | Fl_Group partkititemgroup { | ||||
@@ -267,16 +262,11 @@ end();} {} | |||||
code {partkititem->hide(); | code {partkititem->hide(); | ||||
//delete(partkititem);} {} | //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} | class PartUI {open : {public Fl_Group} | ||||
@@ -284,7 +274,7 @@ class PartUI {open : {public Fl_Group} | |||||
Function {make_window()} {open private | Function {make_window()} {open private | ||||
} { | } { | ||||
Fl_Window partgroup {open | 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 | class Fl_Group visible | ||||
} { | } { | ||||
Fl_Group partgroupui {open | Fl_Group partgroupui {open | ||||
@@ -462,7 +452,7 @@ if (part->Penabled==0) partgroupui->deactivate(); | |||||
} | } | ||||
Fl_Window ctlwindow { | Fl_Window ctlwindow { | ||||
label Controllers open | 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 {} { | Fl_Check_Button {} { | ||||
label Expr | label Expr | ||||
@@ -645,7 +635,7 @@ else {propta->deactivate();proptb->deactivate();}} | |||||
} | } | ||||
Fl_Window partfx { | Fl_Window partfx { | ||||
label {Part's Insert Effects} selected | 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 { | Fl_Counter inseffnocounter { | ||||
label {FX No.} | label {FX No.} | ||||
@@ -766,7 +756,7 @@ pthread_mutex_unlock(&master->mutex);} | |||||
} | } | ||||
Fl_Window instrumentkitlist { | Fl_Window instrumentkitlist { | ||||
label {Instrument Kit} open | 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 {} { | Fl_Button {} { | ||||
label {Close Window} | label {Close Window} | ||||
@@ -847,7 +837,7 @@ if (part->Pkitmode==0) { | |||||
} | } | ||||
Fl_Window instrumenteditwindow { | Fl_Window instrumenteditwindow { | ||||
label {Instrument Edit} open | 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 {} { | Fl_Group {} { | ||||
xywh {0 220 395 110} box UP_FRAME | xywh {0 220 395 110} box UP_FRAME | ||||
@@ -1116,26 +1106,15 @@ delete(instrumentkitlist); | |||||
instrumenteditwindow->hide(); | instrumenteditwindow->hide(); | ||||
delete(instrumenteditwindow);} {} | 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];} {} | |||||
} | } |
@@ -1,41 +1,35 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <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_Value_Output.H>} {public local | |||||
decl {\#include <FL/Fl_Value_Output.H>} {public | |||||
} | } | ||||
decl {\#include <math.h>} {private local | |||||
} | |||||
decl {\#include <math.h>} {} | |||||
decl {\#include <stdio.h>} {private local | |||||
} | |||||
decl {\#include <stdio.h>} {} | |||||
decl {\#include <stdlib.h>} {private local | |||||
} | |||||
decl {\#include <stdlib.h>} {} | |||||
decl {\#include <string.h>} {private local | |||||
} | |||||
decl {\#include <string.h>} {} | |||||
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} | class ResonanceGraph {open : {public Fl_Box} | ||||
@@ -187,18 +181,13 @@ return(1);} {} | |||||
code {this->cbwidget=cbwidget; | code {this->cbwidget=cbwidget; | ||||
this->applybutton=applybutton;} {} | 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_ | class ResonanceUI {open : PresetsUI_ | ||||
@@ -402,10 +391,8 @@ p1st->value(respar->Pprotectthefundamental); | |||||
rg->redraw();} {} | 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;} {} | |||||
} | } |
@@ -1,41 +1,39 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <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 "../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} | class SUBnoteharmonic {: {public Fl_Group} | ||||
@@ -101,10 +99,8 @@ bw->value(127-pars->Phrelbw[n]);} {} | |||||
hide(); | hide(); | ||||
//delete(harmonic);} {} | //delete(harmonic);} {} | ||||
} | } | ||||
decl {SUBnoteParameters *pars;} {private local | |||||
} | |||||
decl {int n;} {private local | |||||
} | |||||
decl {SUBnoteParameters *pars;} {} | |||||
decl {int n;} {} | |||||
} | } | ||||
class SUBnoteUI {open : {public PresetsUI_} | class SUBnoteUI {open : {public PresetsUI_} | ||||
@@ -113,7 +109,7 @@ class SUBnoteUI {open : {public PresetsUI_} | |||||
} { | } { | ||||
Fl_Window SUBparameters { | Fl_Window SUBparameters { | ||||
label {SUBsynth Parameters} open | label {SUBsynth Parameters} open | ||||
xywh {544 466 735 390} type Double visible | |||||
xywh {542 489 735 390} type Double visible | |||||
} { | } { | ||||
Fl_Scroll {} { | Fl_Scroll {} { | ||||
label scroll open | label scroll open | ||||
@@ -449,8 +445,6 @@ make_window();} {} | |||||
SUBparameters->hide(); | SUBparameters->hide(); | ||||
delete(SUBparameters);} {} | delete(SUBparameters);} {} | ||||
} | } | ||||
decl {SUBnoteParameters *pars;} {private local | |||||
} | |||||
decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {private local | |||||
} | |||||
decl {SUBnoteParameters *pars;} {} | |||||
decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {} | |||||
} | } |
@@ -1,77 +1,63 @@ | |||||
# data file for the Fltk User Interface Designer (fluid) | # data file for the Fltk User Interface Designer (fluid) | ||||
version 1.0300 | |||||
version 1.0110 | |||||
header_name {.h} | header_name {.h} | ||||
code_name {.cc} | 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 <stdlib.h>} {public local | |||||
decl {\#include <stdlib.h>} {public | |||||
} | } | ||||
decl {\#include <FL/fl_draw.H>} {public local | |||||
decl {\#include <FL/fl_draw.H>} {public | |||||
} | } | ||||
decl {\#include <FL/Fl_Box.H>} {public local | |||||
decl {\#include <FL/Fl_Box.H>} {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 | decl {\#ifdef NTK_GUI | ||||
\#include "FL/Fl_Shared_Image.H" | \#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} | 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)} {} { | Function {VirKeys(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { | ||||
code {master=NULL;} {} | code {master=NULL;} {} | ||||
} | } | ||||
@@ -171,8 +157,7 @@ for (i=0;i<N_OCT*12;i++){ | |||||
SIZE_BLACK-3,ly*3/5-5); | SIZE_BLACK-3,ly*3/5-5); | ||||
} | } | ||||
} | } | ||||
\#endif | |||||
} {} | |||||
\#endif} {} | |||||
} | } | ||||
Function {handle(int event)} {return_type int | Function {handle(int event)} {return_type int | ||||
} { | } { | ||||
@@ -295,17 +280,15 @@ pthread_mutex_unlock(&master->mutex);} {} | |||||
Function {relaseallkeys(int type)} {} { | Function {relaseallkeys(int type)} {} { | ||||
code {for (int i=0;i<N_OCT*12;i++) relasekey(i,type);} {} | code {for (int i=0;i<N_OCT*12;i++) relasekey(i,type);} {} | ||||
} | } | ||||
decl {Master *master;} {private local | |||||
decl {Master *master;} {} | |||||
decl {int pressed[N_OCT*12+1];} {} | |||||
decl {unsigned char midich;} {public | |||||
} | } | ||||
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 {char midioct,keyoct1,keyoct2;} {public local | |||||
} | |||||
decl {unsigned char rndvelocity;} {public local | |||||
decl {unsigned char rndvelocity;} {public | |||||
} | } | ||||
} | } | ||||
@@ -317,7 +300,7 @@ class VirKeyboard {open | |||||
label {Virtual Keyboard - ZynAddSubFX} | label {Virtual Keyboard - ZynAddSubFX} | ||||
callback {relaseallkeys(); | callback {relaseallkeys(); | ||||
virkeyboardwindow->hide();} open | virkeyboardwindow->hide();} open | ||||
xywh {97 574 650 130} type Double visible | |||||
xywh {100 597 650 130} type Double visible | |||||
} { | } { | ||||
Fl_Box virkeys { | Fl_Box virkeys { | ||||
label Keyboard | label Keyboard | ||||
@@ -452,7 +435,7 @@ virkeys->take_focus();} | |||||
master->setController(virkeys->midich,C_pitchwheel,-(int) o->value()); | master->setController(virkeys->midich,C_pitchwheel,-(int) o->value()); | ||||
pthread_mutex_unlock(&master->mutex); | pthread_mutex_unlock(&master->mutex); | ||||
virkeys->take_focus();} | 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 {} { | Fl_Button {} { | ||||
label R | label R | ||||
@@ -492,8 +475,6 @@ make_window();} {} | |||||
Function {relaseallkeys()} {} { | Function {relaseallkeys()} {} { | ||||
code {virkeys->relaseallkeys(0);} {} | code {virkeys->relaseallkeys(0);} {} | ||||
} | } | ||||
decl {Master *master;} {private local | |||||
} | |||||
decl {int midictl;} {private local | |||||
} | |||||
decl {Master *master;} {} | |||||
decl {int midictl;} {} | |||||
} | } |
@@ -35,6 +35,7 @@ | |||||
#include <getopt.h> | #include <getopt.h> | ||||
#include "DSP/FFTwrapper.h" | |||||
#include "Misc/Master.h" | #include "Misc/Master.h" | ||||
#include "Misc/Part.h" | #include "Misc/Part.h" | ||||
#include "Misc/Util.h" | #include "Misc/Util.h" | ||||
@@ -164,6 +165,7 @@ void exitprogram() | |||||
#endif | #endif | ||||
delete [] denormalkillbuf; | delete [] denormalkillbuf; | ||||
FFT_cleanup(); | |||||
} | } | ||||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||||
@@ -530,7 +532,9 @@ int main(int argc, char *argv[]) | |||||
} | } | ||||
#endif //LASH | #endif //LASH | ||||
#if USE_NSM | |||||
done: | done: | ||||
#endif | |||||
Fl::wait(0.02f); | Fl::wait(0.02f); | ||||
#else | #else | ||||