@@ -73,6 +73,7 @@ LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml) | |||
ifeq ($(HAVE_ZYN_GUI_DEPS),true) | |||
LINK_FLAGS += $(shell pkg-config --libs ntk ntk_images) | |||
# LINK_FLAGS += $(shell fltk-config --use-images --ldflags) | |||
endif | |||
endif | |||
@@ -83,6 +84,11 @@ OBJS += ../carla-engine/carla_engine.a | |||
OBJS += ../carla-plugin/carla_plugin.a | |||
OBJS += ../carla-native/carla_native.a | |||
# FIXME | |||
OBJS += ../carla-native/3bandeq.a | |||
OBJS += ../carla-native/3bandsplitter.a | |||
OBJS += ../carla-native/zynaddsubfx.a | |||
# others | |||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||
OBJS += ../carla-lilv/carla_lilv.a | |||
@@ -21,14 +21,14 @@ | |||
#include "3bandeq/DistrhoPluginInfo.h" | |||
/// Set namespace for this plugin | |||
#define DISTRHO_NAMESPACE DISTRHO_3BEQ | |||
#define DISTRHO_NAMESPACE DISTRHO_3BandEQ | |||
// Include Plugin headers | |||
#include "3bandeq/DistrhoPlugin3BandEQ.h" | |||
#include "3bandeq/DistrhoUI3BandEQ.h" | |||
// Include DISTRHO code | |||
#include "DistrhoPluginCarla.cpp" | |||
#include "distrho/DistrhoPluginCarla.cpp" | |||
START_NAMESPACE_DISTRHO | |||
@@ -21,14 +21,14 @@ | |||
#include "3bandsplitter/DistrhoPluginInfo.h" | |||
/// Set namespace for this plugin | |||
#define DISTRHO_NAMESPACE DISTRHO_3BSPILT | |||
#define DISTRHO_NAMESPACE DISTRHO_3BandSplitter | |||
// Include Plugin headers | |||
#include "3bandsplitter/DistrhoPlugin3BandSplitter.h" | |||
#include "3bandsplitter/DistrhoUI3BandSplitter.h" | |||
// Include DISTRHO code | |||
#include "DistrhoPluginCarla.cpp" | |||
#include "distrho/DistrhoPluginCarla.cpp" | |||
START_NAMESPACE_DISTRHO | |||
@@ -18,7 +18,7 @@ ifeq ($(HAVE_ZYN_DEPS),true) | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml) -DWANT_ZYNADDSUBFX | |||
ifeq ($(HAVE_ZYN_GUI_DEPS),true) | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags ntk ntk_images) -DWANT_ZYNADDSUBFX_GUI | |||
BUILD_CXX_FLAGS += -DNTK_GUI=1 -DVSTAUDIOOUT=1 | |||
# BUILD_CXX_FLAGS += $(shell fltk-config --use-images --cxxflags) -DWANT_ZYNADDSUBFX_GUI | |||
endif | |||
endif | |||
@@ -26,14 +26,14 @@ OBJS = \ | |||
bypass.o \ | |||
midi-split.o | |||
# OBJS += \ | |||
# 3bandeq.o \ | |||
# 3bandsplitter.o \ | |||
# distrho/pugl.o | |||
OBJS += \ | |||
3bandeq.o \ | |||
3bandsplitter.o \ | |||
distrho/pugl.o | |||
# OBJS += \ | |||
# 3bandeq.a \ | |||
# 3bandsplitter.a | |||
OBJS += \ | |||
3bandeq.a \ | |||
3bandsplitter.a | |||
# -------------------------------------------------------------- | |||
@@ -191,8 +191,8 @@ void carla_register_native_plugin_zynaddsubfx(); | |||
#endif | |||
// DISTRHO based plugins | |||
// void carla_register_native_plugin_3BandEQ(); | |||
// void carla_register_native_plugin_3BandSplitter(); | |||
void carla_register_native_plugin_3BandEQ(); | |||
void carla_register_native_plugin_3BandSplitter(); | |||
// ----------------------------------------------------------------------- | |||
@@ -18,9 +18,6 @@ | |||
#include "carla_midi.h" | |||
#include "carla_native.hpp" | |||
#define NTK_GUI 1 | |||
#define VSTAUDIOOUT 1 | |||
#include "zynaddsubfx/Misc/Master.h" | |||
#include "zynaddsubfx/Misc/Util.h" | |||
#include "zynaddsubfx/Nio/Nio.h" | |||
@@ -35,19 +32,26 @@ | |||
# include <FL/Fl_Shared_Image.H> | |||
# include <FL/Fl_Tiled_Image.H> | |||
# include <FL/Fl_Dial.H> | |||
# include "zynaddsubfx/UI/common.H" | |||
# include "zynaddsubfx/UI/MasterUI.h" | |||
#ifdef NTK_GUI | |||
// this is used to know wherever gui stuff is initialized | |||
static Fl_Tiled_Image* s_moduleBackdrop = nullptr; | |||
#endif | |||
void set_module_parameters(Fl_Widget* o) | |||
{ | |||
#ifdef NTK_GUI | |||
o->box(FL_DOWN_FRAME); | |||
o->align(o->align() | FL_ALIGN_IMAGE_BACKDROP); | |||
o->color(FL_BLACK ); | |||
o->image(s_moduleBackdrop); | |||
o->color(FL_BLACK); | |||
o->image(module_backdrop); | |||
o->labeltype(FL_SHADOW_LABEL); | |||
#else | |||
o->box(FL_PLASTIC_UP_BOX); | |||
o->color(FL_CYAN); | |||
o->labeltype(FL_EMBOSSED_LABEL); | |||
#endif | |||
} | |||
#endif | |||
@@ -238,8 +242,6 @@ protected: | |||
{ | |||
if (! m_masterUI) | |||
{ | |||
if (! s_moduleBackdrop) | |||
{ | |||
//Fl::visual(); | |||
//fltk::xdisplay = _disp_ptr; | |||
//fltk::xscreen = _screenID; | |||
@@ -250,11 +252,14 @@ protected: | |||
//fl_screen = QX11Info::appScreen(); | |||
//fl_visual = (XVisualInfo*)QX11Info::appVisual(fl_screen); | |||
//fl_colormap = QX11Info::appColormap(fl_screen); | |||
// //fl_gc = | |||
//fl_gc = | |||
//fl_window = QX11Info::appRootWindow(fl_screen); | |||
//Fl::own_colormap(); | |||
#ifdef NTK_GUI | |||
if (! s_moduleBackdrop) | |||
{ | |||
fl_register_images(); | |||
Fl_Dial::default_style(Fl_Dial::PIXMAP_DIAL); | |||
@@ -278,6 +283,7 @@ protected: | |||
Fl::background2(70, 70, 70); | |||
Fl::foreground(255, 255, 255); | |||
} | |||
#endif | |||
m_uiClosed = 0; | |||
qWarning("TEST - master: %p", m_master); | |||
@@ -316,9 +322,10 @@ protected: | |||
} | |||
else if (m_masterUI) | |||
{ | |||
pthread_mutex_lock(&m_master->mutex); | |||
qWarning("IDLE"); | |||
//pthread_mutex_lock(&m_master->mutex); | |||
Fl::check(); | |||
pthread_mutex_unlock(&m_master->mutex); | |||
//pthread_mutex_unlock(&m_master->mutex); | |||
} | |||
} | |||
#endif | |||
@@ -451,7 +458,7 @@ public: | |||
if (--s_instanceCount == 0) | |||
{ | |||
#ifdef WANT_ZYNADDSUBFX_GUI | |||
#ifdef NTK_GUI | |||
if (s_moduleBackdrop) | |||
{ | |||
delete s_moduleBackdrop; | |||
@@ -461,7 +468,7 @@ public: | |||
Nio::stop(); | |||
Master::deleteInstance(); | |||
//Master::deleteInstance(); | |||
delete[] denormalkillbuf; | |||
denormalkillbuf = nullptr; | |||
@@ -11,9 +11,11 @@ WANT_GUI = $(shell pkg-config --exists ntk ntk_images && echo true) | |||
# -------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC -I. | |||
BUILD_CXX_FLAGS += -DVERSION=\"2.4.3\" | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml) | |||
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml) | |||
BUILD_CXX_FLAGS += -DASM_F2I_YES -DVERSION=\"2.4.3\" | |||
# BUILD_CXX_FLAGS += -DIN_DEFAULT=\"\" -DOUT_DEFAULT=\"\" | |||
BUILD_CXX_FLAGS += -DIN_DEFAULT=\"JACK\" -DOUT_DEFAULT=\"JACK\" -DJACK=1 | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml jack) | |||
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml jack) | |||
OBJS = \ | |||
DSP/AnalogFilter.o \ | |||
@@ -73,12 +75,18 @@ OBJS = \ | |||
# Misc/Stereo.o | |||
# Nio/MidiIn.o | |||
ifeq ($(WANT_GUI),true) | |||
OBJS += Nio/JackEngine.o | |||
# ifeq ($(WANT_GUI),true) | |||
# BUILD_CXX_FLAGS += -DFLTK_GUI=1 | |||
BUILD_CXX_FLAGS += -DNTK_GUI=1 | |||
# BUILD_CXX_FLAGS += -DVSTAUDIOOUT=1 # TESTING | |||
BUILD_CXX_FLAGS += -DPIXMAP_PATH=\"/usr/share/zynaddsubfx/pixmaps/\" | |||
BUILD_CXX_FLAGS += -DSOURCE_DIR=\"/usr/share/zynaddsubfx/pixmaps/nothing-here\" | |||
# BUILD_CXX_FLAGS += $(shell fltk-config --use-images --cxxflags) | |||
# LINK_FLAGS += $(shell fltk-config --use-images --ldflags) | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags ntk ntk_images) | |||
LINK_FLAGS += $(shell pkg-config --libs ntk ntk_images) | |||
@@ -137,7 +145,7 @@ OBJS += \ | |||
UI/VirKeyboard.o \ | |||
UI/WidgetPDial.o \ | |||
UI/NioUI.o | |||
endif | |||
# endif | |||
TARGET = ../zynaddsubfx.a | |||
@@ -156,6 +164,7 @@ test: $(FILES) $(OBJS) main.o | |||
%.cc: %.fl | |||
# FIXME | |||
cd UI; ntk-fluid -c ../$<; cd .. | |||
# cd UI; fluid -c ../$<; cd .. | |||
.cc.o: | |||
$(CXX) -c $< $(BUILD_CXX_FLAGS) -o $@ | |||
@@ -164,4 +173,4 @@ test: $(FILES) $(OBJS) main.o | |||
$(CXX) -c $< $(BUILD_CXX_FLAGS) -o $@ | |||
clean: | |||
rm -f $(TARGET) $(FILES) $(HEADERS) $(OBJS) | |||
rm -f $(TARGET) $(FILES) $(HEADERS) $(OBJS) main.o |
@@ -45,8 +45,6 @@ vuData::vuData(void) | |||
rmspeakl(0.0f), rmspeakr(0.0f), clipped(0) | |||
{} | |||
static Master* masterInstance = NULL; | |||
Master::Master() | |||
{ | |||
swaplr = 0; | |||
@@ -123,19 +121,11 @@ bool Master::mutexLock(lockset request) | |||
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; | |||
} | |||
/* | |||
@@ -58,7 +58,6 @@ class Master | |||
~Master(); | |||
static Master &getInstance(); | |||
static void deleteInstance(); | |||
/**Saves all settings to a XML file | |||
* @return 0 for ok or <0 if there is an error*/ | |||
@@ -17,9 +17,6 @@ OutMgr *out = NULL; | |||
EngineMgr *eng = NULL; | |||
string postfix; | |||
#define IN_DEFAULT "" | |||
#define OUT_DEFAULT "" | |||
bool Nio::autoConnect = false; | |||
string Nio::defaultSource = IN_DEFAULT; | |||
string Nio::defaultSink = OUT_DEFAULT; | |||
@@ -437,8 +437,8 @@ class MasterUI {open | |||
} { | |||
Fl_Window masterwindow { | |||
label zynaddsubfx | |||
callback {\#ifdef VSTAUDIOOUT | |||
fl_alert("ZynAddSubFX could not be closed this way, because it's a VST plugin. Please use the host aplication to close it."); | |||
callback {\#ifdef PLUGINVERSION | |||
fl_alert("ZynAddSubFX could not be closed this way, because it's a plugin. Please use the host aplication to close it."); | |||
\#else | |||
if (( | |||
\#if USE_NSM | |||
@@ -1121,8 +1121,8 @@ updatepanel();} | |||
} | |||
Fl_Window simplemasterwindow { | |||
label ZynAddSubFX | |||
callback {\#ifdef VSTAUDIOOUT | |||
fl_alert("ZynAddSubFX could not be closed this way, because it's a VST plugin. Please use the host aplication to close it."); | |||
callback {\#ifdef PLUGINVERSION | |||
fl_alert("ZynAddSubFX could not be closed this way, because it's a plugin. Please use the host aplication to close it."); | |||
\#else | |||
if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { | |||
config.save(); | |||
@@ -28,7 +28,6 @@ NioUI::NioUI() | |||
//initialize midi list | |||
{ | |||
#if 1 | |||
set<string> midiList = Nio::getSources(); | |||
string source = Nio::getSource(); | |||
int midival = 0; | |||
@@ -38,15 +37,11 @@ NioUI::NioUI() | |||
if(*itr == source) | |||
midival = midi->size() - 2; | |||
} | |||
#else | |||
int midival = 0; | |||
#endif | |||
midi->value(midival); | |||
} | |||
//initialize audio list | |||
{ | |||
#if 1 | |||
set<string> audioList = Nio::getSinks(); | |||
string sink = Nio::getSink(); | |||
int audioval = 0; | |||
@@ -56,9 +51,6 @@ NioUI::NioUI() | |||
if(*itr == sink) | |||
audioval = audio->size() - 2; | |||
} | |||
#else | |||
int audioval = 0; | |||
#endif | |||
audio->value(audioval); | |||
} | |||
resizable(this); | |||
@@ -1,5 +1,5 @@ | |||
#ifndef NIOUT_H | |||
#define NIOUT_H | |||
#ifndef NIOUI_H | |||
#define NIOUI_H | |||
#include <FL/Fl.H> | |||
#include <FL/Fl_Window.H> | |||