diff --git a/source/backend/engine/CarlaEngineGraph.cpp b/source/backend/engine/CarlaEngineGraph.cpp index bacafa01f..e6b540cda 100644 --- a/source/backend/engine/CarlaEngineGraph.cpp +++ b/source/backend/engine/CarlaEngineGraph.cpp @@ -1473,8 +1473,8 @@ PatchbayGraph::PatchbayGraph(CarlaEngine* const engine, const uint32_t ins, cons graph(), audioBuffer(), midiBuffer(), - inputs(carla_fixedValue(0U, 32U, ins)), - outputs(carla_fixedValue(0U, 32U, outs)), + inputs(carla_fixedValue(0U, 64U, ins)), + outputs(carla_fixedValue(0U, 64U, outs)), retCon(), usingExternalHost(false), usingExternalOSC(false), diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index a1cdceac9..cb10923da 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -1562,6 +1562,11 @@ public: return new CarlaEngineNative(host, true, true, 32, 32); } + static NativePluginHandle _instantiatePatchbay64(const NativeHostDescriptor* host) + { + return new CarlaEngineNative(host, true, true, 64, 64); + } + static void _cleanup(NativePluginHandle handle) { delete handlePtr; @@ -2553,6 +2558,48 @@ static const NativePluginDescriptor carlaPatchbay32Desc = { /* _render_inline_dsplay */ nullptr }; +static const NativePluginDescriptor carlaPatchbay64Desc = { + /* category */ NATIVE_PLUGIN_CATEGORY_OTHER, + /* hints */ static_cast(NATIVE_PLUGIN_IS_SYNTH + |NATIVE_PLUGIN_HAS_UI + |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD + |NATIVE_PLUGIN_USES_STATE + |NATIVE_PLUGIN_USES_TIME), + /* supports */ static_cast(NATIVE_PLUGIN_SUPPORTS_EVERYTHING), + /* audioIns */ 64, + /* audioOuts */ 64, + /* midiIns */ 1, + /* midiOuts */ 1, + /* paramIns */ kNumInParams, + /* paramOuts */ kNumOutParams, + /* name */ "Carla-Patchbay (64chan)", + /* label */ "carlapatchbay64", + /* maker */ "falkTX", + /* copyright */ "GNU GPL v2+", + CarlaEngineNative::_instantiatePatchbay64, + CarlaEngineNative::_cleanup, + CarlaEngineNative::_get_parameter_count, + CarlaEngineNative::_get_parameter_info, + CarlaEngineNative::_get_parameter_value, + CarlaEngineNative::_get_midi_program_count, + CarlaEngineNative::_get_midi_program_info, + CarlaEngineNative::_set_parameter_value, + CarlaEngineNative::_set_midi_program, + /* _set_custom_data */ nullptr, + CarlaEngineNative::_ui_show, + CarlaEngineNative::_ui_idle, + /* _ui_set_parameter_value */ nullptr, + /* _ui_set_midi_program */ nullptr, + /* _ui_set_custom_data */ nullptr, + CarlaEngineNative::_activate, + CarlaEngineNative::_deactivate, + CarlaEngineNative::_process, + CarlaEngineNative::_get_state, + CarlaEngineNative::_set_state, + CarlaEngineNative::_dispatcher, + /* _render_inline_dsplay */ nullptr +}; + CARLA_BACKEND_END_NAMESPACE // ----------------------------------------------------------------------- @@ -2569,6 +2616,7 @@ void carla_register_native_plugin_carla() carla_register_native_plugin(&carlaPatchbay3sDesc); carla_register_native_plugin(&carlaPatchbay16Desc); carla_register_native_plugin(&carlaPatchbay32Desc); + carla_register_native_plugin(&carlaPatchbay64Desc); } // ----------------------------------------------------------------------- @@ -2597,6 +2645,12 @@ const NativePluginDescriptor* carla_get_native_patchbay32_plugin() return &carlaPatchbay32Desc; } +const NativePluginDescriptor* carla_get_native_patchbay64_plugin() +{ + CARLA_BACKEND_USE_NAMESPACE; + return &carlaPatchbay32Desc; +} + // ----------------------------------------------------------------------- // Extra stuff for linking purposes diff --git a/source/includes/CarlaNativePlugin.h b/source/includes/CarlaNativePlugin.h index b9f9da223..f5ec91605 100644 --- a/source/includes/CarlaNativePlugin.h +++ b/source/includes/CarlaNativePlugin.h @@ -1,6 +1,6 @@ /* * Carla Plugin Host - * Copyright (C) 2011-2018 Filipe Coelho + * Copyright (C) 2011-2019 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -53,6 +53,11 @@ CARLA_EXPORT const NativePluginDescriptor* carla_get_native_patchbay16_plugin(); */ CARLA_EXPORT const NativePluginDescriptor* carla_get_native_patchbay32_plugin(); +/*! + * Get the native plugin descriptor for the carla-patchbay64 plugin. + */ +CARLA_EXPORT const NativePluginDescriptor* carla_get_native_patchbay64_plugin(); + #ifdef __cplusplus /*! * Get the internal CarlaEngine instance. diff --git a/source/native-plugins/_data.cpp b/source/native-plugins/_data.cpp index 3af85a703..f6f23a595 100644 --- a/source/native-plugins/_data.cpp +++ b/source/native-plugins/_data.cpp @@ -417,6 +417,26 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { /* copyright */ "GNU GPL v2+", DESCFUNCS }, +{ + /* category */ NATIVE_PLUGIN_CATEGORY_OTHER, + /* hints */ static_cast(NATIVE_PLUGIN_IS_SYNTH + |NATIVE_PLUGIN_HAS_UI + |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD + |NATIVE_PLUGIN_USES_STATE + |NATIVE_PLUGIN_USES_TIME), + /* supports */ static_cast(NATIVE_PLUGIN_SUPPORTS_EVERYTHING), + /* audioIns */ 64, + /* audioOuts */ 64, + /* midiIns */ 1, + /* midiOuts */ 1, + /* paramIns */ 100, + /* paramOuts */ 10, + /* name */ "Carla-Patchbay (64chan)", + /* label */ "carlapatchbay64", + /* maker */ "falkTX", + /* copyright */ "GNU GPL v2+", + DESCFUNCS +}, #endif // -------------------------------------------------------------------------------------------------------------------- diff --git a/source/plugin/carla-base.cpp b/source/plugin/carla-base.cpp index 2e3ad3199..4fb62509e 100644 --- a/source/plugin/carla-base.cpp +++ b/source/plugin/carla-base.cpp @@ -1,6 +1,6 @@ /* * Carla Native Plugins - * Copyright (C) 2013-2018 Filipe Coelho + * Copyright (C) 2013-2019 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -63,6 +63,7 @@ struct PluginListManager { std::strcmp(desc->label, "carlapatchbay3s" ) == 0 || std::strcmp(desc->label, "carlapatchbay16" ) == 0 || std::strcmp(desc->label, "carlapatchbay32" ) == 0 || + std::strcmp(desc->label, "carlapatchbay64" ) == 0 || std::strcmp(desc->label, "bigmeter" ) == 0 /*std::strcmp(desc->label, "notes" ) == 0*/) { diff --git a/source/plugin/carla-vst.cpp b/source/plugin/carla-vst.cpp index 512ffb4d8..6a2b5f762 100644 --- a/source/plugin/carla-vst.cpp +++ b/source/plugin/carla-vst.cpp @@ -26,9 +26,9 @@ #ifndef CARLA_PLUGIN_PATCHBAY #error CARLA_PLUGIN_PATCHBAY undefined #endif - #if defined(CARLA_PLUGIN_32CH) || defined(CARLA_PLUGIN_16CH) + #if defined(CARLA_PLUGIN_64CH) || defined(CARLA_PLUGIN_32CH) || defined(CARLA_PLUGIN_16CH) #if ! CARLA_PLUGIN_SYNTH - #error CARLA_PLUGIN_16/32CH requires CARLA_PLUGIN_SYNTH + #error CARLA_PLUGIN_16/32/64CH requires CARLA_PLUGIN_SYNTH #endif #endif #endif @@ -980,7 +980,9 @@ intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t index, #else // CARLA_VST_SHELL - # if defined(CARLA_PLUGIN_32CH) + # if defined(CARLA_PLUGIN_64CH) + const char* const pluginLabel = "carlapatchbay64"; + # elif defined(CARLA_PLUGIN_32CH) const char* const pluginLabel = "carlapatchbay32"; # elif defined(CARLA_PLUGIN_16CH) const char* const pluginLabel = "carlapatchbay16"; @@ -1088,6 +1090,8 @@ intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t index, { std::strncpy(cptr, "Carla-VstShell", 32); } + #elif defined(CARLA_PLUGIN_64CH) + std::strncpy(cptr, "Carla-Patchbay64", 32); #elif defined(CARLA_PLUGIN_32CH) std::strncpy(cptr, "Carla-Patchbay32", 32); #elif defined(CARLA_PLUGIN_16CH) @@ -1138,6 +1142,8 @@ intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t index, { std::strncpy(cptr, "CarlaVstShell", 32); } + #elif defined(CARLA_PLUGIN_64CH) + std::strncpy(cptr, "CarlaPatchbay64", 32); #elif defined(CARLA_PLUGIN_32CH) std::strncpy(cptr, "CarlaPatchbay32", 32); #elif defined(CARLA_PLUGIN_16CH) @@ -1245,6 +1251,8 @@ const AEffect* VSTPluginMainInit(AEffect* const effect) effect->uniqueID = static_cast(uniqueID); else effect->uniqueID = kShellUniqueID; + #elif defined(CARLA_PLUGIN_64CH) + effect->uniqueID = kBaseUniqueID+7; #elif defined(CARLA_PLUGIN_32CH) effect->uniqueID = kBaseUniqueID+6; #elif defined(CARLA_PLUGIN_16CH) @@ -1267,7 +1275,10 @@ const AEffect* VSTPluginMainInit(AEffect* const effect) #ifndef CARLA_VST_SHELL effect->numParams = kNumParameters; effect->numPrograms = 1; -# if defined(CARLA_PLUGIN_32CH) +# if defined(CARLA_PLUGIN_64CH) + effect->numInputs = 64; + effect->numOutputs = 64; +# elif defined(CARLA_PLUGIN_32CH) effect->numInputs = 32; effect->numOutputs = 32; # elif defined(CARLA_PLUGIN_16CH)