| @@ -43,6 +43,7 @@ struct Plugin::PrivateData { | |||
| #endif | |||
| uint32_t parameterCount; | |||
| uint32_t parameterOffset; | |||
| Parameter* parameters; | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| @@ -73,6 +74,7 @@ struct Plugin::PrivateData { | |||
| audioPorts(nullptr), | |||
| #endif | |||
| parameterCount(0), | |||
| parameterOffset(0), | |||
| parameters(nullptr), | |||
| #if DISTRHO_PLUGIN_WANT_PROGRAMS | |||
| programCount(0), | |||
| @@ -91,6 +93,22 @@ struct Plugin::PrivateData { | |||
| { | |||
| DISTRHO_SAFE_ASSERT(bufferSize != 0); | |||
| DISTRHO_SAFE_ASSERT(d_isNotZero(sampleRate)); | |||
| #if defined(DISTRHO_PLUGIN_TARGET_DSSI) || defined(DISTRHO_PLUGIN_TARGET_LV2) | |||
| parameterOffset += DISTRHO_PLUGIN_NUM_INPUTS + DISTRHO_PLUGIN_NUM_OUTPUTS; | |||
| # if DISTRHO_PLUGIN_WANT_LATENCY | |||
| parameterOffset += 1; | |||
| # endif | |||
| #endif | |||
| #ifdef DISTRHO_PLUGIN_TARGET_LV2 | |||
| # if (DISTRHO_PLUGIN_IS_SYNTH || DISTRHO_PLUGIN_WANT_TIMEPOS || DISTRHO_PLUGIN_WANT_STATE) | |||
| parameterOffset += 1; | |||
| # if DISTRHO_PLUGIN_WANT_STATE | |||
| parameterOffset += 1; | |||
| # endif | |||
| # endif | |||
| #endif | |||
| } | |||
| ~PrivateData() noexcept | |||
| @@ -283,6 +301,13 @@ public: | |||
| return fData->parameterCount; | |||
| } | |||
| uint32_t getParameterOffset() const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr, 0); | |||
| return fData->parameterOffset; | |||
| } | |||
| uint32_t getParameterHints(const uint32_t index) const noexcept | |||
| { | |||
| DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr && index < fData->parameterCount, 0x0); | |||
| @@ -331,7 +331,12 @@ public: | |||
| int dssi_get_midi_controller_for_port(const ulong port) noexcept | |||
| { | |||
| const uint8_t midiCC = fPlugin.getParameterMidiCC(port); | |||
| const uint32_t parameterOffset = fPlugin.getParameterOffset(); | |||
| if (port > parameterOffset) | |||
| return DSSI_NONE; | |||
| const uint8_t midiCC = fPlugin.getParameterMidiCC(port-parameterOffset); | |||
| if (midiCC == 0 || midiCC == 32 || midiCC >= 0x78) | |||
| return DSSI_NONE; | |||
| @@ -1,6 +1,6 @@ | |||
| /* | |||
| * DISTRHO Plugin Framework (DPF) | |||
| * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com> | |||
| * Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
| * | |||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | |||
| * or without fee is hereby granted, provided that the above copyright notice and this | |||
| @@ -635,7 +635,18 @@ void lv2_generate_ttl(const char* const basename) | |||
| plugin.loadProgram(i); | |||
| presetString = "<" DISTRHO_PLUGIN_URI + presetSeparator + "preset" + strBuf + ">\n"; | |||
| presetString = "<" DISTRHO_PLUGIN_URI + presetSeparator + "preset" + strBuf + ">\n"; | |||
| # if DISTRHO_PLUGIN_WANT_FULL_STATE | |||
| if (numParameters == 0 && numStates == 0) | |||
| #else | |||
| if (numParameters == 0) | |||
| #endif | |||
| { | |||
| presetString += " ."; | |||
| presetsString += presetString; | |||
| continue; | |||
| } | |||
| # if DISTRHO_PLUGIN_WANT_FULL_STATE | |||
| presetString += " state:state [\n"; | |||
| @@ -658,12 +669,22 @@ void lv2_generate_ttl(const char* const basename) | |||
| presetString += " ] .\n\n"; | |||
| # endif | |||
| bool firstParameter = true; | |||
| for (uint32_t j=0; j <numParameters; ++j) | |||
| { | |||
| if (j == 0) | |||
| if (plugin.isParameterOutput(j)) | |||
| continue; | |||
| if (firstParameter) | |||
| { | |||
| presetString += " lv2:port [\n"; | |||
| firstParameter = false; | |||
| } | |||
| else | |||
| { | |||
| presetString += " [\n"; | |||
| } | |||
| presetString += " lv2:symbol \"" + plugin.getParameterSymbol(j) + "\" ;\n"; | |||
| @@ -672,7 +693,7 @@ void lv2_generate_ttl(const char* const basename) | |||
| else | |||
| presetString += " pset:value " + String(plugin.getParameterValue(j)) + " ;\n"; | |||
| if (j+1 == numParameters) | |||
| if (j+1 == numParameters || (j+2 == numParameters && plugin.isParameterOutput(j+1))) | |||
| presetString += " ] .\n\n"; | |||
| else | |||
| presetString += " ] ,\n"; | |||
| @@ -27,14 +27,17 @@ include ../Makefile.Mini-Series.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -42,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,14 +27,17 @@ include ../Makefile.Mini-Series.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -42,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,12 +27,17 @@ include ../Makefile.ndc-Plugs.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -40,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,12 +27,17 @@ include ../Makefile.ndc-Plugs.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -40,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,13 +27,13 @@ include ../Makefile.Kars.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_DSSI),true) | |||
| TARGETS += dssi_dsp | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| @@ -42,13 +42,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,12 +27,17 @@ include ../Makefile.MVerb.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -40,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -12,6 +12,17 @@ ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| ifeq ($(LINUX),true) | |||
| BUILD_LADSPA = true | |||
| BUILD_DSSI = true | |||
| endif | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -12,6 +12,16 @@ ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| ifeq ($(LINUX),true) | |||
| BUILD_DSSI = true | |||
| endif | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -12,6 +12,17 @@ ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| ifeq ($(LINUX),true) | |||
| BUILD_LADSPA = true | |||
| BUILD_DSSI = true | |||
| endif | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -12,6 +12,17 @@ ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| ifeq ($(LINUX),true) | |||
| BUILD_LADSPA = true | |||
| BUILD_DSSI = true | |||
| endif | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -12,6 +12,16 @@ ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| ifeq ($(LINUX),true) | |||
| BUILD_DSSI = true | |||
| endif | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -8,6 +8,13 @@ | |||
| include ../../Makefile.mk | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -8,6 +8,13 @@ | |||
| include ../../Makefile.mk | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -12,6 +12,17 @@ ifeq ($(OBJS_UI),) | |||
| HAVE_DGL = false | |||
| endif | |||
| # -------------------------------------------------------------- | |||
| # Set which plugin formats to build | |||
| BUILD_JACK = true | |||
| ifeq ($(LINUX),true) | |||
| BUILD_LADSPA = true | |||
| BUILD_DSSI = true | |||
| endif | |||
| BUILD_LV2 = true | |||
| BUILD_VST2 = true | |||
| # -------------------------------------------------------------- | |||
| # Basic setup | |||
| @@ -27,13 +27,13 @@ include ../Makefile.Nekobi.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_DSSI),true) | |||
| TARGETS += dssi_dsp | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| @@ -42,13 +42,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,14 +27,17 @@ include ../Makefile.Mini-Series.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -42,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -26,11 +26,19 @@ include ../Makefile.ProM.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| TARGETS += lv2 | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -27,12 +27,17 @@ include ../Makefile.ndc-Plugs.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_DSSI),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| ifeq ($(HAVE_LIBLO),true) | |||
| TARGETS += dssi | |||
| @@ -40,13 +45,17 @@ endif | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| ifeq ($(HAVE_DGL),true) | |||
| TARGETS += lv2_sep | |||
| else | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -23,16 +23,23 @@ include ../Makefile.DPF-Max-Gen.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -23,16 +23,23 @@ include ../Makefile.DPF-Max-Gen.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -23,16 +23,23 @@ include ../Makefile.DPF-Max-Gen.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -26,11 +26,19 @@ include ../Makefile.glBars.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| TARGETS += lv2 | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||
| @@ -23,16 +23,23 @@ include ../Makefile.DPF-Max-Gen.mk | |||
| # -------------------------------------------------------------- | |||
| # Enable all possible plugin types | |||
| ifeq ($(BUILD_JACK),true) | |||
| ifeq ($(HAVE_JACK),true) | |||
| TARGETS += jack | |||
| endif | |||
| endif | |||
| ifeq ($(LINUX),true) | |||
| ifeq ($(BUILD_LADSPA),true) | |||
| TARGETS += ladspa | |||
| endif | |||
| ifeq ($(BUILD_LV2),true) | |||
| TARGETS += lv2_dsp | |||
| endif | |||
| ifeq ($(BUILD_VST),true) | |||
| TARGETS += vst | |||
| endif | |||
| all: $(TARGETS) | |||