From a8b226f03578b351f3c5f8bd4bca0173c980177a Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 22 Jul 2022 07:20:44 +0100 Subject: [PATCH] Update for VST3 related fixes Signed-off-by: falkTX --- dpf/distrho/DistrhoPlugin.hpp | 3 + dpf/distrho/src/DistrhoPluginInternal.hpp | 30 ++ dpf/distrho/src/DistrhoPluginVST3.cpp | 387 ++++++++++++------ plugins/3BandEQ/DistrhoPlugin3BandEQ.cpp | 2 +- plugins/3BandEQ/DistrhoPlugin3BandEQ.hpp | 2 +- plugins/3BandEQ/DistrhoPluginInfo.h | 3 +- .../DistrhoPlugin3BandSplitter.cpp | 76 ++++ .../DistrhoPlugin3BandSplitter.hpp | 12 +- plugins/3BandSplitter/DistrhoPluginInfo.h | 3 +- .../DistrhoPluginAmplitudeImposer.cpp | 43 +- .../DistrhoPluginAmplitudeImposer.hpp | 9 +- plugins/AmplitudeImposer/DistrhoPluginInfo.h | 3 +- .../DistrhoPluginCycleShifter.cpp | 9 +- .../DistrhoPluginCycleShifter.hpp | 3 +- plugins/CycleShifter/DistrhoPluginInfo.h | 2 +- plugins/Kars/DistrhoPluginInfo.h | 2 +- plugins/Kars/DistrhoPluginKars.cpp | 17 +- plugins/Kars/DistrhoPluginKars.hpp | 4 +- plugins/Nekobi/DistrhoPluginInfo.h | 2 +- plugins/Nekobi/DistrhoPluginNekobi.cpp | 9 +- plugins/Nekobi/DistrhoPluginNekobi.hpp | 3 +- plugins/PingPongPan/DistrhoPluginInfo.h | 3 +- plugins/ProM/DistrhoPluginInfo.h | 3 +- plugins/ProM/DistrhoPluginProM.cpp | 9 +- plugins/ProM/DistrhoPluginProM.hpp | 3 +- plugins/SoulForce/DistrhoPluginInfo.h | 3 +- plugins/SoulForce/DistrhoPluginSoulForce.cpp | 9 +- plugins/SoulForce/DistrhoPluginSoulForce.hpp | 3 +- plugins/bitcrush/DistrhoPluginInfo.h | 5 +- plugins/bitcrush/DistrhoPluginMaxGen.cpp | 9 +- plugins/common/DistrhoPluginMaxGen.hpp | 14 +- plugins/freeverb/DistrhoPluginInfo.h | 3 +- plugins/freeverb/DistrhoPluginMaxGen.cpp | 9 +- plugins/gigaverb/DistrhoPluginInfo.h | 3 +- plugins/gigaverb/DistrhoPluginMaxGen.cpp | 9 +- plugins/glBars/DistrhoPluginGLBars.cpp | 9 +- plugins/glBars/DistrhoPluginGLBars.hpp | 3 +- plugins/glBars/DistrhoPluginInfo.h | 2 +- plugins/glBars/DistrhoUIGLBars.hpp | 2 +- plugins/glBars/ResizeHandle.hpp | 4 + plugins/pitchshift/DistrhoPluginInfo.h | 3 +- plugins/pitchshift/DistrhoPluginMaxGen.cpp | 9 +- 42 files changed, 575 insertions(+), 166 deletions(-) diff --git a/dpf/distrho/DistrhoPlugin.hpp b/dpf/distrho/DistrhoPlugin.hpp index 964acdc..aed6051 100644 --- a/dpf/distrho/DistrhoPlugin.hpp +++ b/dpf/distrho/DistrhoPlugin.hpp @@ -636,6 +636,9 @@ struct Parameter { A group can be applied to both inputs and outputs (at the same time). The same group cannot be used in audio ports and parameters. + When both audio and parameter groups are used, audio groups MUST be defined first. + That is, group indexes start with audio ports, then parameters. + An audio port group logically combines ports which should be considered part of the same stream.@n For example, two audio ports in a group may form a stereo stream. diff --git a/dpf/distrho/src/DistrhoPluginInternal.hpp b/dpf/distrho/src/DistrhoPluginInternal.hpp index 37cdb7c..94868ae 100644 --- a/dpf/distrho/src/DistrhoPluginInternal.hpp +++ b/dpf/distrho/src/DistrhoPluginInternal.hpp @@ -523,6 +523,36 @@ public: { return getAudioPort(input, index).hints; } + + uint32_t getAudioPortCountWithGroupId(const bool input, const uint32_t groupId) const noexcept + { + DISTRHO_SAFE_ASSERT_RETURN(fData != nullptr, 0); + + uint32_t numPorts = 0; + + if (input) + { + #if DISTRHO_PLUGIN_NUM_INPUTS > 0 + for (uint32_t i=0; iaudioPorts[i].groupId == groupId) + ++numPorts; + } + #endif + } + else + { + #if DISTRHO_PLUGIN_NUM_OUTPUTS > 0 + for (uint32_t i=0; iaudioPorts[i + DISTRHO_PLUGIN_NUM_INPUTS].groupId == groupId) + ++numPorts; + } + #endif + } + + return numPorts; + } #endif uint32_t getParameterCount() const noexcept diff --git a/dpf/distrho/src/DistrhoPluginVST3.cpp b/dpf/distrho/src/DistrhoPluginVST3.cpp index c22706e..a73f860 100644 --- a/dpf/distrho/src/DistrhoPluginVST3.cpp +++ b/dpf/distrho/src/DistrhoPluginVST3.cpp @@ -276,13 +276,15 @@ class PluginVst3 uint32_t numMainAudio; uint32_t numSidechain; uint32_t numCV; + uint32_t numGroups; BusInfo() : audio(0), sidechain(0), numMainAudio(0), numSidechain(0), - numCV(0) {} + numCV(0), + numGroups(0) {} } inputBuses, outputBuses; #if DISTRHO_PLUGIN_WANT_MIDI_INPUT @@ -601,16 +603,28 @@ public: #endif { #if DISTRHO_PLUGIN_NUM_INPUTS > 0 + std::vector visitedInputPortGroups; for (uint32_t i=0; i::iterator end = visitedInputPortGroups.end(); + if (std::find(visitedInputPortGroups.begin(), end, port.groupId) == end) + { + visitedInputPortGroups.push_back(port.groupId); + ++inputBuses.numGroups; + } + continue; + } - if (hints & kAudioPortIsCV) + if (port.hints & kAudioPortIsCV) ++inputBuses.numCV; else ++inputBuses.numMainAudio; - if (hints & kAudioPortIsSidechain) + if (port.hints & kAudioPortIsSidechain) ++inputBuses.numSidechain; } @@ -624,25 +638,46 @@ public: { AudioPortWithBusId& port(fPlugin.getAudioPort(true, i)); - if (port.hints & kAudioPortIsCV) - port.busId = inputBuses.audio + inputBuses.sidechain + cvInputBusId++; - else if (port.hints & kAudioPortIsSidechain) - port.busId = inputBuses.audio; + if (port.groupId != kPortGroupNone) + { + port.busId = port.groupId; + } else - port.busId = 0; + { + if (port.hints & kAudioPortIsCV) + port.busId = inputBuses.audio + inputBuses.sidechain + cvInputBusId++; + else if (port.hints & kAudioPortIsSidechain) + port.busId = inputBuses.audio; + else + port.busId = 0; + + port.busId += inputBuses.numGroups; + } } #endif #if DISTRHO_PLUGIN_NUM_OUTPUTS > 0 + std::vector visitedOutputPortGroups; for (uint32_t i=0; i::iterator end = visitedOutputPortGroups.end(); + if (std::find(visitedOutputPortGroups.begin(), end, port.groupId) == end) + { + visitedOutputPortGroups.push_back(port.groupId); + ++outputBuses.numGroups; + } + continue; + } - if (hints & kAudioPortIsCV) + if (port.hints & kAudioPortIsCV) ++outputBuses.numCV; else ++outputBuses.numMainAudio; - if (hints & kAudioPortIsSidechain) + if (port.hints & kAudioPortIsSidechain) ++outputBuses.numSidechain; } @@ -656,12 +691,21 @@ public: { AudioPortWithBusId& port(fPlugin.getAudioPort(false, i)); - if (port.hints & kAudioPortIsCV) - port.busId = outputBuses.audio + outputBuses.sidechain + cvOutputBusId++; - else if (port.hints & kAudioPortIsSidechain) - port.busId = outputBuses.audio; + if (port.groupId != kPortGroupNone) + { + port.busId = port.groupId; + } else - port.busId = 0; + { + if (port.hints & kAudioPortIsCV) + port.busId = outputBuses.audio + outputBuses.sidechain + cvOutputBusId++; + else if (port.hints & kAudioPortIsSidechain) + port.busId = outputBuses.audio; + else + port.busId = 0; + + port.busId += outputBuses.numGroups; + } } #endif @@ -783,9 +827,9 @@ public: { case V3_AUDIO: if (busDirection == V3_INPUT) - return inputBuses.audio + inputBuses.sidechain + inputBuses.numCV; + return inputBuses.audio + inputBuses.sidechain + inputBuses.numCV + inputBuses.numGroups; if (busDirection == V3_OUTPUT) - return outputBuses.audio + outputBuses.sidechain + outputBuses.numCV; + return outputBuses.audio + outputBuses.sidechain + outputBuses.numCV + outputBuses.numGroups; break; case V3_EVENT: #if DISTRHO_PLUGIN_WANT_MIDI_INPUT @@ -812,7 +856,7 @@ public: DISTRHO_SAFE_ASSERT_INT_RETURN(busIndex >= 0, busIndex, V3_INVALID_ARG); #if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS > 0 || DISTRHO_PLUGIN_WANT_MIDI_INPUT || DISTRHO_PLUGIN_WANT_MIDI_OUTPUT - const uint32_t busId = static_cast(busIndex); + uint32_t busId = static_cast(busIndex); #endif if (mediaType == V3_AUDIO) @@ -826,49 +870,96 @@ public: if (busDirection == V3_INPUT) { #if DISTRHO_PLUGIN_NUM_INPUTS > 0 - switch (busId) + if (busId < inputBuses.numGroups) { - case 0: - if (inputBuses.audio) - { - numChannels = inputBuses.numMainAudio; - busType = V3_MAIN; - flags = V3_DEFAULT_ACTIVE; - break; - } - // fall-through - case 1: - if (inputBuses.sidechain) - { - numChannels = inputBuses.numSidechain; - busType = V3_AUX; - flags = 0; - break; - } - // fall-through - default: - numChannels = 1; + numChannels = fPlugin.getAudioPortCountWithGroupId(true, busId); busType = V3_AUX; - flags = V3_IS_CONTROL_VOLTAGE; - break; - } + flags = 0; - if (busType == V3_MAIN) - { - strncpy_utf16(busName, "Audio Input", 128); - } - else - { for (uint32_t i=0; i 0 - switch (busId) + if (busId < outputBuses.numGroups) { - case 0: - if (outputBuses.audio) - { - numChannels = outputBuses.numMainAudio; - busType = V3_MAIN; - flags = V3_DEFAULT_ACTIVE; - break; - } - // fall-through - case 1: - if (outputBuses.sidechain) - { - numChannels = outputBuses.numSidechain; - busType = V3_AUX; - flags = 0; - break; - } - // fall-through - default: - numChannels = 1; + numChannels = fPlugin.getAudioPortCountWithGroupId(false, busId); busType = V3_AUX; - flags = V3_IS_CONTROL_VOLTAGE; - break; - } + flags = 0; - if (busType == V3_MAIN) - { - strncpy_utf16(busName, "Audio Output", 128); - } - else - { for (uint32_t i=0; i= 0, busId, V3_INVALID_ARG); + DISTRHO_SAFE_ASSERT_INT_RETURN(busIndex >= 0, busIndex, V3_INVALID_ARG); DISTRHO_SAFE_ASSERT_RETURN(speaker != nullptr, V3_INVALID_ARG); #if DISTRHO_PLUGIN_NUM_INPUTS > 0 || DISTRHO_PLUGIN_NUM_OUTPUTS > 0 - const uint32_t ubusId = static_cast(busId); + uint32_t busId = static_cast(busIndex); #endif if (busDirection == V3_INPUT) @@ -1344,7 +1483,7 @@ public: { AudioPortWithBusId& port(fPlugin.getAudioPort(true, i)); - if (port.busId != ubusId) + if (port.busId != busId) continue; v3_speaker_arrangement arr; @@ -1358,25 +1497,34 @@ public: arr = V3_SPEAKER_L | V3_SPEAKER_R; break; default: - return V3_INVALID_ARG; - /* - if (inputBuses.audio != 0 && ubusId == 0) + if (busId < inputBuses.numGroups) { + const uint32_t numPortsInBus = fPlugin.getAudioPortCountWithGroupId(true, busId); arr = 0x0; - for (uint32_t j=0; j - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/3BandEQ/DistrhoPlugin3BandEQ.hpp b/plugins/3BandEQ/DistrhoPlugin3BandEQ.hpp index d49d4c5..2b70a6d 100644 --- a/plugins/3BandEQ/DistrhoPlugin3BandEQ.hpp +++ b/plugins/3BandEQ/DistrhoPlugin3BandEQ.hpp @@ -1,7 +1,7 @@ /* * DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn * Copyright (C) 2007 Michael Gruhn - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/plugins/3BandEQ/DistrhoPluginInfo.h b/plugins/3BandEQ/DistrhoPluginInfo.h index fc48862..4a50ae9 100644 --- a/plugins/3BandEQ/DistrhoPluginInfo.h +++ b/plugins/3BandEQ/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,5 +28,6 @@ #define DISTRHO_PLUGIN_WANT_PROGRAMS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|EQ" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.cpp b/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.cpp index 53ca45a..7c75bdf 100644 --- a/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.cpp +++ b/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.cpp @@ -40,6 +40,63 @@ DistrhoPlugin3BandSplitter::DistrhoPlugin3BandSplitter() // ----------------------------------------------------------------------- // Init +void DistrhoPlugin3BandSplitter::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.hints = 0x0; + + if (input) + { + switch (index) + { + case 0: + port.name = "Inpput Left"; + port.symbol = "in_left"; + break; + case 1: + port.name = "Input Right"; + port.symbol = "in_right"; + break; + } + port.groupId = kPortGroupStereo; + } + else + { + switch (index) + { + case 0: + port.name = "Output Left (Low)"; + port.symbol = "in_left_low"; + port.groupId = kPortGroupLow; + break; + case 1: + port.name = "Output Right (Low)"; + port.symbol = "in_right_low"; + port.groupId = kPortGroupLow; + break; + case 2: + port.name = "Output Left (Mid)"; + port.symbol = "in_left_mid"; + port.groupId = kPortGroupMid; + break; + case 3: + port.name = "Output Right (Mid)"; + port.symbol = "in_right_mid"; + port.groupId = kPortGroupMid; + break; + case 4: + port.name = "Output Left (High)"; + port.symbol = "in_left_high"; + port.groupId = kPortGroupHigh; + break; + case 5: + port.name = "Output Right (High)"; + port.symbol = "in_right_high"; + port.groupId = kPortGroupHigh; + break; + } + } +} + void DistrhoPlugin3BandSplitter::initParameter(uint32_t index, Parameter& parameter) { switch (index) @@ -106,6 +163,25 @@ void DistrhoPlugin3BandSplitter::initParameter(uint32_t index, Parameter& parame } } +void DistrhoPlugin3BandSplitter::initPortGroup(uint32_t groupId, PortGroup& portGroup) +{ + switch (groupId) + { + case kPortGroupLow: + portGroup.name = "Low"; + portGroup.symbol = "low"; + break; + case kPortGroupMid: + portGroup.name = "Mid"; + portGroup.symbol = "mid"; + break; + case kPortGroupHigh: + portGroup.name = "High"; + portGroup.symbol = "high"; + break; + } +} + void DistrhoPlugin3BandSplitter::initProgramName(uint32_t index, String& programName) { if (index != 0) diff --git a/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.hpp b/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.hpp index 33f8ae4..fd8d74e 100644 --- a/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.hpp +++ b/plugins/3BandSplitter/DistrhoPlugin3BandSplitter.hpp @@ -1,7 +1,7 @@ /* * DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn * Copyright (C) 2007 Michael Gruhn - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -38,6 +38,14 @@ public: paramCount }; + enum PortGroups + { + kPortGroupLow, + kPortGroupMid, + kPortGroupHigh, + kPortGroupCount + }; + DistrhoPlugin3BandSplitter(); protected: @@ -82,7 +90,9 @@ protected: // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; + void initPortGroup(uint32_t groupId, PortGroup& portGroup) override; void initProgramName(uint32_t index, String& programName) override; // ------------------------------------------------------------------- diff --git a/plugins/3BandSplitter/DistrhoPluginInfo.h b/plugins/3BandSplitter/DistrhoPluginInfo.h index bfb9d4e..73990bd 100644 --- a/plugins/3BandSplitter/DistrhoPluginInfo.h +++ b/plugins/3BandSplitter/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,5 +28,6 @@ #define DISTRHO_PLUGIN_WANT_PROGRAMS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|EQ" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp b/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp index 65ac876..16a4860 100644 --- a/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp +++ b/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp @@ -1,7 +1,7 @@ /* * DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. * Copyright (C) 2004 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -57,20 +57,28 @@ void DistrhoPluginAmplitudeImposer::initAudioPort(bool input, uint32_t index, Au switch (index) { case 0: - port.name = "Input Left (Amp Env)"; - port.symbol = "in_left_amp"; + port.name = "Input Left (Amp Env)"; + port.symbol = "in_left_amp"; + port.groupId = kPortGroupAmpEnv; + // FIXME VST3 sidechain handling + // port.hints = kAudioPortIsSidechain; break; case 1: - port.name = "Input Right (Amp Env)"; - port.symbol = "in_right_amp"; + port.name = "Input Right (Amp Env)"; + port.symbol = "in_right_amp"; + port.groupId = kPortGroupAmpEnv; + // FIXME VST3 sidechain handling + // port.hints = kAudioPortIsSidechain; break; case 2: - port.name = "Input Left (Audio)"; - port.symbol = "in_left_audio"; + port.name = "Input Left (Audio)"; + port.symbol = "in_left_audio"; + port.groupId = kPortGroupAudio; break; case 3: - port.name = "Input Right (Audio)"; - port.symbol = "in_right_audio"; + port.name = "Input Right (Audio)"; + port.symbol = "in_right_audio"; + port.groupId = kPortGroupAudio; break; } } @@ -87,6 +95,8 @@ void DistrhoPluginAmplitudeImposer::initAudioPort(bool input, uint32_t index, Au port.symbol = "out_right"; break; } + + port.groupId = kPortGroupStereo; } } @@ -111,6 +121,21 @@ void DistrhoPluginAmplitudeImposer::initParameter(uint32_t index, Parameter& par } } +void DistrhoPluginAmplitudeImposer::initPortGroup(uint32_t groupId, PortGroup& portGroup) +{ + switch (groupId) + { + case kPortGroupAmpEnv: + portGroup.name = "Amp Env"; + portGroup.symbol = "amp_env"; + break; + case kPortGroupAudio: + portGroup.name = "Audio"; + portGroup.symbol = "audio"; + break; + } +} + void DistrhoPluginAmplitudeImposer::initProgramName(uint32_t index, String& programName) { if (index != 0) diff --git a/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp b/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp index 95e6a91..da9c313 100644 --- a/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp +++ b/plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp @@ -1,7 +1,7 @@ /* * DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. * Copyright (C) 2004 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -39,6 +39,12 @@ public: kParameterThreshold, kParameterCount }; + + enum PortGroups { + kPortGroupAmpEnv, + kPortGroupAudio, + kPortGroupCount + }; DistrhoPluginAmplitudeImposer(); @@ -92,6 +98,7 @@ Also has a threshold level for the second input, so that when the signal falls b void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; + void initPortGroup(uint32_t groupId, PortGroup& portGroup) override; void initProgramName(uint32_t index, String& programName) override; // ------------------------------------------------------------------- diff --git a/plugins/AmplitudeImposer/DistrhoPluginInfo.h b/plugins/AmplitudeImposer/DistrhoPluginInfo.h index b38076b..eadc15a 100644 --- a/plugins/AmplitudeImposer/DistrhoPluginInfo.h +++ b/plugins/AmplitudeImposer/DistrhoPluginInfo.h @@ -1,7 +1,7 @@ /* * DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. * Copyright (C) 2004 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -36,5 +36,6 @@ #define DISTRHO_PLUGIN_WANT_PROGRAMS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AmplifierPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Dynamics" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/plugins/CycleShifter/DistrhoPluginCycleShifter.cpp b/plugins/CycleShifter/DistrhoPluginCycleShifter.cpp index 2567ed9..823c51b 100644 --- a/plugins/CycleShifter/DistrhoPluginCycleShifter.cpp +++ b/plugins/CycleShifter/DistrhoPluginCycleShifter.cpp @@ -1,7 +1,7 @@ /* * DISTRHO CycleShifter, a DPF'ied CycleShifter. * Copyright (C) 2004 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -43,6 +43,13 @@ DistrhoPluginCycleShifter::DistrhoPluginCycleShifter() // ----------------------------------------------------------------------- // Init +void DistrhoPluginCycleShifter::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupMono; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginCycleShifter::initParameter(uint32_t index, Parameter& parameter) { parameter.hints = kParameterIsAutomatable; diff --git a/plugins/CycleShifter/DistrhoPluginCycleShifter.hpp b/plugins/CycleShifter/DistrhoPluginCycleShifter.hpp index 4d2524d..6b844c4 100644 --- a/plugins/CycleShifter/DistrhoPluginCycleShifter.hpp +++ b/plugins/CycleShifter/DistrhoPluginCycleShifter.hpp @@ -1,7 +1,7 @@ /* * DISTRHO CycleShifter, a DPF'ied CycleShifter. * Copyright (C) 2004 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -87,6 +87,7 @@ Works best with long/sustained sounds (e.g. strings, pads etc.), sounds like a w // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; void initProgramName(uint32_t index, String& programName) override; diff --git a/plugins/CycleShifter/DistrhoPluginInfo.h b/plugins/CycleShifter/DistrhoPluginInfo.h index 3550c07..1a253cb 100644 --- a/plugins/CycleShifter/DistrhoPluginInfo.h +++ b/plugins/CycleShifter/DistrhoPluginInfo.h @@ -1,7 +1,7 @@ /* * DISTRHO CycleShifter, a DPF'ied CycleShifter. * Copyright (C) 2004 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/plugins/Kars/DistrhoPluginInfo.h b/plugins/Kars/DistrhoPluginInfo.h index 26fcc87..7ea4eae 100644 --- a/plugins/Kars/DistrhoPluginInfo.h +++ b/plugins/Kars/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Kars Plugin, based on karplong by Chris Cannam. - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 diff --git a/plugins/Kars/DistrhoPluginKars.cpp b/plugins/Kars/DistrhoPluginKars.cpp index 0ea466c..919c40b 100644 --- a/plugins/Kars/DistrhoPluginKars.cpp +++ b/plugins/Kars/DistrhoPluginKars.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Kars Plugin, based on karplong by Chris Cannam. - * Copyright (C) 2015-2019 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -39,6 +39,13 @@ DistrhoPluginKars::DistrhoPluginKars() // ----------------------------------------------------------------------- // Init +void DistrhoPluginKars::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupMono; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginKars::initParameter(uint32_t index, Parameter& parameter) { switch (index) @@ -167,6 +174,14 @@ void DistrhoPluginKars::run(const float**, float** outputs, uint32_t frames, con } } +void DistrhoPluginKars::sampleRateChanged(double newSampleRate) +{ + fSampleRate = getSampleRate(); + + for (int i=kMaxNotes; --i >= 0;) + fNotes[i].setSampleRate(newSampleRate); +} + void DistrhoPluginKars::addSamples(float* out, int voice, uint32_t frames) { const uint32_t start = fBlockStart; diff --git a/plugins/Kars/DistrhoPluginKars.hpp b/plugins/Kars/DistrhoPluginKars.hpp index e7010d3..38442ed 100644 --- a/plugins/Kars/DistrhoPluginKars.hpp +++ b/plugins/Kars/DistrhoPluginKars.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Kars Plugin, based on karplong by Chris Cannam. - * Copyright (C) 2015-2019 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -81,6 +81,7 @@ protected: // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; // ------------------------------------------------------------------- @@ -94,6 +95,7 @@ protected: void activate() override; void run(const float**, float** outputs, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) override; + void sampleRateChanged(double newSampleRate) override; // ------------------------------------------------------------------- diff --git a/plugins/Nekobi/DistrhoPluginInfo.h b/plugins/Nekobi/DistrhoPluginInfo.h index 20ffdbf..a1c2af3 100644 --- a/plugins/Nekobi/DistrhoPluginInfo.h +++ b/plugins/Nekobi/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others. - * Copyright (C) 2013-2015 Filipe Coelho + * Copyright (C) 2013-2022 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 diff --git a/plugins/Nekobi/DistrhoPluginNekobi.cpp b/plugins/Nekobi/DistrhoPluginNekobi.cpp index 8f4c96a..d652f2b 100644 --- a/plugins/Nekobi/DistrhoPluginNekobi.cpp +++ b/plugins/Nekobi/DistrhoPluginNekobi.cpp @@ -1,7 +1,7 @@ /* * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others. * Copyright (C) 2004 Sean Bolton and others - * Copyright (C) 2013-2015 Filipe Coelho + * Copyright (C) 2013-2022 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 @@ -158,6 +158,13 @@ DistrhoPluginNekobi::~DistrhoPluginNekobi() // ----------------------------------------------------------------------- // Init +void DistrhoPluginNekobi::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupMono; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginNekobi::initParameter(uint32_t index, Parameter& parameter) { switch (index) diff --git a/plugins/Nekobi/DistrhoPluginNekobi.hpp b/plugins/Nekobi/DistrhoPluginNekobi.hpp index 813d2fc..363f80d 100644 --- a/plugins/Nekobi/DistrhoPluginNekobi.hpp +++ b/plugins/Nekobi/DistrhoPluginNekobi.hpp @@ -1,7 +1,7 @@ /* * DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others. * Copyright (C) 2004 Sean Bolton and others - * Copyright (C) 2013-2015 Filipe Coelho + * Copyright (C) 2013-2022 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 @@ -90,6 +90,7 @@ protected: // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; // ------------------------------------------------------------------- diff --git a/plugins/PingPongPan/DistrhoPluginInfo.h b/plugins/PingPongPan/DistrhoPluginInfo.h index 6b7de8f..47a98c0 100644 --- a/plugins/PingPongPan/DistrhoPluginInfo.h +++ b/plugins/PingPongPan/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO PingPongPan Plugin, based on PingPongPan by Michael Gruhn - * Copyright (C) 2012-2015 Filipe Coelho + * Copyright (C) 2012-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,5 +28,6 @@ #define DISTRHO_PLUGIN_WANT_PROGRAMS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:SpatialPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|EQ" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/plugins/ProM/DistrhoPluginInfo.h b/plugins/ProM/DistrhoPluginInfo.h index e1ee977..3024761 100644 --- a/plugins/ProM/DistrhoPluginInfo.h +++ b/plugins/ProM/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO ProM Plugin - * Copyright (C) 2015-2021 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -30,5 +30,6 @@ #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/plugins/ProM/DistrhoPluginProM.cpp b/plugins/ProM/DistrhoPluginProM.cpp index 452e290..be88ee1 100644 --- a/plugins/ProM/DistrhoPluginProM.cpp +++ b/plugins/ProM/DistrhoPluginProM.cpp @@ -1,6 +1,6 @@ /* * DISTRHO ProM Plugin - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,6 +36,13 @@ DistrhoPluginProM::~DistrhoPluginProM() // ----------------------------------------------------------------------- // Init +void DistrhoPluginProM::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupStereo; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginProM::initParameter(uint32_t, Parameter&) { } diff --git a/plugins/ProM/DistrhoPluginProM.hpp b/plugins/ProM/DistrhoPluginProM.hpp index 4ba16e8..f7aa9d1 100644 --- a/plugins/ProM/DistrhoPluginProM.hpp +++ b/plugins/ProM/DistrhoPluginProM.hpp @@ -1,6 +1,6 @@ /* * DISTRHO ProM Plugin - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -76,6 +76,7 @@ protected: // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t, Parameter&) override; // ------------------------------------------------------------------- diff --git a/plugins/SoulForce/DistrhoPluginInfo.h b/plugins/SoulForce/DistrhoPluginInfo.h index e046d66..3f0419f 100644 --- a/plugins/SoulForce/DistrhoPluginInfo.h +++ b/plugins/SoulForce/DistrhoPluginInfo.h @@ -1,7 +1,7 @@ /* * DISTRHO SoulForce, a DPF'ied SoulForce. * Copyright (C) 2006 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -36,5 +36,6 @@ #define DISTRHO_PLUGIN_WANT_PROGRAMS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:WaveshaperPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Distortion" #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/plugins/SoulForce/DistrhoPluginSoulForce.cpp b/plugins/SoulForce/DistrhoPluginSoulForce.cpp index f6cd0b4..2da762f 100644 --- a/plugins/SoulForce/DistrhoPluginSoulForce.cpp +++ b/plugins/SoulForce/DistrhoPluginSoulForce.cpp @@ -1,7 +1,7 @@ /* * DISTRHO SoulForce, a DPF'ied SoulForce. * Copyright (C) 2006 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -42,6 +42,13 @@ DistrhoPluginSoulForce::DistrhoPluginSoulForce() // ----------------------------------------------------------------------- // Init +void DistrhoPluginSoulForce::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupStereo; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginSoulForce::initParameter(uint32_t index, Parameter& parameter) { parameter.hints = kParameterIsAutomatable; diff --git a/plugins/SoulForce/DistrhoPluginSoulForce.hpp b/plugins/SoulForce/DistrhoPluginSoulForce.hpp index c09e599..ea1c18d 100644 --- a/plugins/SoulForce/DistrhoPluginSoulForce.hpp +++ b/plugins/SoulForce/DistrhoPluginSoulForce.hpp @@ -1,7 +1,7 @@ /* * DISTRHO SoulForce, a DPF'ied SoulForce. * Copyright (C) 2006 Niall Moody - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -100,6 +100,7 @@ Can get pretty loud and obnoxious."; // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; void initProgramName(uint32_t index, String& programName) override; diff --git a/plugins/bitcrush/DistrhoPluginInfo.h b/plugins/bitcrush/DistrhoPluginInfo.h index 157b9ba..7270445 100644 --- a/plugins/bitcrush/DistrhoPluginInfo.h +++ b/plugins/bitcrush/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -26,6 +26,9 @@ #define DISTRHO_PLUGIN_NUM_INPUTS 1 #define DISTRHO_PLUGIN_NUM_OUTPUTS 2 +#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:DistortionPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Distortion" + #define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Bitcrush example." #define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 'b', 'c') diff --git a/plugins/bitcrush/DistrhoPluginMaxGen.cpp b/plugins/bitcrush/DistrhoPluginMaxGen.cpp index 206c281..3ce0bbb 100644 --- a/plugins/bitcrush/DistrhoPluginMaxGen.cpp +++ b/plugins/bitcrush/DistrhoPluginMaxGen.cpp @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -39,6 +39,13 @@ DistrhoPluginMaxGen::~DistrhoPluginMaxGen() // ----------------------------------------------------------------------- // Init +void DistrhoPluginMaxGen::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = input ? kPortGroupMono : kPortGroupStereo; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginMaxGen::initParameter(uint32_t index, Parameter& parameter) { ParamInfo& info(fGenState->params[index]); diff --git a/plugins/common/DistrhoPluginMaxGen.hpp b/plugins/common/DistrhoPluginMaxGen.hpp index e2ee1da..e1be660 100644 --- a/plugins/common/DistrhoPluginMaxGen.hpp +++ b/plugins/common/DistrhoPluginMaxGen.hpp @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -44,6 +44,11 @@ protected: return DISTRHO_PLUGIN_DESCRIPTION; } + int64_t getUniqueId() const noexcept override + { + return DISTRHO_PLUGIN_VERSION; + } + const char* getMaker() const noexcept override { return "DISTRHO"; @@ -64,15 +69,10 @@ protected: return d_version(0, 1, 0); } - int64_t getUniqueId() const noexcept override - { - // TODO - return d_cconst('D', 'M', 'a', 'G'); - } - // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t index, Parameter& parameter) override; // ------------------------------------------------------------------- diff --git a/plugins/freeverb/DistrhoPluginInfo.h b/plugins/freeverb/DistrhoPluginInfo.h index bce40c5..96cba61 100644 --- a/plugins/freeverb/DistrhoPluginInfo.h +++ b/plugins/freeverb/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -27,6 +27,7 @@ #define DISTRHO_PLUGIN_NUM_OUTPUTS 1 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Reverb" #define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Freeverb example." #define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 'f', 'v') diff --git a/plugins/freeverb/DistrhoPluginMaxGen.cpp b/plugins/freeverb/DistrhoPluginMaxGen.cpp index 206c281..396b51a 100644 --- a/plugins/freeverb/DistrhoPluginMaxGen.cpp +++ b/plugins/freeverb/DistrhoPluginMaxGen.cpp @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -39,6 +39,13 @@ DistrhoPluginMaxGen::~DistrhoPluginMaxGen() // ----------------------------------------------------------------------- // Init +void DistrhoPluginMaxGen::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupMono; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginMaxGen::initParameter(uint32_t index, Parameter& parameter) { ParamInfo& info(fGenState->params[index]); diff --git a/plugins/gigaverb/DistrhoPluginInfo.h b/plugins/gigaverb/DistrhoPluginInfo.h index f2de09c..c0a8ca3 100644 --- a/plugins/gigaverb/DistrhoPluginInfo.h +++ b/plugins/gigaverb/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -27,6 +27,7 @@ #define DISTRHO_PLUGIN_NUM_OUTPUTS 2 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Reverb" #define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Gigaverb example." #define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 'g', 'v') diff --git a/plugins/gigaverb/DistrhoPluginMaxGen.cpp b/plugins/gigaverb/DistrhoPluginMaxGen.cpp index 206c281..436ffcc 100644 --- a/plugins/gigaverb/DistrhoPluginMaxGen.cpp +++ b/plugins/gigaverb/DistrhoPluginMaxGen.cpp @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -39,6 +39,13 @@ DistrhoPluginMaxGen::~DistrhoPluginMaxGen() // ----------------------------------------------------------------------- // Init +void DistrhoPluginMaxGen::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupStereo; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginMaxGen::initParameter(uint32_t index, Parameter& parameter) { ParamInfo& info(fGenState->params[index]); diff --git a/plugins/glBars/DistrhoPluginGLBars.cpp b/plugins/glBars/DistrhoPluginGLBars.cpp index d85a914..c7702e9 100644 --- a/plugins/glBars/DistrhoPluginGLBars.cpp +++ b/plugins/glBars/DistrhoPluginGLBars.cpp @@ -3,7 +3,7 @@ * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies * Copyright (C) 2000 Christian Zander * Copyright (C) 2015 Nedko Arnaudov - * Copyright (C) 2016 Filipe Coelho + * Copyright (C) 2016-2022 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 @@ -45,6 +45,13 @@ DistrhoPluginGLBars::~DistrhoPluginGLBars() // ----------------------------------------------------------------------- // Init +void DistrhoPluginGLBars::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = kPortGroupMono; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginGLBars::initParameter(uint32_t index, Parameter& parameter) { switch (index) diff --git a/plugins/glBars/DistrhoPluginGLBars.hpp b/plugins/glBars/DistrhoPluginGLBars.hpp index eb2517c..cd296b2 100644 --- a/plugins/glBars/DistrhoPluginGLBars.hpp +++ b/plugins/glBars/DistrhoPluginGLBars.hpp @@ -3,7 +3,7 @@ * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies * Copyright (C) 2000 Christian Zander * Copyright (C) 2015 Nedko Arnaudov - * Copyright (C) 2016 Filipe Coelho + * Copyright (C) 2016-2022 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 @@ -79,6 +79,7 @@ protected: // ------------------------------------------------------------------- // Init + void initAudioPort(bool input, uint32_t index, AudioPort& port) override; void initParameter(uint32_t, Parameter&) override; // ------------------------------------------------------------------- diff --git a/plugins/glBars/DistrhoPluginInfo.h b/plugins/glBars/DistrhoPluginInfo.h index e06c41d..3e85b65 100644 --- a/plugins/glBars/DistrhoPluginInfo.h +++ b/plugins/glBars/DistrhoPluginInfo.h @@ -3,7 +3,7 @@ * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies * Copyright (C) 2000 Christian Zander * Copyright (C) 2015 Nedko Arnaudov - * Copyright (C) 2016 Filipe Coelho + * Copyright (C) 2016-2022 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 diff --git a/plugins/glBars/DistrhoUIGLBars.hpp b/plugins/glBars/DistrhoUIGLBars.hpp index 34dfbcb..e1cf991 100644 --- a/plugins/glBars/DistrhoUIGLBars.hpp +++ b/plugins/glBars/DistrhoUIGLBars.hpp @@ -3,7 +3,7 @@ * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies * Copyright (C) 2000 Christian Zander * Copyright (C) 2015 Nedko Arnaudov - * Copyright (C) 2016-2021 Filipe Coelho + * Copyright (C) 2016-2022 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 diff --git a/plugins/glBars/ResizeHandle.hpp b/plugins/glBars/ResizeHandle.hpp index 88ee117..3e94963 100644 --- a/plugins/glBars/ResizeHandle.hpp +++ b/plugins/glBars/ResizeHandle.hpp @@ -19,6 +19,10 @@ #include "TopLevelWidget.hpp" #include "Color.hpp" +#if defined(DGL_OPENGL) && !defined(DGL_USE_OPENGL3) +#include "OpenGL-include.hpp" +#endif + START_NAMESPACE_DGL /** Resize handle for DPF windows, will sit on bottom-right. */ diff --git a/plugins/pitchshift/DistrhoPluginInfo.h b/plugins/pitchshift/DistrhoPluginInfo.h index 7611c7e..99607f7 100644 --- a/plugins/pitchshift/DistrhoPluginInfo.h +++ b/plugins/pitchshift/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -27,6 +27,7 @@ #define DISTRHO_PLUGIN_NUM_OUTPUTS 2 #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:PitchPlugin" +#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Pitch Shift" #define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Pitchshifter example." #define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 'p', 's') diff --git a/plugins/pitchshift/DistrhoPluginMaxGen.cpp b/plugins/pitchshift/DistrhoPluginMaxGen.cpp index 206c281..3ce0bbb 100644 --- a/plugins/pitchshift/DistrhoPluginMaxGen.cpp +++ b/plugins/pitchshift/DistrhoPluginMaxGen.cpp @@ -1,6 +1,6 @@ /* * DPF Max Gen - * Copyright (C) 2015 Filipe Coelho + * Copyright (C) 2015-2022 Filipe Coelho * * 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 @@ -39,6 +39,13 @@ DistrhoPluginMaxGen::~DistrhoPluginMaxGen() // ----------------------------------------------------------------------- // Init +void DistrhoPluginMaxGen::initAudioPort(bool input, uint32_t index, AudioPort& port) +{ + port.groupId = input ? kPortGroupMono : kPortGroupStereo; + + Plugin::initAudioPort(input, index, port); +} + void DistrhoPluginMaxGen::initParameter(uint32_t index, Parameter& parameter) { ParamInfo& info(fGenState->params[index]);