@@ -10,9 +10,6 @@ | |||||
# Support for LADSPA, DSSI, LV2, VST and AU plugins | # Support for LADSPA, DSSI, LV2, VST and AU plugins | ||||
CARLA_PLUGIN_SUPPORT = true | CARLA_PLUGIN_SUPPORT = true | ||||
# Support for csound files (version 6, not ready yet) | |||||
CARLA_CSOUND_SUPPORT = false | |||||
# Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler) | # Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler) | ||||
CARLA_SAMPLERS_SUPPORT = true | CARLA_SAMPLERS_SUPPORT = true | ||||
@@ -68,6 +65,12 @@ BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard | |||||
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all | LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all | ||||
endif | endif | ||||
ifeq ($(PANDORA),true) | |||||
# OpenPandora flags | |||||
BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp | |||||
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all | |||||
endif | |||||
ifneq ($(WIN32),true) | ifneq ($(WIN32),true) | ||||
# not needed for Windows | # not needed for Windows | ||||
BASE_FLAGS += -fPIC -DPIC | BASE_FLAGS += -fPIC -DPIC | ||||
@@ -127,8 +130,8 @@ endif | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Check for qt, set default version | # Check for qt, set default version | ||||
HAVE_QT4 = $(shell pkg-config --exists QtCore QtXml && echo true) | |||||
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Xml && echo true) | |||||
HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true) | |||||
HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true) | |||||
ifeq ($(MACOS_OR_WIN32),true) | ifeq ($(MACOS_OR_WIN32),true) | ||||
DEFAULT_QT ?= 5 | DEFAULT_QT ?= 5 | ||||
@@ -210,22 +213,22 @@ HAVE_DGL = true | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Check for juce support | |||||
# Check for juce UI support | |||||
ifeq ($(HAIKU),true) | ifeq ($(HAIKU),true) | ||||
HAVE_JUCE = false | |||||
HAVE_JUCE_UI = false | |||||
endif | endif | ||||
ifeq ($(LINUX),true) | ifeq ($(LINUX),true) | ||||
HAVE_JUCE = $(shell pkg-config --exists x11 xinerama xext xcursor freetype2 && echo true) | |||||
HAVE_JUCE_UI = $(shell pkg-config --exists x11 xinerama xext xcursor freetype2 && echo true) | |||||
endif | endif | ||||
ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
HAVE_JUCE = true | |||||
HAVE_JUCE_UI = true | |||||
endif | endif | ||||
ifeq ($(WIN32),true) | ifeq ($(WIN32),true) | ||||
HAVE_JUCE = true | |||||
HAVE_JUCE_UI = true | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -250,12 +253,6 @@ HAVE_ALSA = $(shell pkg-config --exists alsa && echo true) | |||||
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true) | HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true) | ||||
endif | endif | ||||
ifeq ($(CARLA_CSOUND_SUPPORT),true) | |||||
ifeq ($(HAVE_JUCE),true) | |||||
HAVE_CSOUND = $(shell pkg-config --exists sndfile && echo true) | |||||
endif | |||||
endif | |||||
ifeq ($(CARLA_SAMPLERS_SUPPORT),true) | ifeq ($(CARLA_SAMPLERS_SUPPORT),true) | ||||
HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true) | HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true) | ||||
HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true) | HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true) | ||||
@@ -288,8 +285,8 @@ ifeq ($(HAVE_FFMPEG),true) | |||||
BASE_FLAGS += -DHAVE_FFMPEG | BASE_FLAGS += -DHAVE_FFMPEG | ||||
endif | endif | ||||
ifeq ($(HAVE_JUCE),true) | |||||
BASE_FLAGS += -DHAVE_JUCE | |||||
ifeq ($(HAVE_JUCE_UI),true) | |||||
BASE_FLAGS += -DHAVE_JUCE_UI | |||||
endif | endif | ||||
ifeq ($(HAVE_WAYLAND),true) | ifeq ($(HAVE_WAYLAND),true) | ||||
@@ -309,18 +306,9 @@ LIBLO_LIBS = $(shell pkg-config --libs liblo) | |||||
ifeq ($(DEFAULT_QT),4) | ifeq ($(DEFAULT_QT),4) | ||||
QTCORE_FLAGS = $(shell pkg-config --cflags QtCore) | QTCORE_FLAGS = $(shell pkg-config --cflags QtCore) | ||||
QTCORE_LIBS = $(shell pkg-config --libs QtCore) | QTCORE_LIBS = $(shell pkg-config --libs QtCore) | ||||
QTXML_FLAGS = $(shell pkg-config --cflags QtXml) | |||||
QTXML_LIBS = $(shell pkg-config --libs QtXml) | |||||
else | else | ||||
QTCORE_FLAGS = $(shell pkg-config --cflags Qt5Core) | QTCORE_FLAGS = $(shell pkg-config --cflags Qt5Core) | ||||
QTCORE_LIBS = $(shell pkg-config --libs Qt5Core) | QTCORE_LIBS = $(shell pkg-config --libs Qt5Core) | ||||
QTXML_FLAGS = $(shell pkg-config --cflags Qt5Xml) | |||||
QTXML_LIBS = $(shell pkg-config --libs Qt5Xml) | |||||
endif | |||||
ifeq ($(HAVE_CSOUND),true) | |||||
CSOUND_FLAGS = -DUSE_DOUBLE=1 | |||||
CSOUND_LIBS = $(shell pkg-config --libs sndfile) -lcsound64 | |||||
endif | endif | ||||
ifeq ($(HAVE_FLUIDSYNTH),true) | ifeq ($(HAVE_FLUIDSYNTH),true) | ||||
@@ -480,35 +480,19 @@ typedef enum { | |||||
PLUGIN_AU = 7, | PLUGIN_AU = 7, | ||||
/*! | /*! | ||||
* JACK plugin. | |||||
* GIG file. | |||||
*/ | */ | ||||
PLUGIN_JACK = 8, | |||||
PLUGIN_GIG = 8, | |||||
/*! | /*! | ||||
* ReWire plugin. | |||||
* @note Windows and MacOS only | |||||
* SF2 file (SoundFont). | |||||
*/ | */ | ||||
PLUGIN_REWIRE = 9, | |||||
PLUGIN_SF2 = 9, | |||||
/*! | /*! | ||||
* Single CSD file (Csound). | |||||
* SFZ file. | |||||
*/ | */ | ||||
PLUGIN_FILE_CSD = 10, | |||||
/*! | |||||
* Single GIG file. | |||||
*/ | |||||
PLUGIN_FILE_GIG = 11, | |||||
/*! | |||||
* Single SF2 file (SoundFont). | |||||
*/ | |||||
PLUGIN_FILE_SF2 = 12, | |||||
/*! | |||||
* Single SFZ file. | |||||
*/ | |||||
PLUGIN_FILE_SFZ = 13 | |||||
PLUGIN_SFZ = 10 | |||||
} PluginType; | } PluginType; | ||||
@@ -471,7 +471,7 @@ CARLA_EXPORT void carla_set_file_callback(FileCallbackFunc func, void* ptr); | |||||
/*! | /*! | ||||
* Load a file of any type.\n | * Load a file of any type.\n | ||||
* This will try to load a generic file as a plugin, | * This will try to load a generic file as a plugin, | ||||
* either by direct handling (Csound, GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI). | |||||
* either by direct handling (GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI). | |||||
* @param Filename Filename | * @param Filename Filename | ||||
* @see carla_get_supported_file_extensions() | * @see carla_get_supported_file_extensions() | ||||
*/ | */ | ||||
@@ -858,15 +858,11 @@ public: | |||||
static CarlaPlugin* newVST(const Initializer& init); | static CarlaPlugin* newVST(const Initializer& init); | ||||
static CarlaPlugin* newVST3(const Initializer& init); | static CarlaPlugin* newVST3(const Initializer& init); | ||||
static CarlaPlugin* newAU(const Initializer& init); | static CarlaPlugin* newAU(const Initializer& init); | ||||
static CarlaPlugin* newJACK(const Initializer& init); | |||||
static CarlaPlugin* newReWire(const Initializer& init); | |||||
static CarlaPlugin* newCsound(const Initializer& init); | |||||
static CarlaPlugin* newJuce(const Initializer& init, const char* const format); | static CarlaPlugin* newJuce(const Initializer& init, const char* const format); | ||||
static CarlaPlugin* newFluidSynth(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newFluidSynth(const Initializer& init, const bool use16Outs); | ||||
static CarlaPlugin* newLinuxSampler(const Initializer& init, const char* const format, const bool use16Outs); | static CarlaPlugin* newLinuxSampler(const Initializer& init, const char* const format, const bool use16Outs); | ||||
static CarlaPlugin* newFileCSD(const Initializer& init); | |||||
static CarlaPlugin* newFileGIG(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newFileGIG(const Initializer& init, const bool use16Outs); | ||||
static CarlaPlugin* newFileSF2(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newFileSF2(const Initializer& init, const bool use16Outs); | ||||
static CarlaPlugin* newFileSFZ(const Initializer& init); | static CarlaPlugin* newFileSFZ(const Initializer& init); | ||||
@@ -588,11 +588,6 @@ const char* carla_get_complete_license_text() | |||||
text2 += "<li>AU plugin support</li>"; // FIXME | text2 += "<li>AU plugin support</li>"; // FIXME | ||||
#endif | #endif | ||||
// Files | |||||
#ifdef WANT_CSOUND | |||||
text2 += "<li>CSound library for csd support</li>"; // FIXME | |||||
#endif | |||||
// Sample kit libraries | // Sample kit libraries | ||||
#ifdef WANT_FLUIDSYNTH | #ifdef WANT_FLUIDSYNTH | ||||
text2 += "<li>FluidSynth library for SF2 support, http://www.fluidsynth.org/</li>"; | text2 += "<li>FluidSynth library for SF2 support, http://www.fluidsynth.org/</li>"; | ||||
@@ -662,11 +657,6 @@ const char* carla_get_supported_file_extensions() | |||||
// Base types | // Base types | ||||
retText += "*.carxp;*.carxs"; | retText += "*.carxp;*.carxs"; | ||||
// CSound | |||||
#ifdef WANT_CSOUND | |||||
retText += ";*.csd"; | |||||
#endif | |||||
// Sample kits | // Sample kits | ||||
#ifdef WANT_FLUIDSYNTH | #ifdef WANT_FLUIDSYNTH | ||||
retText += ";*.sf2"; | retText += ";*.sf2"; | ||||
@@ -59,10 +59,6 @@ ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
STANDALONE_FLAGS += $(LILV_LIBS) | STANDALONE_FLAGS += $(LILV_LIBS) | ||||
endif | endif | ||||
ifeq ($(HAVE_CSOUND),true) | |||||
STANDALONE_FLAGS += $(CSOUND_LIBS) | |||||
endif | |||||
ifeq ($(HAVE_FLUIDSYNTH),true) | ifeq ($(HAVE_FLUIDSYNTH),true) | ||||
STANDALONE_FLAGS += $(FLUIDSYNTH_LIBS) | STANDALONE_FLAGS += $(FLUIDSYNTH_LIBS) | ||||
endif | endif | ||||
@@ -35,10 +35,6 @@ endif | |||||
# ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
ifeq ($(HAVE_CSOUND),true) | |||||
BUILD_CXX_FLAGS += -DWANT_CSOUND | |||||
endif | |||||
ifeq ($(HAVE_FLUIDSYNTH),true) | ifeq ($(HAVE_FLUIDSYNTH),true) | ||||
BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH | BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH | ||||
endif | endif | ||||
@@ -470,11 +470,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons | |||||
break; | break; | ||||
case PLUGIN_INTERNAL: | case PLUGIN_INTERNAL: | ||||
if (std::strcmp(label, "Csound") == 0) | |||||
{ | |||||
plugin = CarlaPlugin::newCsound(initializer); | |||||
} | |||||
else if (std::strcmp(label, "FluidSynth") == 0) | |||||
if (std::strcmp(label, "FluidSynth") == 0) | |||||
{ | { | ||||
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | ||||
plugin = CarlaPlugin::newFluidSynth(initializer, use16Outs); | plugin = CarlaPlugin::newFluidSynth(initializer, use16Outs); | ||||
@@ -524,29 +520,17 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons | |||||
plugin = CarlaPlugin::newAU(initializer); | plugin = CarlaPlugin::newAU(initializer); | ||||
break; | break; | ||||
case PLUGIN_JACK: | |||||
plugin = CarlaPlugin::newJACK(initializer); | |||||
break; | |||||
case PLUGIN_REWIRE: | |||||
plugin = CarlaPlugin::newReWire(initializer); | |||||
break; | |||||
case PLUGIN_FILE_CSD: | |||||
plugin = CarlaPlugin::newFileCSD(initializer); | |||||
break; | |||||
case PLUGIN_FILE_GIG: | |||||
case PLUGIN_GIG: | |||||
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | ||||
plugin = CarlaPlugin::newFileGIG(initializer, use16Outs); | plugin = CarlaPlugin::newFileGIG(initializer, use16Outs); | ||||
break; | break; | ||||
case PLUGIN_FILE_SF2: | |||||
case PLUGIN_SF2: | |||||
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0); | ||||
plugin = CarlaPlugin::newFileSF2(initializer, use16Outs); | plugin = CarlaPlugin::newFileSF2(initializer, use16Outs); | ||||
break; | break; | ||||
case PLUGIN_FILE_SFZ: | |||||
case PLUGIN_SFZ: | |||||
plugin = CarlaPlugin::newFileSFZ(initializer); | plugin = CarlaPlugin::newFileSFZ(initializer); | ||||
break; | break; | ||||
} | } | ||||
@@ -914,17 +898,14 @@ bool CarlaEngine::loadFile(const char* const filename) | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
if (extension == "csd") | |||||
return addPlugin(PLUGIN_FILE_CSD, filename, baseName, baseName, 0, nullptr); | |||||
if (extension == "gig") | if (extension == "gig") | ||||
return addPlugin(PLUGIN_FILE_GIG, filename, baseName, baseName, 0, nullptr); | |||||
return addPlugin(PLUGIN_GIG, filename, baseName, baseName, 0, nullptr); | |||||
if (extension == "sf2") | if (extension == "sf2") | ||||
return addPlugin(PLUGIN_FILE_SF2, filename, baseName, baseName, 0, nullptr); | |||||
return addPlugin(PLUGIN_SF2, filename, baseName, baseName, 0, nullptr); | |||||
if (extension == "sfz") | if (extension == "sfz") | ||||
return addPlugin(PLUGIN_FILE_SFZ, filename, baseName, baseName, 0, nullptr); | |||||
return addPlugin(PLUGIN_SFZ, filename, baseName, baseName, 0, nullptr); | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
@@ -1316,7 +1316,7 @@ void CarlaPlugin::setProgram(const int32_t index, const bool sendGui, const bool | |||||
uiProgramChange(static_cast<uint32_t>(index)); | uiProgramChange(static_cast<uint32_t>(index)); | ||||
#endif | #endif | ||||
if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ) | |||||
if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ) | |||||
return; | return; | ||||
pData->updateParameterValues(this, sendOsc, sendCallback, true); | pData->updateParameterValues(this, sendOsc, sendCallback, true); | ||||
@@ -1359,7 +1359,7 @@ void CarlaPlugin::setMidiProgram(const int32_t index, const bool sendGui, const | |||||
uiMidiProgramChange(static_cast<uint32_t>(index)); | uiMidiProgramChange(static_cast<uint32_t>(index)); | ||||
#endif | #endif | ||||
if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ) | |||||
if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ) | |||||
return; | return; | ||||
pData->updateParameterValues(this, sendOsc, sendCallback, true); | pData->updateParameterValues(this, sendOsc, sendCallback, true); | ||||
@@ -1,124 +0,0 @@ | |||||
/* | |||||
* Carla Csound Plugin | |||||
* Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
* | |||||
* This program is free software; you can redistribute it and/or | |||||
* modify it under the terms of the GNU General Public License as | |||||
* published by the Free Software Foundation; either version 2 of | |||||
* the License, or any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||||
*/ | |||||
#include "CarlaPluginInternal.hpp" | |||||
#include "CarlaEngine.hpp" | |||||
//#define WANT_CSOUND 1 | |||||
#ifdef WANT_CSOUND | |||||
//#include "CarlaVstUtils.hpp" | |||||
CARLA_BACKEND_START_NAMESPACE | |||||
#if 0 | |||||
} | |||||
#endif | |||||
class CsoundPlugin : public CarlaPlugin | |||||
{ | |||||
public: | |||||
CsoundPlugin(CarlaEngine* const engine, const ushort id) | |||||
: CarlaPlugin(engine, id) | |||||
{ | |||||
carla_debug("CsoundPlugin::CsoundPlugin(%p, %i)", engine, id); | |||||
} | |||||
~CsoundPlugin() override | |||||
{ | |||||
carla_debug("CsoundPlugin::~CsoundPlugin()"); | |||||
pData->singleMutex.lock(); | |||||
pData->masterMutex.lock(); | |||||
if (pData->client != nullptr && pData->client->isActive()) | |||||
pData->client->deactivate(); | |||||
} | |||||
// ------------------------------------------------------------------- | |||||
// Information (base) | |||||
PluginType getType() const noexcept override | |||||
{ | |||||
return PLUGIN_CSOUND; | |||||
} | |||||
void reload() override | |||||
{ | |||||
CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); | |||||
carla_debug("CsoundPlugin::reload() - start"); | |||||
bufferSizeChanged(pData->engine->getBufferSize()); | |||||
reloadPrograms(true); | |||||
carla_debug("CsoundPlugin::reload() - end"); | |||||
} | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames) override | |||||
{ | |||||
} | |||||
private: | |||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CsoundPlugin) | |||||
}; | |||||
CARLA_BACKEND_END_NAMESPACE | |||||
#endif | |||||
// ----------------------------------------------------------------------- | |||||
CARLA_BACKEND_START_NAMESPACE | |||||
CarlaPlugin* CarlaPlugin::newCsound(const Initializer& init) | |||||
{ | |||||
carla_debug("CarlaPlugin::newCsound({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId); | |||||
#ifdef WANT_CSOUND | |||||
CsoundPlugin* const plugin(new CsoundPlugin(init.engine, init.id)); | |||||
//if (! plugin->init(init.filename, init.name, init.label)) | |||||
{ | |||||
delete plugin; | |||||
return nullptr; | |||||
} | |||||
plugin->reload(); | |||||
if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK && ! plugin->canRunInRack()) | |||||
{ | |||||
init.engine->setLastError("Carla's rack mode can only work with Stereo VST3 plugins, sorry!"); | |||||
delete plugin; | |||||
return nullptr; | |||||
} | |||||
return plugin; | |||||
#else | |||||
init.engine->setLastError("VST3 support not available"); | |||||
return nullptr; | |||||
#endif | |||||
} | |||||
CarlaPlugin* CarlaPlugin::newFileCSD(const Initializer& init) | |||||
{ | |||||
carla_debug("CarlaPlugin::newFileCSD({%p, \"%s\", \"%s\", \"%s\"})", init.engine, init.filename, init.name, init.label); | |||||
return newCsound(init); | |||||
} | |||||
CARLA_BACKEND_END_NAMESPACE | |||||
// ----------------------------------------------------------------------- |
@@ -21,8 +21,6 @@ OBJS = \ | |||||
VstPlugin.cpp.o \ | VstPlugin.cpp.o \ | ||||
Vst3Plugin.cpp.o \ | Vst3Plugin.cpp.o \ | ||||
AuPlugin.cpp.o \ | AuPlugin.cpp.o \ | ||||
ReWirePlugin.cpp.o \ | |||||
CsoundPlugin.cpp.o \ | |||||
JucePlugin.cpp.o \ | JucePlugin.cpp.o \ | ||||
FluidSynthPlugin.cpp.o \ | FluidSynthPlugin.cpp.o \ | ||||
LinuxSamplerPlugin.cpp.o | LinuxSamplerPlugin.cpp.o | ||||
@@ -87,12 +85,6 @@ Vst3Plugin.cpp.o: Vst3Plugin.cpp $(VST3_PLUGIN_CPP_DEPS) | |||||
AuPlugin.cpp.o: AuPlugin.cpp $(AU_PLUGIN_CPP_DEPS) | AuPlugin.cpp.o: AuPlugin.cpp $(AU_PLUGIN_CPP_DEPS) | ||||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | ||||
ReWirePlugin.cpp.o: ReWirePlugin.cpp $(REWIRE_PLUGIN_CPP_DEPS) | |||||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||||
CsoundPlugin.cpp.o: CsoundPlugin.cpp $(CSOUND_PLUGIN_CPP_DEPS) | |||||
$(CXX) $< $(BUILD_CXX_FLAGS) $(CSOUND_FLAGS) -c -o $@ | |||||
JucePlugin.cpp.o: JucePlugin.cpp $(JUCE_PLUGIN_CPP_DEPS) | JucePlugin.cpp.o: JucePlugin.cpp $(JUCE_PLUGIN_CPP_DEPS) | ||||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | ||||
@@ -25,7 +25,7 @@ LINK_PLUGIN_FLAGS = $(LINK_FLAGS) | |||||
LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS) | LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS) | ||||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ||||
BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_REWIRE | |||||
BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 | |||||
ifeq ($(MACOS),true) | ifeq ($(MACOS),true) | ||||
BUILD_CXX_FLAGS += -DWANT_AU | BUILD_CXX_FLAGS += -DWANT_AU | ||||
endif | endif | ||||
@@ -79,12 +79,6 @@ ifeq ($(HAVE_DGL),true) | |||||
NATIVE_LINK_FLAGS += $(DGL_LIBS) | NATIVE_LINK_FLAGS += $(DGL_LIBS) | ||||
endif | endif | ||||
# ifeq ($(HAVE_CSOUND),true) | |||||
# NATIVE_BUILD_FLAGS += -DWANT_CSOUND | |||||
# NATIVE_BUILD_FLAGS += $(CSOUND_FLAGS) | |||||
# NATIVE_LINK_FLAGS += $(CSOUND_LIBS) | |||||
# endif | |||||
ifeq ($(HAVE_FLUIDSYNTH),true) | ifeq ($(HAVE_FLUIDSYNTH),true) | ||||
NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH | NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH | ||||
NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | ||||
@@ -417,8 +411,6 @@ OBJS_PLUGIN = \ | |||||
../backend/plugin/VstPlugin__native.o \ | ../backend/plugin/VstPlugin__native.o \ | ||||
../backend/plugin/Vst3Plugin__native.o \ | ../backend/plugin/Vst3Plugin__native.o \ | ||||
../backend/plugin/AuPlugin__native.o \ | ../backend/plugin/AuPlugin__native.o \ | ||||
../backend/plugin/ReWirePlugin__native.o \ | |||||
../backend/plugin/CsoundPlugin__native.o \ | |||||
../backend/plugin/JucePlugin__native.o \ | ../backend/plugin/JucePlugin__native.o \ | ||||
../backend/plugin/FluidSynthPlugin__native.o \ | ../backend/plugin/FluidSynthPlugin__native.o \ | ||||
../backend/plugin/LinuxSamplerPlugin__native.o \ | ../backend/plugin/LinuxSamplerPlugin__native.o \ | ||||
@@ -485,8 +477,6 @@ OBJS_NATIVE += \ | |||||
../backend/plugin/VstPlugin__native.o \ | ../backend/plugin/VstPlugin__native.o \ | ||||
../backend/plugin/Vst3Plugin__native.o \ | ../backend/plugin/Vst3Plugin__native.o \ | ||||
../backend/plugin/AuPlugin__native.o \ | ../backend/plugin/AuPlugin__native.o \ | ||||
../backend/plugin/ReWirePlugin__native.o \ | |||||
../backend/plugin/CsoundPlugin__native.o \ | |||||
../backend/plugin/JucePlugin__native.o \ | ../backend/plugin/JucePlugin__native.o \ | ||||
../backend/plugin/FluidSynthPlugin__native.o \ | ../backend/plugin/FluidSynthPlugin__native.o \ | ||||
../backend/plugin/LinuxSamplerPlugin__native.o | ../backend/plugin/LinuxSamplerPlugin__native.o | ||||
@@ -563,8 +553,6 @@ OBJS_POSIX32 += \ | |||||
../backend/plugin/VstPlugin__posix32.o \ | ../backend/plugin/VstPlugin__posix32.o \ | ||||
../backend/plugin/Vst3Plugin__posix32.o \ | ../backend/plugin/Vst3Plugin__posix32.o \ | ||||
../backend/plugin/AuPlugin__posix32.o \ | ../backend/plugin/AuPlugin__posix32.o \ | ||||
../backend/plugin/ReWirePlugin__posix32.o \ | |||||
../backend/plugin/CsoundPlugin__posix32.o \ | |||||
../backend/plugin/JucePlugin__posix32.o \ | ../backend/plugin/JucePlugin__posix32.o \ | ||||
../backend/plugin/FluidSynthPlugin__posix32.o \ | ../backend/plugin/FluidSynthPlugin__posix32.o \ | ||||
../backend/plugin/LinuxSamplerPlugin__posix32.o | ../backend/plugin/LinuxSamplerPlugin__posix32.o | ||||
@@ -623,8 +611,6 @@ OBJS_POSIX64 += \ | |||||
../backend/plugin/VstPlugin__posix64.o \ | ../backend/plugin/VstPlugin__posix64.o \ | ||||
../backend/plugin/Vst3Plugin__posix64.o \ | ../backend/plugin/Vst3Plugin__posix64.o \ | ||||
../backend/plugin/AuPlugin__posix32.o \ | ../backend/plugin/AuPlugin__posix32.o \ | ||||
../backend/plugin/ReWirePlugin__posix64.o \ | |||||
../backend/plugin/CsoundPlugin__posix64.o \ | |||||
../backend/plugin/JucePlugin__posix64.o \ | ../backend/plugin/JucePlugin__posix64.o \ | ||||
../backend/plugin/FluidSynthPlugin__posix64.o \ | ../backend/plugin/FluidSynthPlugin__posix64.o \ | ||||
../backend/plugin/LinuxSamplerPlugin__posix64.o | ../backend/plugin/LinuxSamplerPlugin__posix64.o | ||||
@@ -683,8 +669,6 @@ OBJS_WIN32 += \ | |||||
../backend/plugin/VstPlugin__win32.o \ | ../backend/plugin/VstPlugin__win32.o \ | ||||
../backend/plugin/Vst3Plugin__win32.o \ | ../backend/plugin/Vst3Plugin__win32.o \ | ||||
../backend/plugin/AuPlugin__win32.o \ | ../backend/plugin/AuPlugin__win32.o \ | ||||
../backend/plugin/ReWirePlugin__win32.o \ | |||||
../backend/plugin/CsoundPlugin__win32.o \ | |||||
../backend/plugin/JucePlugin__win32.o \ | ../backend/plugin/JucePlugin__win32.o \ | ||||
../backend/plugin/FluidSynthPlugin__win32.o \ | ../backend/plugin/FluidSynthPlugin__win32.o \ | ||||
../backend/plugin/LinuxSamplerPlugin__win32.o | ../backend/plugin/LinuxSamplerPlugin__win32.o | ||||
@@ -743,8 +727,6 @@ OBJS_WIN64 += \ | |||||
../backend/plugin/VstPlugin__win64.o \ | ../backend/plugin/VstPlugin__win64.o \ | ||||
../backend/plugin/Vst3Plugin__win64.o \ | ../backend/plugin/Vst3Plugin__win64.o \ | ||||
../backend/plugin/AuPlugin__win64.o \ | ../backend/plugin/AuPlugin__win64.o \ | ||||
../backend/plugin/ReWirePlugin__win64.o \ | |||||
../backend/plugin/CsoundPlugin__win64.o \ | |||||
../backend/plugin/JucePlugin__win64.o \ | ../backend/plugin/JucePlugin__win64.o \ | ||||
../backend/plugin/FluidSynthPlugin__win64.o \ | ../backend/plugin/FluidSynthPlugin__win64.o \ | ||||
../backend/plugin/LinuxSamplerPlugin__win64.o | ../backend/plugin/LinuxSamplerPlugin__win64.o | ||||
@@ -382,24 +382,14 @@ PLUGIN_VST3 = 6 | |||||
# @note MacOS only | # @note MacOS only | ||||
PLUGIN_AU = 7 | PLUGIN_AU = 7 | ||||
# JACK plugin. | |||||
PLUGIN_JACK = 8 | |||||
# GIG file. | |||||
PLUGIN_GIG = 8 | |||||
# ReWire plugin. | |||||
# @note Windows and MacOS only | |||||
PLUGIN_REWIRE = 9 | |||||
# SF2 file (SoundFont). | |||||
PLUGIN_SF2 = 9 | |||||
# Single CSD file (Csound). | |||||
PLUGIN_FILE_CSD = 10 | |||||
# Single GIG file. | |||||
PLUGIN_FILE_GIG = 11 | |||||
# Single SF2 file (SoundFont). | |||||
PLUGIN_FILE_SF2 = 12 | |||||
# Single SFZ file. | |||||
PLUGIN_FILE_SFZ = 13 | |||||
# SFZ file. | |||||
PLUGIN_SFZ = 10 | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
# Plugin Category | # Plugin Category | ||||
@@ -1316,7 +1306,7 @@ class Host(object): | |||||
# Load a file of any type.\n | # Load a file of any type.\n | ||||
# This will try to load a generic file as a plugin, | # This will try to load a generic file as a plugin, | ||||
# either by direct handling (Csound, GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI). | |||||
# either by direct handling (GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI). | |||||
# @param Filename Filename | # @param Filename Filename | ||||
# @see carla_get_supported_file_extensions() | # @see carla_get_supported_file_extensions() | ||||
def load_file(self, filename): | def load_file(self, filename): | ||||
@@ -114,9 +114,7 @@ def findMacVSTBundles(bundlePath, isVST3): | |||||
def findFilenames(filePath, stype): | def findFilenames(filePath, stype): | ||||
filenames = [] | filenames = [] | ||||
if stype == "csd": | |||||
extensions = (".csd",) | |||||
elif stype == "gig": | |||||
if stype == "gig": | |||||
extensions = (".gig",) | extensions = (".gig",) | ||||
elif stype == "sf2": | elif stype == "sf2": | ||||
extensions = (".sf2",) | extensions = (".sf2",) | ||||
@@ -321,17 +319,14 @@ def checkPluginVST3(filename, tool, isWine=False): | |||||
def checkPluginAU(filename, tool): | def checkPluginAU(filename, tool): | ||||
return runCarlaDiscovery(PLUGIN_AU, "AU", filename, tool) | return runCarlaDiscovery(PLUGIN_AU, "AU", filename, tool) | ||||
def checkFileCSD(filename, tool): | |||||
return runCarlaDiscovery(PLUGIN_FILE_CSD, "CSD", filename, tool) | |||||
def checkFileGIG(filename, tool): | def checkFileGIG(filename, tool): | ||||
return runCarlaDiscovery(PLUGIN_FILE_GIG, "GIG", filename, tool) | |||||
return runCarlaDiscovery(PLUGIN_GIG, "GIG", filename, tool) | |||||
def checkFileSF2(filename, tool): | def checkFileSF2(filename, tool): | ||||
return runCarlaDiscovery(PLUGIN_FILE_SF2, "SF2", filename, tool) | |||||
return runCarlaDiscovery(PLUGIN_SF2, "SF2", filename, tool) | |||||
def checkFileSFZ(filename, tool): | def checkFileSFZ(filename, tool): | ||||
return runCarlaDiscovery(PLUGIN_FILE_SFZ, "SFZ", filename, tool) | |||||
return runCarlaDiscovery(PLUGIN_SFZ, "SFZ", filename, tool) | |||||
# ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
# Separate Thread for Plugin Search | # Separate Thread for Plugin Search | ||||
@@ -356,7 +351,6 @@ class SearchPluginsThread(QThread): | |||||
self.fCheckVST = False | self.fCheckVST = False | ||||
self.fCheckVST3 = False | self.fCheckVST3 = False | ||||
self.fCheckAU = False | self.fCheckAU = False | ||||
self.fCheckCSD = False | |||||
self.fCheckGIG = False | self.fCheckGIG = False | ||||
self.fCheckSF2 = False | self.fCheckSF2 = False | ||||
self.fCheckSFZ = False | self.fCheckSFZ = False | ||||
@@ -382,7 +376,6 @@ class SearchPluginsThread(QThread): | |||||
self.fVstPlugins = [] | self.fVstPlugins = [] | ||||
self.fVst3Plugins = [] | self.fVst3Plugins = [] | ||||
self.fAuPlugins = [] | self.fAuPlugins = [] | ||||
self.fCsdFiles = [] | |||||
self.fKitPlugins = [] | self.fKitPlugins = [] | ||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
@@ -397,14 +390,13 @@ class SearchPluginsThread(QThread): | |||||
self.fCheckWin32 = win32 | self.fCheckWin32 = win32 | ||||
self.fCheckWin64 = win64 | self.fCheckWin64 = win64 | ||||
def setSearchPluginTypes(self, ladspa, dssi, lv2, vst, vst3, au, csd, gig, sf2, sfz): | |||||
def setSearchPluginTypes(self, ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz): | |||||
self.fCheckLADSPA = ladspa | self.fCheckLADSPA = ladspa | ||||
self.fCheckDSSI = dssi | self.fCheckDSSI = dssi | ||||
self.fCheckLV2 = lv2 | self.fCheckLV2 = lv2 | ||||
self.fCheckVST = vst | self.fCheckVST = vst | ||||
self.fCheckVST3 = vst3 | self.fCheckVST3 = vst3 | ||||
self.fCheckAU = au and MACOS | self.fCheckAU = au and MACOS | ||||
self.fCheckCSD = csd | |||||
self.fCheckGIG = gig | self.fCheckGIG = gig | ||||
self.fCheckSF2 = sf2 | self.fCheckSF2 = sf2 | ||||
self.fCheckSFZ = sfz | self.fCheckSFZ = sfz | ||||
@@ -449,12 +441,10 @@ class SearchPluginsThread(QThread): | |||||
self.fCurCount -= 1 | self.fCurCount -= 1 | ||||
if self.fCheckNative and self.fToolNative: | if self.fCheckNative and self.fToolNative: | ||||
if self.fCheckCSD: self.fCurCount += 1 | |||||
if self.fCheckGIG: self.fCurCount += 1 | if self.fCheckGIG: self.fCurCount += 1 | ||||
if self.fCheckSF2: self.fCurCount += 1 | if self.fCheckSF2: self.fCurCount += 1 | ||||
if self.fCheckSFZ: self.fCurCount += 1 | if self.fCheckSFZ: self.fCurCount += 1 | ||||
else: | else: | ||||
self.fCheckCSD = False | |||||
self.fCheckGIG = False | self.fCheckGIG = False | ||||
self.fCheckSF2 = False | self.fCheckSF2 = False | ||||
self.fCheckSFZ = False | self.fCheckSFZ = False | ||||
@@ -690,12 +680,6 @@ class SearchPluginsThread(QThread): | |||||
if not self.fContinueChecking: return | if not self.fContinueChecking: return | ||||
if self.fCheckCSD: | |||||
self._checkCSD() | |||||
settingsDB.setValue("Plugins/CSD", self.fCsdFiles) | |||||
if not self.fContinueChecking: return | |||||
if self.fCheckGIG: | if self.fCheckGIG: | ||||
settings = QSettings() | settings = QSettings() | ||||
GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, gCarla.DEFAULT_GIG_PATH)) | GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, gCarla.DEFAULT_GIG_PATH)) | ||||
@@ -937,37 +921,6 @@ class SearchPluginsThread(QThread): | |||||
self.fLastCheckValue += self.fCurPercentValue | self.fLastCheckValue += self.fCurPercentValue | ||||
def _checkCSD(self): | |||||
csdFiles = [] | |||||
self.fCsdFiles = [] | |||||
settings = QSettings() | |||||
CSOUND_PATH = toList(settings.value(CARLA_KEY_PATHS_CSD, gCarla.DEFAULT_CSOUND_PATH)) | |||||
for iPATH in CSOUND_PATH: | |||||
files = findFilenames(iPATH, "csd") | |||||
for file_ in files: | |||||
if file_ not in csdFiles: | |||||
csdFiles.append(file_) | |||||
csdFiles.sort() | |||||
if not self.fContinueChecking: return | |||||
for i in range(len(csdFiles)): | |||||
csd = csdFiles[i] | |||||
percent = ( float(i) / len(csdFiles) ) * self.fCurPercentValue | |||||
self._pluginLook(self.fLastCheckValue + percent, csd) | |||||
plugins = checkFileCSD(csd, self.fToolNative) | |||||
if plugins: | |||||
self.fCsdFiles.append(plugins) | |||||
self.fSomethingChanged = True | |||||
if not self.fContinueChecking: break | |||||
self.fLastCheckValue += self.fCurPercentValue | |||||
def _checkKIT(self, kitPATH, kitExtension): | def _checkKIT(self, kitPATH, kitExtension): | ||||
kitFiles = [] | kitFiles = [] | ||||
self.fKitPlugins = [] | self.fKitPlugins = [] | ||||
@@ -1118,8 +1071,6 @@ class PluginRefreshW(QDialog): | |||||
self.ui.ico_native.setPixmap(self.fIconNo) | self.ui.ico_native.setPixmap(self.fIconNo) | ||||
self.ui.ch_native.setChecked(False) | self.ui.ch_native.setChecked(False) | ||||
self.ui.ch_native.setEnabled(False) | self.ui.ch_native.setEnabled(False) | ||||
self.ui.ch_csound.setChecked(False) | |||||
self.ui.ch_csound.setEnabled(False) | |||||
self.ui.ch_gig.setChecked(False) | self.ui.ch_gig.setChecked(False) | ||||
self.ui.ch_gig.setEnabled(False) | self.ui.ch_gig.setEnabled(False) | ||||
self.ui.ch_sf2.setChecked(False) | self.ui.ch_sf2.setChecked(False) | ||||
@@ -1145,11 +1096,6 @@ class PluginRefreshW(QDialog): | |||||
self.ui.ch_au.setEnabled(False) | self.ui.ch_au.setEnabled(False) | ||||
self.ui.ch_au.setVisible(False) | self.ui.ch_au.setVisible(False) | ||||
# TODO | |||||
self.ui.ch_csound.setChecked(False) | |||||
self.ui.ch_csound.setEnabled(False) | |||||
self.ui.ch_csound.setVisible(False) | |||||
# ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
# Set-up connections | # Set-up connections | ||||
@@ -1166,7 +1112,6 @@ class PluginRefreshW(QDialog): | |||||
self.ui.ch_vst.clicked.connect(self.slot_checkTools) | self.ui.ch_vst.clicked.connect(self.slot_checkTools) | ||||
self.ui.ch_vst3.clicked.connect(self.slot_checkTools) | self.ui.ch_vst3.clicked.connect(self.slot_checkTools) | ||||
self.ui.ch_au.clicked.connect(self.slot_checkTools) | self.ui.ch_au.clicked.connect(self.slot_checkTools) | ||||
self.ui.ch_csound.clicked.connect(self.slot_checkTools) | |||||
self.ui.ch_gig.clicked.connect(self.slot_checkTools) | self.ui.ch_gig.clicked.connect(self.slot_checkTools) | ||||
self.ui.ch_sf2.clicked.connect(self.slot_checkTools) | self.ui.ch_sf2.clicked.connect(self.slot_checkTools) | ||||
self.ui.ch_sfz.clicked.connect(self.slot_checkTools) | self.ui.ch_sfz.clicked.connect(self.slot_checkTools) | ||||
@@ -1196,14 +1141,13 @@ class PluginRefreshW(QDialog): | |||||
self.ui.ch_posix32.isChecked(), self.ui.ch_posix64.isChecked(), | self.ui.ch_posix32.isChecked(), self.ui.ch_posix64.isChecked(), | ||||
self.ui.ch_win32.isChecked(), self.ui.ch_win64.isChecked()) | self.ui.ch_win32.isChecked(), self.ui.ch_win64.isChecked()) | ||||
ladspa, dssi, lv2, vst, vst3, au, csound, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(), | |||||
self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(), | |||||
self.ui.ch_vst3.isChecked(), self.ui.ch_au.isChecked(), | |||||
self.ui.ch_csound.isChecked(), self.ui.ch_gig.isChecked(), | |||||
self.ui.ch_sf2.isChecked(), self.ui.ch_sfz.isChecked()) | |||||
ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(), | |||||
self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(), | |||||
self.ui.ch_vst3.isChecked(), self.ui.ch_au.isChecked(), | |||||
self.ui.ch_gig.isChecked(), self.ui.ch_sf2.isChecked(), self.ui.ch_sfz.isChecked()) | |||||
self.fThread.setSearchBinaryTypes(native, posix32, posix64, win32, win64) | self.fThread.setSearchBinaryTypes(native, posix32, posix64, win32, win64) | ||||
self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, vst3, au, csound, gig, sf2, sfz) | |||||
self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz) | |||||
self.fThread.start() | self.fThread.start() | ||||
@pyqtSlot() | @pyqtSlot() | ||||
@@ -1214,7 +1158,7 @@ class PluginRefreshW(QDialog): | |||||
def slot_checkTools(self): | def slot_checkTools(self): | ||||
enabled1 = bool(self.ui.ch_native.isChecked() or self.ui.ch_posix32.isChecked() or self.ui.ch_posix64.isChecked() or self.ui.ch_win32.isChecked() or self.ui.ch_win64.isChecked()) | enabled1 = bool(self.ui.ch_native.isChecked() or self.ui.ch_posix32.isChecked() or self.ui.ch_posix64.isChecked() or self.ui.ch_win32.isChecked() or self.ui.ch_win64.isChecked()) | ||||
enabled2 = bool(self.ui.ch_ladspa.isChecked() or self.ui.ch_dssi.isChecked() or self.ui.ch_lv2.isChecked() or self.ui.ch_vst.isChecked() or self.ui.ch_vst3.isChecked() or | enabled2 = bool(self.ui.ch_ladspa.isChecked() or self.ui.ch_dssi.isChecked() or self.ui.ch_lv2.isChecked() or self.ui.ch_vst.isChecked() or self.ui.ch_vst3.isChecked() or | ||||
self.ui.ch_au.isChecked() or self.ui.ch_csound.isChecked() or self.ui.ch_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked()) | |||||
self.ui.ch_au.isChecked() or self.ui.ch_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked()) | |||||
self.ui.b_start.setEnabled(enabled1 and enabled2) | self.ui.b_start.setEnabled(enabled1 and enabled2) | ||||
@pyqtSlot(int, str) | @pyqtSlot(int, str) | ||||
@@ -1242,7 +1186,6 @@ class PluginRefreshW(QDialog): | |||||
self.ui.ch_vst.setChecked(settings.value("PluginDatabase/SearchVST", True, type=bool)) | self.ui.ch_vst.setChecked(settings.value("PluginDatabase/SearchVST", True, type=bool)) | ||||
self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/SearchVST3", (MACOS or WINDOWS), type=bool)) | self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/SearchVST3", (MACOS or WINDOWS), type=bool)) | ||||
self.ui.ch_au.setChecked(settings.value("PluginDatabase/SearchAU", True, type=bool)) | self.ui.ch_au.setChecked(settings.value("PluginDatabase/SearchAU", True, type=bool)) | ||||
self.ui.ch_csound.setChecked(settings.value("PluginDatabase/SearchCsound", False, type=bool)) | |||||
self.ui.ch_gig.setChecked(settings.value("PluginDatabase/SearchGIG", False, type=bool)) | self.ui.ch_gig.setChecked(settings.value("PluginDatabase/SearchGIG", False, type=bool)) | ||||
self.ui.ch_sf2.setChecked(settings.value("PluginDatabase/SearchSF2", False, type=bool)) | self.ui.ch_sf2.setChecked(settings.value("PluginDatabase/SearchSF2", False, type=bool)) | ||||
self.ui.ch_sfz.setChecked(settings.value("PluginDatabase/SearchSFZ", False, type=bool)) | self.ui.ch_sfz.setChecked(settings.value("PluginDatabase/SearchSFZ", False, type=bool)) | ||||
@@ -1261,7 +1204,6 @@ class PluginRefreshW(QDialog): | |||||
settings.setValue("PluginDatabase/SearchVST", self.ui.ch_vst.isChecked()) | settings.setValue("PluginDatabase/SearchVST", self.ui.ch_vst.isChecked()) | ||||
settings.setValue("PluginDatabase/SearchVST3", self.ui.ch_vst3.isChecked()) | settings.setValue("PluginDatabase/SearchVST3", self.ui.ch_vst3.isChecked()) | ||||
settings.setValue("PluginDatabase/SearchAU", self.ui.ch_au.isChecked()) | settings.setValue("PluginDatabase/SearchAU", self.ui.ch_au.isChecked()) | ||||
settings.setValue("PluginDatabase/SearchCsound", self.ui.ch_csound.isChecked()) | |||||
settings.setValue("PluginDatabase/SearchGIG", self.ui.ch_gig.isChecked()) | settings.setValue("PluginDatabase/SearchGIG", self.ui.ch_gig.isChecked()) | ||||
settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked()) | settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked()) | ||||
settings.setValue("PluginDatabase/SearchSFZ", self.ui.ch_sfz.isChecked()) | settings.setValue("PluginDatabase/SearchSFZ", self.ui.ch_sfz.isChecked()) | ||||
@@ -1348,7 +1290,6 @@ class PluginDatabaseW(QDialog): | |||||
self.ui.ch_vst.clicked.connect(self.slot_checkFilters) | self.ui.ch_vst.clicked.connect(self.slot_checkFilters) | ||||
self.ui.ch_vst3.clicked.connect(self.slot_checkFilters) | self.ui.ch_vst3.clicked.connect(self.slot_checkFilters) | ||||
self.ui.ch_au.clicked.connect(self.slot_checkFilters) | self.ui.ch_au.clicked.connect(self.slot_checkFilters) | ||||
self.ui.ch_csound.clicked.connect(self.slot_checkFilters) | |||||
self.ui.ch_kits.clicked.connect(self.slot_checkFilters) | self.ui.ch_kits.clicked.connect(self.slot_checkFilters) | ||||
self.ui.ch_native.clicked.connect(self.slot_checkFilters) | self.ui.ch_native.clicked.connect(self.slot_checkFilters) | ||||
self.ui.ch_bridged.clicked.connect(self.slot_checkFilters) | self.ui.ch_bridged.clicked.connect(self.slot_checkFilters) | ||||
@@ -1402,7 +1343,6 @@ class PluginDatabaseW(QDialog): | |||||
hideVST = not self.ui.ch_vst.isChecked() | hideVST = not self.ui.ch_vst.isChecked() | ||||
hideVST3 = not self.ui.ch_vst3.isChecked() | hideVST3 = not self.ui.ch_vst3.isChecked() | ||||
hideAU = not self.ui.ch_au.isChecked() | hideAU = not self.ui.ch_au.isChecked() | ||||
hideCsound = not self.ui.ch_csound.isChecked() | |||||
hideKits = not self.ui.ch_kits.isChecked() | hideKits = not self.ui.ch_kits.isChecked() | ||||
hideNative = not self.ui.ch_native.isChecked() | hideNative = not self.ui.ch_native.isChecked() | ||||
@@ -1471,8 +1411,6 @@ class PluginDatabaseW(QDialog): | |||||
self.ui.tableWidget.hideRow(i) | self.ui.tableWidget.hideRow(i) | ||||
elif hideAU and ptype == "AU": | elif hideAU and ptype == "AU": | ||||
self.ui.tableWidget.hideRow(i) | self.ui.tableWidget.hideRow(i) | ||||
elif hideCsound and ptype == "CSD": | |||||
self.ui.tableWidget.hideRow(i) | |||||
elif hideNative and isNative: | elif hideNative and isNative: | ||||
self.ui.tableWidget.hideRow(i) | self.ui.tableWidget.hideRow(i) | ||||
elif hideBridged and isBridged: | elif hideBridged and isBridged: | ||||
@@ -1562,7 +1500,6 @@ class PluginDatabaseW(QDialog): | |||||
vstCount = 0 | vstCount = 0 | ||||
vst3Count = 0 | vst3Count = 0 | ||||
auCount = 0 | auCount = 0 | ||||
csdCount = 0 | |||||
kitCount = 0 | kitCount = 0 | ||||
# --------------------------------------------------------------------------- | # --------------------------------------------------------------------------- | ||||
@@ -1695,18 +1632,6 @@ class PluginDatabaseW(QDialog): | |||||
del auPlugins | del auPlugins | ||||
# --------------------------------------------------------------------------- | |||||
# Csound | |||||
#csds = toList(settingsDB.value("Plugins/CSD", [])) | |||||
#for csd in csds: | |||||
#for csd_i in csd: | |||||
#self._addPluginToTable(csd_i, "CSD") | |||||
#csdCount += 1 | |||||
#del csds | |||||
# --------------------------------------------------------------------------- | # --------------------------------------------------------------------------- | ||||
# Kits | # Kits | ||||
@@ -1752,7 +1677,6 @@ class PluginDatabaseW(QDialog): | |||||
else: | else: | ||||
self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2, %i VST and %i VST3 plugins, plus %i Sound Kits" % ( | self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2, %i VST and %i VST3 plugins, plus %i Sound Kits" % ( | ||||
internalCount, ladspaCount, dssiCount, lv2Count, vstCount, vst3Count, kitCount))) | internalCount, ladspaCount, dssiCount, lv2Count, vstCount, vst3Count, kitCount))) | ||||
# %i Csound modules and | |||||
self._checkFilters() | self._checkFilters() | ||||
@@ -1771,7 +1695,6 @@ class PluginDatabaseW(QDialog): | |||||
self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST", True, type=bool)) | self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST", True, type=bool)) | ||||
self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/ShowVST3", (MACOS or WINDOWS), type=bool)) | self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/ShowVST3", (MACOS or WINDOWS), type=bool)) | ||||
self.ui.ch_au.setChecked(settings.value("PluginDatabase/ShowAU", True, type=bool)) | self.ui.ch_au.setChecked(settings.value("PluginDatabase/ShowAU", True, type=bool)) | ||||
self.ui.ch_csound.setChecked(settings.value("PluginDatabase/ShowCsound", True, type=bool)) | |||||
self.ui.ch_kits.setChecked(settings.value("PluginDatabase/ShowKits", True, type=bool)) | self.ui.ch_kits.setChecked(settings.value("PluginDatabase/ShowKits", True, type=bool)) | ||||
self.ui.ch_native.setChecked(settings.value("PluginDatabase/ShowNative", True, type=bool)) | self.ui.ch_native.setChecked(settings.value("PluginDatabase/ShowNative", True, type=bool)) | ||||
self.ui.ch_bridged.setChecked(settings.value("PluginDatabase/ShowBridged", True, type=bool)) | self.ui.ch_bridged.setChecked(settings.value("PluginDatabase/ShowBridged", True, type=bool)) | ||||
@@ -1799,7 +1722,6 @@ class PluginDatabaseW(QDialog): | |||||
settings.setValue("PluginDatabase/ShowVST", self.ui.ch_vst.isChecked()) | settings.setValue("PluginDatabase/ShowVST", self.ui.ch_vst.isChecked()) | ||||
settings.setValue("PluginDatabase/ShowVST3", self.ui.ch_vst3.isChecked()) | settings.setValue("PluginDatabase/ShowVST3", self.ui.ch_vst3.isChecked()) | ||||
settings.setValue("PluginDatabase/ShowAU", self.ui.ch_au.isChecked()) | settings.setValue("PluginDatabase/ShowAU", self.ui.ch_au.isChecked()) | ||||
settings.setValue("PluginDatabase/ShowCsound", self.ui.ch_csound.isChecked()) | |||||
settings.setValue("PluginDatabase/ShowKits", self.ui.ch_kits.isChecked()) | settings.setValue("PluginDatabase/ShowKits", self.ui.ch_kits.isChecked()) | ||||
settings.setValue("PluginDatabase/ShowNative", self.ui.ch_native.isChecked()) | settings.setValue("PluginDatabase/ShowNative", self.ui.ch_native.isChecked()) | ||||
settings.setValue("PluginDatabase/ShowBridged", self.ui.ch_bridged.isChecked()) | settings.setValue("PluginDatabase/ShowBridged", self.ui.ch_bridged.isChecked()) | ||||
@@ -705,7 +705,6 @@ class HostWindow(QMainWindow): | |||||
LV2_PATH = toList(settings.value("Paths/LV2", gCarla.DEFAULT_LV2_PATH)) | LV2_PATH = toList(settings.value("Paths/LV2", gCarla.DEFAULT_LV2_PATH)) | ||||
VST_PATH = toList(settings.value("Paths/VST", gCarla.DEFAULT_VST_PATH)) | VST_PATH = toList(settings.value("Paths/VST", gCarla.DEFAULT_VST_PATH)) | ||||
AU_PATH = toList(settings.value("Paths/AU", gCarla.DEFAULT_AU_PATH)) | AU_PATH = toList(settings.value("Paths/AU", gCarla.DEFAULT_AU_PATH)) | ||||
CSOUND_PATH = toList(settings.value("Paths/CSOUND", gCarla.DEFAULT_CSOUND_PATH)) | |||||
GIG_PATH = toList(settings.value("Paths/GIG", gCarla.DEFAULT_GIG_PATH)) | GIG_PATH = toList(settings.value("Paths/GIG", gCarla.DEFAULT_GIG_PATH)) | ||||
SF2_PATH = toList(settings.value("Paths/SF2", gCarla.DEFAULT_SF2_PATH)) | SF2_PATH = toList(settings.value("Paths/SF2", gCarla.DEFAULT_SF2_PATH)) | ||||
SFZ_PATH = toList(settings.value("Paths/SFZ", gCarla.DEFAULT_SFZ_PATH)) | SFZ_PATH = toList(settings.value("Paths/SFZ", gCarla.DEFAULT_SFZ_PATH)) | ||||
@@ -715,7 +714,6 @@ class HostWindow(QMainWindow): | |||||
os.environ["LV2_PATH"] = splitter.join(LV2_PATH) | os.environ["LV2_PATH"] = splitter.join(LV2_PATH) | ||||
os.environ["VST_PATH"] = splitter.join(VST_PATH) | os.environ["VST_PATH"] = splitter.join(VST_PATH) | ||||
os.environ["AU_PATH"] = splitter.join(AU_PATH) | os.environ["AU_PATH"] = splitter.join(AU_PATH) | ||||
os.environ["CSOUND_PATH"] = splitter.join(CSOUND_PATH) | |||||
os.environ["GIG_PATH"] = splitter.join(GIG_PATH) | os.environ["GIG_PATH"] = splitter.join(GIG_PATH) | ||||
os.environ["SF2_PATH"] = splitter.join(SF2_PATH) | os.environ["SF2_PATH"] = splitter.join(SF2_PATH) | ||||
os.environ["SFZ_PATH"] = splitter.join(SFZ_PATH) | os.environ["SFZ_PATH"] = splitter.join(SFZ_PATH) | ||||
@@ -237,10 +237,9 @@ class CarlaSettingsW(QDialog): | |||||
PATH_INDEX_VST = 3 | PATH_INDEX_VST = 3 | ||||
PATH_INDEX_VST3 = 4 | PATH_INDEX_VST3 = 4 | ||||
PATH_INDEX_AU = 5 | PATH_INDEX_AU = 5 | ||||
PATH_INDEX_CSOUND = 6 | |||||
PATH_INDEX_GIG = 7 | |||||
PATH_INDEX_SF2 = 8 | |||||
PATH_INDEX_SFZ = 9 | |||||
PATH_INDEX_GIG = 6 | |||||
PATH_INDEX_SF2 = 7 | |||||
PATH_INDEX_SFZ = 8 | |||||
# Single and Multiple client mode is only for JACK, | # Single and Multiple client mode is only for JACK, | ||||
# but we still want to match QComboBox index to defines, | # but we still want to match QComboBox index to defines, | ||||
@@ -312,7 +311,6 @@ class CarlaSettingsW(QDialog): | |||||
self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged) | self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged) | ||||
self.ui.lw_vst3.currentRowChanged.connect(self.slot_pluginPathRowChanged) | self.ui.lw_vst3.currentRowChanged.connect(self.slot_pluginPathRowChanged) | ||||
self.ui.lw_au.currentRowChanged.connect(self.slot_pluginPathRowChanged) | self.ui.lw_au.currentRowChanged.connect(self.slot_pluginPathRowChanged) | ||||
self.ui.lw_csound.currentRowChanged.connect(self.slot_pluginPathRowChanged) | |||||
self.ui.lw_gig.currentRowChanged.connect(self.slot_pluginPathRowChanged) | self.ui.lw_gig.currentRowChanged.connect(self.slot_pluginPathRowChanged) | ||||
self.ui.lw_sf2.currentRowChanged.connect(self.slot_pluginPathRowChanged) | self.ui.lw_sf2.currentRowChanged.connect(self.slot_pluginPathRowChanged) | ||||
self.ui.lw_sfz.currentRowChanged.connect(self.slot_pluginPathRowChanged) | self.ui.lw_sfz.currentRowChanged.connect(self.slot_pluginPathRowChanged) | ||||
@@ -326,7 +324,6 @@ class CarlaSettingsW(QDialog): | |||||
self.ui.lw_vst.setCurrentRow(0) | self.ui.lw_vst.setCurrentRow(0) | ||||
self.ui.lw_vst3.setCurrentRow(0) | self.ui.lw_vst3.setCurrentRow(0) | ||||
self.ui.lw_au.setCurrentRow(0) | self.ui.lw_au.setCurrentRow(0) | ||||
self.ui.lw_csound.setCurrentRow(0) | |||||
self.ui.lw_gig.setCurrentRow(0) | self.ui.lw_gig.setCurrentRow(0) | ||||
self.ui.lw_sf2.setCurrentRow(0) | self.ui.lw_sf2.setCurrentRow(0) | ||||
self.ui.lw_sfz.setCurrentRow(0) | self.ui.lw_sfz.setCurrentRow(0) | ||||
@@ -394,7 +391,6 @@ class CarlaSettingsW(QDialog): | |||||
vsts = toList(settings.value(CARLA_KEY_PATHS_VST, gCarla.DEFAULT_VST_PATH)) | vsts = toList(settings.value(CARLA_KEY_PATHS_VST, gCarla.DEFAULT_VST_PATH)) | ||||
vst3s = toList(settings.value(CARLA_KEY_PATHS_VST3, gCarla.DEFAULT_VST3_PATH)) | vst3s = toList(settings.value(CARLA_KEY_PATHS_VST3, gCarla.DEFAULT_VST3_PATH)) | ||||
aus = toList(settings.value(CARLA_KEY_PATHS_AU, gCarla.DEFAULT_AU_PATH)) | aus = toList(settings.value(CARLA_KEY_PATHS_AU, gCarla.DEFAULT_AU_PATH)) | ||||
csds = toList(settings.value(CARLA_KEY_PATHS_CSD, gCarla.DEFAULT_CSOUND_PATH)) | |||||
gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, gCarla.DEFAULT_GIG_PATH)) | gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, gCarla.DEFAULT_GIG_PATH)) | ||||
sf2s = toList(settings.value(CARLA_KEY_PATHS_SF2, gCarla.DEFAULT_SF2_PATH)) | sf2s = toList(settings.value(CARLA_KEY_PATHS_SF2, gCarla.DEFAULT_SF2_PATH)) | ||||
sfzs = toList(settings.value(CARLA_KEY_PATHS_SFZ, gCarla.DEFAULT_SFZ_PATH)) | sfzs = toList(settings.value(CARLA_KEY_PATHS_SFZ, gCarla.DEFAULT_SFZ_PATH)) | ||||
@@ -405,7 +401,6 @@ class CarlaSettingsW(QDialog): | |||||
vsts.sort() | vsts.sort() | ||||
vst3s.sort() | vst3s.sort() | ||||
aus.sort() | aus.sort() | ||||
csds.sort() | |||||
gigs.sort() | gigs.sort() | ||||
sf2s.sort() | sf2s.sort() | ||||
sfzs.sort() | sfzs.sort() | ||||
@@ -434,10 +429,6 @@ class CarlaSettingsW(QDialog): | |||||
if not au: continue | if not au: continue | ||||
self.ui.lw_au.addItem(au) | self.ui.lw_au.addItem(au) | ||||
for csd in csds: | |||||
if not csd: continue | |||||
self.ui.lw_csound.addItem(csd) | |||||
for gig in gigs: | for gig in gigs: | ||||
if not gig: continue | if not gig: continue | ||||
self.ui.lw_gig.addItem(gig) | self.ui.lw_gig.addItem(gig) | ||||
@@ -499,7 +490,6 @@ class CarlaSettingsW(QDialog): | |||||
vsts = [] | vsts = [] | ||||
vst3s = [] | vst3s = [] | ||||
aus = [] | aus = [] | ||||
csds = [] | |||||
gigs = [] | gigs = [] | ||||
sf2s = [] | sf2s = [] | ||||
sfzs = [] | sfzs = [] | ||||
@@ -522,9 +512,6 @@ class CarlaSettingsW(QDialog): | |||||
for i in range(self.ui.lw_au.count()): | for i in range(self.ui.lw_au.count()): | ||||
aus.append(self.ui.lw_au.item(i).text()) | aus.append(self.ui.lw_au.item(i).text()) | ||||
for i in range(self.ui.lw_csound.count()): | |||||
csds.append(self.ui.lw_csound.item(i).text()) | |||||
for i in range(self.ui.lw_gig.count()): | for i in range(self.ui.lw_gig.count()): | ||||
gigs.append(self.ui.lw_gig.item(i).text()) | gigs.append(self.ui.lw_gig.item(i).text()) | ||||
@@ -540,7 +527,6 @@ class CarlaSettingsW(QDialog): | |||||
settings.setValue(CARLA_KEY_PATHS_VST, vsts) | settings.setValue(CARLA_KEY_PATHS_VST, vsts) | ||||
settings.setValue(CARLA_KEY_PATHS_VST3, vst3s) | settings.setValue(CARLA_KEY_PATHS_VST3, vst3s) | ||||
settings.setValue(CARLA_KEY_PATHS_AU, aus) | settings.setValue(CARLA_KEY_PATHS_AU, aus) | ||||
settings.setValue(CARLA_KEY_PATHS_CSD, csds) | |||||
settings.setValue(CARLA_KEY_PATHS_GIG, gigs) | settings.setValue(CARLA_KEY_PATHS_GIG, gigs) | ||||
settings.setValue(CARLA_KEY_PATHS_SF2, sf2s) | settings.setValue(CARLA_KEY_PATHS_SF2, sf2s) | ||||
settings.setValue(CARLA_KEY_PATHS_SFZ, sfzs) | settings.setValue(CARLA_KEY_PATHS_SFZ, sfzs) | ||||
@@ -636,15 +622,6 @@ class CarlaSettingsW(QDialog): | |||||
if not path: continue | if not path: continue | ||||
self.ui.lw_au.addItem(path) | self.ui.lw_au.addItem(path) | ||||
elif curIndex == self.PATH_INDEX_CSOUND: | |||||
paths = DEFAULT_CSOUND_PATH.split(splitter) | |||||
paths.sort() | |||||
self.ui.lw_csound.clear() | |||||
for path in paths: | |||||
if not path: continue | |||||
self.ui.lw_csound.addItem(path) | |||||
elif curIndex == self.PATH_INDEX_GIG: | elif curIndex == self.PATH_INDEX_GIG: | ||||
paths = DEFAULT_GIG_PATH.split(splitter) | paths = DEFAULT_GIG_PATH.split(splitter) | ||||
paths.sort() | paths.sort() | ||||
@@ -712,8 +689,6 @@ class CarlaSettingsW(QDialog): | |||||
self.ui.lw_vst3.addItem(newPath) | self.ui.lw_vst3.addItem(newPath) | ||||
elif curIndex == self.PATH_INDEX_AU: | elif curIndex == self.PATH_INDEX_AU: | ||||
self.ui.lw_au.addItem(newPath) | self.ui.lw_au.addItem(newPath) | ||||
elif curIndex == self.PATH_INDEX_CSOUND: | |||||
self.ui.lw_csound.addItem(newPath) | |||||
elif curIndex == self.PATH_INDEX_GIG: | elif curIndex == self.PATH_INDEX_GIG: | ||||
self.ui.lw_gig.addItem(newPath) | self.ui.lw_gig.addItem(newPath) | ||||
elif curIndex == self.PATH_INDEX_SF2: | elif curIndex == self.PATH_INDEX_SF2: | ||||
@@ -737,8 +712,6 @@ class CarlaSettingsW(QDialog): | |||||
self.ui.lw_vst3.takeItem(self.ui.lw_vst3.currentRow()) | self.ui.lw_vst3.takeItem(self.ui.lw_vst3.currentRow()) | ||||
elif curIndex == self.PATH_INDEX_AU: | elif curIndex == self.PATH_INDEX_AU: | ||||
self.ui.lw_au.takeItem(self.ui.lw_au.currentRow()) | self.ui.lw_au.takeItem(self.ui.lw_au.currentRow()) | ||||
elif curIndex == self.PATH_INDEX_CSOUND: | |||||
self.ui.lw_csound.takeItem(self.ui.lw_csound.currentRow()) | |||||
elif curIndex == self.PATH_INDEX_GIG: | elif curIndex == self.PATH_INDEX_GIG: | ||||
self.ui.lw_gig.takeItem(self.ui.lw_gig.currentRow()) | self.ui.lw_gig.takeItem(self.ui.lw_gig.currentRow()) | ||||
elif curIndex == self.PATH_INDEX_SF2: | elif curIndex == self.PATH_INDEX_SF2: | ||||
@@ -762,8 +735,6 @@ class CarlaSettingsW(QDialog): | |||||
currentPath = self.ui.lw_vst3.currentItem().text() | currentPath = self.ui.lw_vst3.currentItem().text() | ||||
elif curIndex == self.PATH_INDEX_AU: | elif curIndex == self.PATH_INDEX_AU: | ||||
currentPath = self.ui.lw_au.currentItem().text() | currentPath = self.ui.lw_au.currentItem().text() | ||||
elif curIndex == self.PATH_INDEX_CSOUND: | |||||
currentPath = self.ui.lw_csound.currentItem().text() | |||||
elif curIndex == self.PATH_INDEX_GIG: | elif curIndex == self.PATH_INDEX_GIG: | ||||
currentPath = self.ui.lw_gig.currentItem().text() | currentPath = self.ui.lw_gig.currentItem().text() | ||||
elif curIndex == self.PATH_INDEX_SF2: | elif curIndex == self.PATH_INDEX_SF2: | ||||
@@ -790,8 +761,6 @@ class CarlaSettingsW(QDialog): | |||||
self.ui.lw_vst3.currentItem().setText(newPath) | self.ui.lw_vst3.currentItem().setText(newPath) | ||||
elif curIndex == self.PATH_INDEX_AU: | elif curIndex == self.PATH_INDEX_AU: | ||||
self.ui.lw_au.currentItem().setText(newPath) | self.ui.lw_au.currentItem().setText(newPath) | ||||
elif curIndex == self.PATH_INDEX_CSOUND: | |||||
self.ui.lw_csound.currentItem().setText(newPath) | |||||
elif curIndex == self.PATH_INDEX_GIG: | elif curIndex == self.PATH_INDEX_GIG: | ||||
self.ui.lw_gig.currentItem().setText(newPath) | self.ui.lw_gig.currentItem().setText(newPath) | ||||
elif curIndex == self.PATH_INDEX_SF2: | elif curIndex == self.PATH_INDEX_SF2: | ||||
@@ -816,8 +785,6 @@ class CarlaSettingsW(QDialog): | |||||
row = self.ui.lw_vst3.currentRow() | row = self.ui.lw_vst3.currentRow() | ||||
elif index == self.PATH_INDEX_AU: | elif index == self.PATH_INDEX_AU: | ||||
row = self.ui.lw_au.currentRow() | row = self.ui.lw_au.currentRow() | ||||
elif index == self.PATH_INDEX_CSOUND: | |||||
row = self.ui.lw_csound.currentRow() | |||||
elif index == self.PATH_INDEX_GIG: | elif index == self.PATH_INDEX_GIG: | ||||
row = self.ui.lw_gig.currentRow() | row = self.ui.lw_gig.currentRow() | ||||
elif index == self.PATH_INDEX_SF2: | elif index == self.PATH_INDEX_SF2: | ||||
@@ -217,7 +217,6 @@ CARLA_KEY_PATHS_LV2 = "Paths/LV2" | |||||
CARLA_KEY_PATHS_VST = "Paths/VST" | CARLA_KEY_PATHS_VST = "Paths/VST" | ||||
CARLA_KEY_PATHS_VST3 = "Paths/VST3" | CARLA_KEY_PATHS_VST3 = "Paths/VST3" | ||||
CARLA_KEY_PATHS_AU = "Paths/AU" | CARLA_KEY_PATHS_AU = "Paths/AU" | ||||
CARLA_KEY_PATHS_CSD = "Paths/CSD" | |||||
CARLA_KEY_PATHS_GIG = "Paths/GIG" | CARLA_KEY_PATHS_GIG = "Paths/GIG" | ||||
CARLA_KEY_PATHS_SF2 = "Paths/SF2" | CARLA_KEY_PATHS_SF2 = "Paths/SF2" | ||||
CARLA_KEY_PATHS_SFZ = "Paths/SFZ" | CARLA_KEY_PATHS_SFZ = "Paths/SFZ" | ||||
@@ -260,7 +259,6 @@ class CarlaObject(object): | |||||
'DEFAULT_VST_PATH', | 'DEFAULT_VST_PATH', | ||||
'DEFAULT_VST3_PATH', | 'DEFAULT_VST3_PATH', | ||||
'DEFAULT_AU_PATH', | 'DEFAULT_AU_PATH', | ||||
'DEFAULT_CSOUND_PATH', | |||||
'DEFAULT_GIG_PATH', | 'DEFAULT_GIG_PATH', | ||||
'DEFAULT_SF2_PATH', | 'DEFAULT_SF2_PATH', | ||||
'DEFAULT_SFZ_PATH' | 'DEFAULT_SFZ_PATH' | ||||
@@ -290,7 +288,6 @@ DEFAULT_LV2_PATH = "" | |||||
DEFAULT_VST_PATH = "" | DEFAULT_VST_PATH = "" | ||||
DEFAULT_VST3_PATH = "" | DEFAULT_VST3_PATH = "" | ||||
DEFAULT_AU_PATH = "" | DEFAULT_AU_PATH = "" | ||||
DEFAULT_CSOUND_PATH = "" | |||||
DEFAULT_GIG_PATH = "" | DEFAULT_GIG_PATH = "" | ||||
DEFAULT_SF2_PATH = "" | DEFAULT_SF2_PATH = "" | ||||
DEFAULT_SFZ_PATH = "" | DEFAULT_SFZ_PATH = "" | ||||
@@ -456,7 +453,6 @@ if readEnvVars: | |||||
gCarla.DEFAULT_VST_PATH = os.getenv("VST_PATH", DEFAULT_VST_PATH).split(splitter) | gCarla.DEFAULT_VST_PATH = os.getenv("VST_PATH", DEFAULT_VST_PATH).split(splitter) | ||||
gCarla.DEFAULT_VST3_PATH = os.getenv("VST3_PATH", DEFAULT_VST3_PATH).split(splitter) | gCarla.DEFAULT_VST3_PATH = os.getenv("VST3_PATH", DEFAULT_VST3_PATH).split(splitter) | ||||
gCarla.DEFAULT_AU_PATH = os.getenv("AU_PATH", DEFAULT_AU_PATH).split(splitter) | gCarla.DEFAULT_AU_PATH = os.getenv("AU_PATH", DEFAULT_AU_PATH).split(splitter) | ||||
gCarla.DEFAULT_CSOUND_PATH = os.getenv("CSOUND_PATH", DEFAULT_CSOUND_PATH).split(splitter) | |||||
gCarla.DEFAULT_GIG_PATH = os.getenv("GIG_PATH", DEFAULT_GIG_PATH).split(splitter) | gCarla.DEFAULT_GIG_PATH = os.getenv("GIG_PATH", DEFAULT_GIG_PATH).split(splitter) | ||||
gCarla.DEFAULT_SF2_PATH = os.getenv("SF2_PATH", DEFAULT_SF2_PATH).split(splitter) | gCarla.DEFAULT_SF2_PATH = os.getenv("SF2_PATH", DEFAULT_SF2_PATH).split(splitter) | ||||
gCarla.DEFAULT_SFZ_PATH = os.getenv("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter) | gCarla.DEFAULT_SFZ_PATH = os.getenv("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter) | ||||
@@ -468,7 +464,6 @@ else: | |||||
gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter) | gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter) | ||||
gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter) | gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter) | ||||
gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter) | gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter) | ||||
gCarla.DEFAULT_CSOUND_PATH = DEFAULT_CSOUND_PATH.split(splitter) | |||||
gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter) | gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter) | ||||
gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter) | gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter) | ||||
gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter) | gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter) | ||||
@@ -662,17 +657,11 @@ def getPluginTypeAsString(ptype): | |||||
return "VST3" | return "VST3" | ||||
if ptype == PLUGIN_AU: | if ptype == PLUGIN_AU: | ||||
return "AU" | return "AU" | ||||
if ptype == PLUGIN_JACK: | |||||
return "JACK" | |||||
if ptype == PLUGIN_REWIRE: | |||||
return "ReWire" | |||||
if ptype == PLUGIN_FILE_CSD: | |||||
return "CSD" | |||||
if ptype == PLUGIN_FILE_GIG: | |||||
if ptype == PLUGIN_GIG: | |||||
return "GIG" | return "GIG" | ||||
if ptype == PLUGIN_FILE_SF2: | |||||
if ptype == PLUGIN_SF2: | |||||
return "SF2" | return "SF2" | ||||
if ptype == PLUGIN_FILE_SFZ: | |||||
if ptype == PLUGIN_SFZ: | |||||
return "SFZ" | return "SFZ" | ||||
return "Unknown" | return "Unknown" | ||||
@@ -37,10 +37,6 @@ endif | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
ifeq ($(HAVE_CSOUND),true) | |||||
NATIVE_FLAGS += -DWANT_CSOUND $(CSOUND_FLAGS) $(CSOUND_LIBS) | |||||
endif | |||||
ifeq ($(HAVE_FLUIDSYNTH),true) | ifeq ($(HAVE_FLUIDSYNTH),true) | ||||
NATIVE_FLAGS += -DWANT_FLUIDSYNTH $(FLUIDSYNTH_FLAGS) $(FLUIDSYNTH_LIBS) | NATIVE_FLAGS += -DWANT_FLUIDSYNTH $(FLUIDSYNTH_FLAGS) $(FLUIDSYNTH_LIBS) | ||||
endif | endif | ||||
@@ -25,9 +25,6 @@ | |||||
# define WANT_JUCE_PROCESSORS | # define WANT_JUCE_PROCESSORS | ||||
# include "juce_audio_processors.h" | # include "juce_audio_processors.h" | ||||
# endif | # endif | ||||
#else | |||||
// our csound code needs juce | |||||
# undef WANT_CSOUND | |||||
#endif | #endif | ||||
#ifdef WANT_LADSPA | #ifdef WANT_LADSPA | ||||
@@ -42,9 +39,6 @@ | |||||
#ifdef WANT_VST | #ifdef WANT_VST | ||||
# include "CarlaVstUtils.hpp" | # include "CarlaVstUtils.hpp" | ||||
#endif | #endif | ||||
#ifdef WANT_CSOUND | |||||
# include <csound/csound.hpp> | |||||
#endif | |||||
#ifdef WANT_FLUIDSYNTH | #ifdef WANT_FLUIDSYNTH | ||||
# include <fluidsynth.h> | # include <fluidsynth.h> | ||||
#endif | #endif | ||||
@@ -275,23 +269,6 @@ static intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t | |||||
} | } | ||||
#endif | #endif | ||||
#ifdef WANT_CSOUND | |||||
// -------------------------------------------------------------------------- | |||||
// Csound stuff | |||||
static int csound_midiInOpen(CSOUND*, void**, const char*) { return 0; } | |||||
static int csound_midiRead(CSOUND*, void*, unsigned char*, int) { return 0; } | |||||
static int csound_midiInClose(CSOUND*, void*) { return 0; } | |||||
static int csound_midiOutOpen(CSOUND*, void**, const char*) { return 0; } | |||||
static int csound_midiWrite(CSOUND*, void*, const unsigned char*, int) { return 0; } | |||||
static int csound_midiOutClose(CSOUND*, void*) { return 0; } | |||||
# ifndef DEBUG | |||||
static void csound_silence(CSOUND*, int, const char*, va_list) {} | |||||
# endif | |||||
#endif | |||||
#ifdef WANT_LINUXSAMPLER | #ifdef WANT_LINUXSAMPLER | ||||
// -------------------------------------------------------------------------- | // -------------------------------------------------------------------------- | ||||
// LinuxSampler stuff | // LinuxSampler stuff | ||||
@@ -1539,107 +1516,6 @@ static void do_juce_check(const char* const filename, const char* const stype, c | |||||
} | } | ||||
#endif | #endif | ||||
static void do_csound_check(const char* const filename, const bool init) | |||||
{ | |||||
#ifdef WANT_CSOUND | |||||
Csound csound; | |||||
# ifndef DEBUG | |||||
csound.SetMessageCallback(csound_silence); | |||||
# endif | |||||
csound.SetHostImplementedAudioIO(true, kBufferSize); | |||||
csound.SetHostImplementedMIDIIO(true); | |||||
csound.Reset(); | |||||
csound.SetExternalMidiInOpenCallback(csound_midiInOpen); | |||||
csound.SetExternalMidiReadCallback(csound_midiRead); | |||||
csound.SetExternalMidiInCloseCallback(csound_midiInClose); | |||||
csound.SetExternalMidiOutOpenCallback(csound_midiOutOpen); | |||||
csound.SetExternalMidiWriteCallback(csound_midiWrite); | |||||
csound.SetExternalMidiOutCloseCallback(csound_midiOutClose); | |||||
if (csound.Compile(const_cast<char*>(filename)) != 0) | |||||
{ | |||||
DISCOVERY_OUT("error", "csound failed to compile"); | |||||
return; | |||||
} | |||||
csound.PerformKsmps(); | |||||
csound.SetScoreOffsetSeconds(0); | |||||
csound.RewindScore(); | |||||
int hints = 0x0; | |||||
int audioIns = 0; | |||||
int audioOuts = 0; | |||||
int midiIns = 0; | |||||
int midiOuts = 0; | |||||
int parametersIns = 0; | |||||
int parametersOuts = 0; | |||||
int programs = 0; | |||||
int numChannels; | |||||
controlChannelInfo_t* channelList; | |||||
numChannels = csound.ListChannels(channelList); | |||||
carla_stderr2("Num chan %i", numChannels); | |||||
if (numChannels != 0 && channelList != nullptr) | |||||
{ | |||||
for (int i=0; i < numChannels; ++i) | |||||
{ | |||||
const controlChannelInfo_t& channel(channelList[i]); | |||||
carla_stderr2("chan @%i, type %i", i, channel.type); | |||||
if (channel.type & CSOUND_AUDIO_CHANNEL) | |||||
{ | |||||
if (channel.type & CSOUND_INPUT_CHANNEL) | |||||
audioIns += 1; | |||||
else if (channel.type & CSOUND_OUTPUT_CHANNEL) | |||||
audioOuts += 1; | |||||
} | |||||
else if (channel.type & CSOUND_CONTROL_CHANNEL) | |||||
{ | |||||
if (channel.type & CSOUND_INPUT_CHANNEL) | |||||
parametersIns += 1; | |||||
else if (channel.type & CSOUND_OUTPUT_CHANNEL) | |||||
parametersOuts += 1; | |||||
} | |||||
} | |||||
csound.DeleteChannelList(channelList); | |||||
} | |||||
// TODO | |||||
csound.Cleanup(); | |||||
csound.Reset(); | |||||
DISCOVERY_OUT("init", "-----------"); | |||||
DISCOVERY_OUT("build", BINARY_NATIVE); | |||||
DISCOVERY_OUT("hints", hints); | |||||
//DISCOVERY_OUT("name", name.buffer()); | |||||
//DISCOVERY_OUT("label", label.buffer()); | |||||
//DISCOVERY_OUT("maker", ""); | |||||
DISCOVERY_OUT("audio.ins", audioIns); | |||||
DISCOVERY_OUT("audio.outs", audioOuts); | |||||
DISCOVERY_OUT("midi.ins", midiIns); | |||||
DISCOVERY_OUT("midi.outs", midiOuts); | |||||
DISCOVERY_OUT("parameters.ins", parametersIns); | |||||
DISCOVERY_OUT("parameters.outs", parametersOuts); | |||||
DISCOVERY_OUT("end", "------------"); | |||||
#else | |||||
DISCOVERY_OUT("error", "csound support not available"); | |||||
return; | |||||
// unused | |||||
(void)filename; | |||||
(void)init; | |||||
#endif | |||||
} | |||||
static void do_fluidsynth_check(const char* const filename, const bool init) | static void do_fluidsynth_check(const char* const filename, const bool init) | ||||
{ | { | ||||
#ifdef WANT_FLUIDSYNTH | #ifdef WANT_FLUIDSYNTH | ||||
@@ -1896,16 +1772,13 @@ int main(int argc, char* argv[]) | |||||
DISCOVERY_OUT("error", "AU support not available"); | DISCOVERY_OUT("error", "AU support not available"); | ||||
#endif | #endif | ||||
break; | break; | ||||
case PLUGIN_FILE_CSD: | |||||
do_csound_check(filename, doInit); | |||||
break; | |||||
case PLUGIN_FILE_GIG: | |||||
case PLUGIN_GIG: | |||||
do_linuxsampler_check(filename, "gig", doInit); | do_linuxsampler_check(filename, "gig", doInit); | ||||
break; | break; | ||||
case PLUGIN_FILE_SF2: | |||||
case PLUGIN_SF2: | |||||
do_fluidsynth_check(filename, doInit); | do_fluidsynth_check(filename, doInit); | ||||
break; | break; | ||||
case PLUGIN_FILE_SFZ: | |||||
case PLUGIN_SFZ: | |||||
do_linuxsampler_check(filename, "sfz", doInit); | do_linuxsampler_check(filename, "sfz", doInit); | ||||
break; | break; | ||||
default: | default: | ||||
@@ -223,7 +223,7 @@ void init() | |||||
QString splitter; | QString splitter; | ||||
QString DEFAULT_LADSPA_PATH, DEFAULT_DSSI_PATH, DEFAULT_LV2_PATH, DEFAULT_VST_PATH, DEFAULT_VST3_PATH, DEFAULT_AU_PATH; | QString DEFAULT_LADSPA_PATH, DEFAULT_DSSI_PATH, DEFAULT_LV2_PATH, DEFAULT_VST_PATH, DEFAULT_VST3_PATH, DEFAULT_AU_PATH; | ||||
QString DEFAULT_CSOUND_PATH, DEFAULT_GIG_PATH, DEFAULT_SF2_PATH, DEFAULT_SFZ_PATH; | |||||
QString DEFAULT_GIG_PATH, DEFAULT_SF2_PATH, DEFAULT_SFZ_PATH; | |||||
#if defined(CARLA_OS_WIN) | #if defined(CARLA_OS_WIN) | ||||
splitter = ";"; | splitter = ";"; | ||||
@@ -399,7 +399,6 @@ void init() | |||||
gCarla.DEFAULT_VST_PATH = getenvWithFallback("VST_PATH", DEFAULT_VST_PATH).split(splitter); | gCarla.DEFAULT_VST_PATH = getenvWithFallback("VST_PATH", DEFAULT_VST_PATH).split(splitter); | ||||
gCarla.DEFAULT_VST3_PATH = getenvWithFallback("VST3_PATH", DEFAULT_VST3_PATH).split(splitter); | gCarla.DEFAULT_VST3_PATH = getenvWithFallback("VST3_PATH", DEFAULT_VST3_PATH).split(splitter); | ||||
gCarla.DEFAULT_AU_PATH = getenvWithFallback("AU_PATH", DEFAULT_AU_PATH).split(splitter); | gCarla.DEFAULT_AU_PATH = getenvWithFallback("AU_PATH", DEFAULT_AU_PATH).split(splitter); | ||||
gCarla.DEFAULT_CSOUND_PATH = getenvWithFallback("CSOUND_PATH", DEFAULT_CSOUND_PATH).split(splitter); | |||||
gCarla.DEFAULT_GIG_PATH = getenvWithFallback("GIG_PATH", DEFAULT_GIG_PATH).split(splitter); | gCarla.DEFAULT_GIG_PATH = getenvWithFallback("GIG_PATH", DEFAULT_GIG_PATH).split(splitter); | ||||
gCarla.DEFAULT_SF2_PATH = getenvWithFallback("SF2_PATH", DEFAULT_SF2_PATH).split(splitter); | gCarla.DEFAULT_SF2_PATH = getenvWithFallback("SF2_PATH", DEFAULT_SF2_PATH).split(splitter); | ||||
gCarla.DEFAULT_SFZ_PATH = getenvWithFallback("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter); | gCarla.DEFAULT_SFZ_PATH = getenvWithFallback("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter); | ||||
@@ -412,7 +411,6 @@ void init() | |||||
gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter); | gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter); | ||||
gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter); | gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter); | ||||
gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter); | gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter); | ||||
gCarla.DEFAULT_CSOUND_PATH = DEFAULT_CSOUND_PATH.split(splitter); | |||||
gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter); | gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter); | ||||
gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter); | gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter); | ||||
gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter); | gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter); | ||||
@@ -91,7 +91,6 @@ extern QStringList MIDI_CC_LIST; | |||||
#define CARLA_KEY_PATHS_VST "Paths/VST" | #define CARLA_KEY_PATHS_VST "Paths/VST" | ||||
#define CARLA_KEY_PATHS_VST3 "Paths/VST3" | #define CARLA_KEY_PATHS_VST3 "Paths/VST3" | ||||
#define CARLA_KEY_PATHS_AU "Paths/AU" | #define CARLA_KEY_PATHS_AU "Paths/AU" | ||||
#define CARLA_KEY_PATHS_CSD "Paths/CSD" | |||||
#define CARLA_KEY_PATHS_GIG "Paths/GIG" | #define CARLA_KEY_PATHS_GIG "Paths/GIG" | ||||
#define CARLA_KEY_PATHS_SF2 "Paths/SF2" | #define CARLA_KEY_PATHS_SF2 "Paths/SF2" | ||||
#define CARLA_KEY_PATHS_SFZ "Paths/SFZ" | #define CARLA_KEY_PATHS_SFZ "Paths/SFZ" | ||||
@@ -133,7 +132,6 @@ struct CarlaObject { | |||||
QStringList DEFAULT_VST_PATH; | QStringList DEFAULT_VST_PATH; | ||||
QStringList DEFAULT_VST3_PATH; | QStringList DEFAULT_VST3_PATH; | ||||
QStringList DEFAULT_AU_PATH; | QStringList DEFAULT_AU_PATH; | ||||
QStringList DEFAULT_CSOUND_PATH; | |||||
QStringList DEFAULT_GIG_PATH; | QStringList DEFAULT_GIG_PATH; | ||||
QStringList DEFAULT_SF2_PATH; | QStringList DEFAULT_SF2_PATH; | ||||
QStringList DEFAULT_SFZ_PATH; | QStringList DEFAULT_SFZ_PATH; | ||||
@@ -144,14 +144,6 @@ RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList. | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
Rewire.exe: Rewire.cpp.o | |||||
$(CXX) $^ -lversion -o $@ | |||||
Rewire.cpp.o: Rewire.cpp | |||||
$(CXX) $< -Wall -Wextra -DREAL_BUILD -DDEBUG -O0 -g -I../includes -I../utils -std=c++11 -c -o $@ | |||||
# -------------------------------------------------------------- | |||||
clean: | clean: | ||||
rm -f *.o $(TARGETS) | rm -f *.o $(TARGETS) | ||||
@@ -1,20 +0,0 @@ | |||||
/* | |||||
* Carla Tests | |||||
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||||
* | |||||
* This program is free software; you can redistribute it and/or | |||||
* modify it under the terms of the GNU General Public License as | |||||
* published by the Free Software Foundation; either version 2 of | |||||
* the License, or any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||||
*/ | |||||
#include "rewire/ReWire.c" | |||||
#include "rewire/ReWireAPI.c" | |||||
#include "rewire/ReWirePanelAPI.c" |
@@ -1,71 +0,0 @@ | |||||
/* | |||||
* Carla Tests | |||||
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||||
* | |||||
* This program is free software; you can redistribute it and/or | |||||
* modify it under the terms of the GNU General Public License as | |||||
* published by the Free Software Foundation; either version 2 of | |||||
* the License, or any later version. | |||||
* | |||||
* This program is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU General Public License for more details. | |||||
* | |||||
* For a full copy of the GNU General Public License see the doc/GPL.txt file. | |||||
*/ | |||||
#include "CarlaLibUtils.hpp" | |||||
// ----------------------------------------------------------------------- | |||||
int main(/*int argc, char* argv[]*/) | |||||
{ | |||||
static const char* const filename = "C:\\Program Files\\Waves\\ReWire\\WavesReWireDevice.dll"; | |||||
// static const char* const filename = "C:\\Program Files\\AudioGL\\AudioGL.dll"; | |||||
RewireBridge bridge(filename); | |||||
DevInfo devInfo; | |||||
carla_zeroStruct<DevInfo>(devInfo); | |||||
devInfo.size = 8288; | |||||
(bridge.RWDEFGetDeviceInfo)(&devInfo); | |||||
carla_stdout("Ok, this is the info:"); | |||||
carla_stdout("\tVersion: %i", devInfo.version); | |||||
carla_stdout("\tName: \"%s\"", devInfo.name); | |||||
carla_stdout("\tChannels: %l", devInfo.channelCount); | |||||
for (long i=0; i < devInfo.channelCount; ++i) | |||||
carla_stdout("\t\t#%i: \"%s\"", i+1, devInfo.channelNames[i]); | |||||
OpenInfo info; | |||||
info.size1 = sizeof(OpenInfo); | |||||
info.size2 = 12; | |||||
info.sampleRate = 44100; | |||||
info.bufferSize = 512; | |||||
(bridge.RWDEFOpenDevice)(&info); | |||||
#if 0 | |||||
carla_stdout("Starting panel..."); | |||||
(bridge.RWDEFLaunchPanelApp)(); | |||||
for (int i=0; i<500; ++i) | |||||
//for (; (bridge.RWDEFIsPanelAppLaunched)() != 0;) | |||||
{ | |||||
(bridge.RWDEFIdle)(); | |||||
carla_msleep(20); | |||||
} | |||||
(bridge.RWDEFQuitPanelApp)(); | |||||
#endif | |||||
for (; (bridge.RWDEFIsCloseOK)() == 0;) | |||||
carla_msleep(10); | |||||
(bridge.RWDEFCloseDevice)(); | |||||
return 0; | |||||
} |
@@ -101,18 +101,12 @@ const char* PluginType2Str(const PluginType type) noexcept | |||||
return "PLUGIN_VST3"; | return "PLUGIN_VST3"; | ||||
case PLUGIN_AU: | case PLUGIN_AU: | ||||
return "PLUGIN_AU"; | return "PLUGIN_AU"; | ||||
case PLUGIN_JACK: | |||||
return "PLUGIN_JACK"; | |||||
case PLUGIN_REWIRE: | |||||
return "PLUGIN_REWIRE"; | |||||
case PLUGIN_FILE_CSD: | |||||
return "PLUGIN_FILE_CSD"; | |||||
case PLUGIN_FILE_GIG: | |||||
return "PLUGIN_FILE_GIG"; | |||||
case PLUGIN_FILE_SF2: | |||||
return "PLUGIN_FILE_SF2"; | |||||
case PLUGIN_FILE_SFZ: | |||||
return "PLUGIN_FILE_SFZ"; | |||||
case PLUGIN_GIG: | |||||
return "PLUGIN_GIG"; | |||||
case PLUGIN_SF2: | |||||
return "PLUGIN_SF2"; | |||||
case PLUGIN_SFZ: | |||||
return "PLUGIN_SFZ"; | |||||
} | } | ||||
carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type); | carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type); | ||||
@@ -432,18 +426,12 @@ const char* getPluginTypeAsString(const PluginType type) noexcept | |||||
case PLUGIN_VST3: | case PLUGIN_VST3: | ||||
return "VST3"; | return "VST3"; | ||||
case PLUGIN_AU: | case PLUGIN_AU: | ||||
return "AU"; | |||||
case PLUGIN_JACK: | |||||
return "JACK"; | |||||
case PLUGIN_REWIRE: | |||||
return "ReWire"; | |||||
case PLUGIN_FILE_CSD: | |||||
return "CSD"; | |||||
case PLUGIN_FILE_GIG: | |||||
return "AU";; | |||||
case PLUGIN_GIG: | |||||
return "GIG"; | return "GIG"; | ||||
case PLUGIN_FILE_SF2: | |||||
case PLUGIN_SF2: | |||||
return "SF2"; | return "SF2"; | ||||
case PLUGIN_FILE_SFZ: | |||||
case PLUGIN_SFZ: | |||||
return "SFZ"; | return "SFZ"; | ||||
} | } | ||||
@@ -480,18 +468,12 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept | |||||
return PLUGIN_VST3; | return PLUGIN_VST3; | ||||
if (stype == "au") | if (stype == "au") | ||||
return PLUGIN_AU; | return PLUGIN_AU; | ||||
if (stype == "jack") | |||||
return PLUGIN_JACK; | |||||
if (stype == "rewire") | |||||
return PLUGIN_REWIRE; | |||||
if (stype == "csd") | |||||
return PLUGIN_FILE_CSD; | |||||
if (stype == "gig") | if (stype == "gig") | ||||
return PLUGIN_FILE_GIG; | |||||
return PLUGIN_GIG; | |||||
if (stype == "sf2") | if (stype == "sf2") | ||||
return PLUGIN_FILE_SF2; | |||||
return PLUGIN_SF2; | |||||
if (stype == "sfz") | if (stype == "sfz") | ||||
return PLUGIN_FILE_SFZ; | |||||
return PLUGIN_SFZ; | |||||
carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype); | carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype); | ||||
return PLUGIN_NONE; | return PLUGIN_NONE; | ||||
@@ -404,226 +404,6 @@ bool StateSave::fillFromXmlElement(const XmlElement* const xmlElement) | |||||
return true; | return true; | ||||
} | } | ||||
#if 0 | |||||
void StateSave::fillFromXmlNode(const QDomNode& xmlNode) | |||||
{ | |||||
clear(); | |||||
CARLA_SAFE_ASSERT_RETURN(! xmlNode.isNull(),); | |||||
for (QDomNode node = xmlNode.firstChild(); ! node.isNull(); node = node.nextSibling()) | |||||
{ | |||||
QString tagName(node.toElement().tagName()); | |||||
// --------------------------------------------------------------- | |||||
// Info | |||||
if (tagName.compare("info", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
for (QDomNode xmlInfo = node.toElement().firstChild(); ! xmlInfo.isNull(); xmlInfo = xmlInfo.nextSibling()) | |||||
{ | |||||
const QString tag(xmlInfo.toElement().tagName()); | |||||
const QString text(xmlInfo.toElement().text().trimmed()); | |||||
if (tag.compare("type", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
type = xmlSafeStringCharDup(text, false); | |||||
} | |||||
else if (tag.compare("name", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
name = xmlSafeStringCharDup(text, false); | |||||
} | |||||
else if (tag.compare("label", Qt::CaseInsensitive) == 0 || tag.compare("uri", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
label = xmlSafeStringCharDup(text, false); | |||||
} | |||||
else if (tag.compare("binary", Qt::CaseInsensitive) == 0 || tag.compare("bundle", Qt::CaseInsensitive) == 0 || tag.compare("filename", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
binary = xmlSafeStringCharDup(text, false); | |||||
} | |||||
else if (tag.compare("uniqueid", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const qlonglong uniqueIdTry(text.toLongLong(&ok)); | |||||
if (ok) uniqueId = static_cast<int64_t>(uniqueIdTry); | |||||
} | |||||
} | |||||
} | |||||
// --------------------------------------------------------------- | |||||
// Data | |||||
else if (tagName.compare("data", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
for (QDomNode xmlData = node.toElement().firstChild(); ! xmlData.isNull(); xmlData = xmlData.nextSibling()) | |||||
{ | |||||
const QString tag(xmlData.toElement().tagName()); | |||||
const QString text(xmlData.toElement().text().trimmed()); | |||||
// ------------------------------------------------------- | |||||
// Internal Data | |||||
if (tag.compare("active", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
active = (text.compare("yes", Qt::CaseInsensitive) == 0 || text.compare("true", Qt::CaseInsensitive) == 0); | |||||
} | |||||
else if (tag.compare("drywet", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const float value(text.toFloat(&ok)); | |||||
if (ok) dryWet = carla_fixValue(0.0f, 1.0f, value); | |||||
} | |||||
else if (tag.compare("volume", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const float value(text.toFloat(&ok)); | |||||
if (ok) volume = carla_fixValue(0.0f, 1.27f, value); | |||||
} | |||||
else if (tag.compare("balanceleft", Qt::CaseInsensitive) == 0 || tag.compare("balance-left", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const float value(text.toFloat(&ok)); | |||||
if (ok) balanceLeft = carla_fixValue(-1.0f, 1.0f, value); | |||||
} | |||||
else if (tag.compare("balanceright", Qt::CaseInsensitive) == 0 || tag.compare("balance-right", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const float value(text.toFloat(&ok)); | |||||
if (ok) balanceRight = carla_fixValue(-1.0f, 1.0f, value); | |||||
} | |||||
else if (tag.compare("panning", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const float value(text.toFloat(&ok)); | |||||
if (ok) panning = carla_fixValue(-1.0f, 1.0f, value); | |||||
} | |||||
else if (tag.compare("controlchannel", Qt::CaseInsensitive) == 0 || tag.compare("control-channel", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const short value(text.toShort(&ok)); | |||||
if (ok && value >= 1 && value <= MAX_MIDI_CHANNELS) | |||||
ctrlChannel = static_cast<int8_t>(value-1); | |||||
} | |||||
// ------------------------------------------------------- | |||||
// Program (current) | |||||
else if (tag.compare("currentprogramindex", Qt::CaseInsensitive) == 0 || tag.compare("current-program-index", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const int value(text.toInt(&ok)); | |||||
if (ok && value >= 1) | |||||
currentProgramIndex = value-1; | |||||
} | |||||
else if (tag.compare("currentprogramname", Qt::CaseInsensitive) == 0 || tag.compare("current-program-name", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
currentProgramName = xmlSafeStringCharDup(text, false); | |||||
} | |||||
// ------------------------------------------------------- | |||||
// Midi Program (current) | |||||
else if (tag.compare("currentmidibank", Qt::CaseInsensitive) == 0 || tag.compare("current-midi-bank", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const int value(text.toInt(&ok)); | |||||
if (ok && value >= 1) | |||||
currentMidiBank = value-1; | |||||
} | |||||
else if (tag.compare("currentmidiprogram", Qt::CaseInsensitive) == 0 || tag.compare("current-midi-program", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const int value(text.toInt(&ok)); | |||||
if (ok && value >= 1) | |||||
currentMidiProgram = value-1; | |||||
} | |||||
// ------------------------------------------------------- | |||||
// Parameters | |||||
else if (tag.compare("parameter", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
StateParameter* const stateParameter(new StateParameter()); | |||||
for (QDomNode xmlSubData = xmlData.toElement().firstChild(); ! xmlSubData.isNull(); xmlSubData = xmlSubData.nextSibling()) | |||||
{ | |||||
const QString pTag(xmlSubData.toElement().tagName()); | |||||
const QString pText(xmlSubData.toElement().text().trimmed()); | |||||
if (pTag.compare("index", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const int index(pText.toInt(&ok)); | |||||
if (ok && index >= 0) stateParameter->index = index; | |||||
} | |||||
else if (pTag.compare("name", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
stateParameter->name = xmlSafeStringCharDup(pText, false); | |||||
} | |||||
else if (pTag.compare("symbol", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
stateParameter->symbol = xmlSafeStringCharDup(pText, false); | |||||
} | |||||
else if (pTag.compare("value", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const float value(pText.toFloat(&ok)); | |||||
if (ok) stateParameter->value = value; | |||||
} | |||||
else if (pTag.compare("midichannel", Qt::CaseInsensitive) == 0 || pTag.compare("midi-channel", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const ushort channel(pText.toUShort(&ok)); | |||||
if (ok && channel >= 1 && channel <= MAX_MIDI_CHANNELS) | |||||
stateParameter->midiChannel = static_cast<uint8_t>(channel-1); | |||||
} | |||||
else if (pTag.compare("midicc", Qt::CaseInsensitive) == 0 || pTag.compare("midi-cc", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
bool ok; | |||||
const int cc(pText.toInt(&ok)); | |||||
if (ok && cc >= 1 && cc < 0x5F) | |||||
stateParameter->midiCC = static_cast<int16_t>(cc); | |||||
} | |||||
} | |||||
parameters.append(stateParameter); | |||||
} | |||||
// ------------------------------------------------------- | |||||
// Custom Data | |||||
else if (tag.compare("customdata", Qt::CaseInsensitive) == 0 || tag.compare("custom-data", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
StateCustomData* const stateCustomData(new StateCustomData()); | |||||
for (QDomNode xmlSubData = xmlData.toElement().firstChild(); ! xmlSubData.isNull(); xmlSubData = xmlSubData.nextSibling()) | |||||
{ | |||||
const QString cTag(xmlSubData.toElement().tagName()); | |||||
const QString cText(xmlSubData.toElement().text().trimmed()); | |||||
if (cTag.compare("type", Qt::CaseInsensitive) == 0) | |||||
stateCustomData->type = xmlSafeStringCharDup(cText, false); | |||||
else if (cTag.compare("key", Qt::CaseInsensitive) == 0) | |||||
stateCustomData->key = xmlSafeStringCharDup(cText, false); | |||||
else if (cTag.compare("value", Qt::CaseInsensitive) == 0) | |||||
stateCustomData->value = xmlSafeStringCharDup(cText, false); | |||||
} | |||||
customData.append(stateCustomData); | |||||
} | |||||
// ------------------------------------------------------- | |||||
// Chunk | |||||
else if (tag.compare("chunk", Qt::CaseInsensitive) == 0) | |||||
{ | |||||
chunk = xmlSafeStringCharDup(text, false); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
#endif | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// fillXmlStringFromStateSave | // fillXmlStringFromStateSave | ||||
@@ -672,19 +452,14 @@ String StateSave::toString() const | |||||
infoXml << " <Binary>" << xmlSafeString(binary, true) << "</Binary>\n"; | infoXml << " <Binary>" << xmlSafeString(binary, true) << "</Binary>\n"; | ||||
infoXml << " <UniqueID>" << uniqueId << "</UniqueID>\n"; | infoXml << " <UniqueID>" << uniqueId << "</UniqueID>\n"; | ||||
break; | break; | ||||
case PLUGIN_JACK: | |||||
infoXml << " <Binary>" << xmlSafeString(binary, true) << "</Binary>\n"; | |||||
break; | |||||
case PLUGIN_REWIRE: | |||||
infoXml << " <Label>" << xmlSafeString(label, true) << "</Label>\n"; | |||||
break; | |||||
case PLUGIN_FILE_CSD: | |||||
case PLUGIN_FILE_GIG: | |||||
case PLUGIN_FILE_SF2: | |||||
case PLUGIN_FILE_SFZ: | |||||
case PLUGIN_GIG: | |||||
case PLUGIN_SF2: | |||||
infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | ||||
infoXml << " <Label>" << xmlSafeString(label, true) << "</Label>\n"; | infoXml << " <Label>" << xmlSafeString(label, true) << "</Label>\n"; | ||||
break; | break; | ||||
case PLUGIN_SFZ: | |||||
infoXml << " <Filename>" << xmlSafeString(binary, true) << "</Filename>\n"; | |||||
break; | |||||
} | } | ||||
infoXml << " </Info>\n\n"; | infoXml << " </Info>\n\n"; | ||||
@@ -807,184 +582,6 @@ String StateSave::toString() const | |||||
return content; | return content; | ||||
} | } | ||||
#if 0 | |||||
QString StateSave::toString() const | |||||
{ | |||||
QString content; | |||||
{ | |||||
QString infoXml(" <Info>\n"); | |||||
infoXml += QString(" <Type>%1</Type>\n").arg((type != nullptr) ? type : ""); | |||||
infoXml += QString(" <Name>%1</Name>\n").arg(xmlSafeString(name, true)); | |||||
switch (getPluginTypeFromString(type)) | |||||
{ | |||||
case PLUGIN_NONE: | |||||
break; | |||||
case PLUGIN_INTERNAL: | |||||
infoXml += QString(" <Label>%1</Label>\n").arg(xmlSafeString(label, true)); | |||||
break; | |||||
case PLUGIN_LADSPA: | |||||
infoXml += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <Label>%1</Label>\n").arg(xmlSafeString(label, true)); | |||||
infoXml += QString(" <UniqueID>%1</UniqueID>\n").arg(uniqueId); | |||||
break; | |||||
case PLUGIN_DSSI: | |||||
infoXml += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <Label>%1</Label>\n").arg(xmlSafeString(label, true)); | |||||
break; | |||||
case PLUGIN_LV2: | |||||
infoXml += QString(" <Bundle>%1</Bundle>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <URI>%1</URI>\n").arg(xmlSafeString(label, true)); | |||||
break; | |||||
case PLUGIN_VST: | |||||
infoXml += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <UniqueID>%1</UniqueID>\n").arg(uniqueId); | |||||
break; | |||||
case PLUGIN_VST3: | |||||
// TODO? | |||||
infoXml += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <UniqueID>%1</UniqueID>\n").arg(uniqueId); | |||||
break; | |||||
case PLUGIN_AU: | |||||
// TODO? | |||||
infoXml += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <UniqueID>%1</UniqueID>\n").arg(uniqueId); | |||||
break; | |||||
case PLUGIN_JACK: | |||||
infoXml += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(binary, true)); | |||||
break; | |||||
case PLUGIN_REWIRE: | |||||
infoXml += QString(" <Label>%1</Label>\n").arg(xmlSafeString(label, true)); | |||||
break; | |||||
case PLUGIN_FILE_CSD: | |||||
case PLUGIN_FILE_GIG: | |||||
case PLUGIN_FILE_SF2: | |||||
case PLUGIN_FILE_SFZ: | |||||
infoXml += QString(" <Filename>%1</Filename>\n").arg(xmlSafeString(binary, true)); | |||||
infoXml += QString(" <Label>%1</Label>\n").arg(xmlSafeString(label, true)); | |||||
break; | |||||
} | |||||
infoXml += " </Info>\n\n"; | |||||
content += infoXml; | |||||
} | |||||
content += " <Data>\n"; | |||||
{ | |||||
QString dataXml; | |||||
dataXml += QString(" <Active>%1</Active>\n").arg(active ? "Yes" : "No"); | |||||
if (dryWet != 1.0f) | |||||
dataXml += QString(" <DryWet>%1</DryWet>\n").arg(dryWet, 0, 'g', 7); | |||||
if (volume != 1.0f) | |||||
dataXml += QString(" <Volume>%1</Volume>\n").arg(volume, 0, 'g', 7); | |||||
if (balanceLeft != -1.0f) | |||||
dataXml += QString(" <Balance-Left>%1</Balance-Left>\n").arg(balanceLeft, 0, 'g', 7); | |||||
if (balanceRight != 1.0f) | |||||
dataXml += QString(" <Balance-Right>%1</Balance-Right>\n").arg(balanceRight, 0, 'g', 7); | |||||
if (panning != 0.0f) | |||||
dataXml += QString(" <Panning>%1</Panning>\n").arg(panning, 0, 'g', 7); | |||||
if (ctrlChannel < 0) | |||||
dataXml += QString(" <ControlChannel>N</ControlChannel>\n"); | |||||
else | |||||
dataXml += QString(" <ControlChannel>%1</ControlChannel>\n").arg(ctrlChannel+1); | |||||
content += dataXml; | |||||
} | |||||
for (StateParameterItenerator it = parameters.begin(); it.valid(); it.next()) | |||||
{ | |||||
StateParameter* const stateParameter(it.getValue()); | |||||
QString parameterXml("\n"" <Parameter>\n"); | |||||
parameterXml += QString(" <Index>%1</Index>\n").arg(stateParameter->index); | |||||
parameterXml += QString(" <Name>%1</Name>\n").arg(xmlSafeString(stateParameter->name, true)); | |||||
if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | |||||
parameterXml += QString(" <Symbol>%1</Symbol>\n").arg(xmlSafeString(stateParameter->symbol, true)); | |||||
if (stateParameter->isInput) | |||||
parameterXml += QString(" <Value>%1</Value>\n").arg(stateParameter->value, 0, 'g', 15); | |||||
if (stateParameter->midiCC > 0) | |||||
{ | |||||
parameterXml += QString(" <MidiCC>%1</MidiCC>\n").arg(stateParameter->midiCC); | |||||
parameterXml += QString(" <MidiChannel>%1</MidiChannel>\n").arg(stateParameter->midiChannel+1); | |||||
} | |||||
parameterXml += " </Parameter>\n"; | |||||
content += parameterXml; | |||||
} | |||||
if (currentProgramIndex >= 0 && currentProgramName != nullptr && currentProgramName[0] != '\0') | |||||
{ | |||||
// ignore 'default' program | |||||
if (currentProgramIndex > 0 || QString(currentProgramName).compare("default", Qt::CaseInsensitive) != 0) | |||||
{ | |||||
QString programXml("\n"); | |||||
programXml += QString(" <CurrentProgramIndex>%1</CurrentProgramIndex>\n").arg(currentProgramIndex+1); | |||||
programXml += QString(" <CurrentProgramName>%1</CurrentProgramName>\n").arg(xmlSafeString(currentProgramName, true)); | |||||
content += programXml; | |||||
} | |||||
} | |||||
if (currentMidiBank >= 0 && currentMidiProgram >= 0) | |||||
{ | |||||
QString midiProgramXml("\n"); | |||||
midiProgramXml += QString(" <CurrentMidiBank>%1</CurrentMidiBank>\n").arg(currentMidiBank+1); | |||||
midiProgramXml += QString(" <CurrentMidiProgram>%1</CurrentMidiProgram>\n").arg(currentMidiProgram+1); | |||||
content += midiProgramXml; | |||||
} | |||||
for (StateCustomDataItenerator it = customData.begin(); it.valid(); it.next()) | |||||
{ | |||||
StateCustomData* const stateCustomData(it.getValue()); | |||||
CARLA_SAFE_ASSERT_CONTINUE(stateCustomData->type != nullptr && stateCustomData->type[0] != '\0'); | |||||
CARLA_SAFE_ASSERT_CONTINUE(stateCustomData->key != nullptr && stateCustomData->key[0] != '\0'); | |||||
CARLA_SAFE_ASSERT_CONTINUE(stateCustomData->value != nullptr); | |||||
QString customDataXml("\n"" <CustomData>\n"); | |||||
customDataXml += QString(" <Type>%1</Type>\n").arg(xmlSafeString(stateCustomData->type, true)); | |||||
customDataXml += QString(" <Key>%1</Key>\n").arg(xmlSafeString(stateCustomData->key, true)); | |||||
if (std::strcmp(stateCustomData->type, CUSTOM_DATA_TYPE_CHUNK) == 0 || std::strlen(stateCustomData->value) >= 128) | |||||
{ | |||||
customDataXml += " <Value>\n"; | |||||
customDataXml += QString("%1\n").arg(xmlSafeString(stateCustomData->value, true)); | |||||
customDataXml += " </Value>\n"; | |||||
} | |||||
else | |||||
customDataXml += QString(" <Value>%1</Value>\n").arg(xmlSafeString(stateCustomData->value, true)); | |||||
customDataXml += " </CustomData>\n"; | |||||
content += customDataXml; | |||||
} | |||||
if (chunk != nullptr && chunk[0] != '\0') | |||||
{ | |||||
QString chunkXml("\n"" <Chunk>\n"); | |||||
chunkXml += QString("%1\n").arg(chunk); | |||||
chunkXml += " </Chunk>\n"; | |||||
content += chunkXml; | |||||
} | |||||
content += " </Data>\n"; | |||||
return content; | |||||
} | |||||
#endif | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||