@@ -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. | |||
@@ -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; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
{ | |||
if (fData->audioPorts[i].groupId == groupId) | |||
++numPorts; | |||
} | |||
#endif | |||
} | |||
else | |||
{ | |||
#if DISTRHO_PLUGIN_NUM_OUTPUTS > 0 | |||
for (uint32_t i=0; i<DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) | |||
{ | |||
if (fData->audioPorts[i + DISTRHO_PLUGIN_NUM_INPUTS].groupId == groupId) | |||
++numPorts; | |||
} | |||
#endif | |||
} | |||
return numPorts; | |||
} | |||
#endif | |||
uint32_t getParameterCount() const noexcept | |||
@@ -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<uint32_t> visitedInputPortGroups; | |||
for (uint32_t i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
{ | |||
const uint32_t hints = fPlugin.getAudioPortHints(true, i); | |||
AudioPortWithBusId& port(fPlugin.getAudioPort(true, i)); | |||
if (port.groupId != kPortGroupNone) | |||
{ | |||
const std::vector<uint32_t>::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<uint32_t> visitedOutputPortGroups; | |||
for (uint32_t i=0; i<DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) | |||
{ | |||
const uint32_t hints = fPlugin.getAudioPortHints(false, i); | |||
AudioPortWithBusId& port(fPlugin.getAudioPort(false, i)); | |||
if (port.groupId != kPortGroupNone) | |||
{ | |||
const std::vector<uint32_t>::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<uint32_t>(busIndex); | |||
uint32_t busId = static_cast<uint32_t>(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<DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
{ | |||
const AudioPortWithBusId& port(fPlugin.getAudioPort(true, i)); | |||
// TODO find port group name for sidechain buses | |||
if (port.busId == busId) | |||
{ | |||
strncpy_utf16(busName, port.name, 128); | |||
const PortGroupWithId& group(fPlugin.getPortGroupById(port.groupId)); | |||
switch (port.groupId) | |||
{ | |||
case kPortGroupMono: | |||
case kPortGroupStereo: | |||
strncpy_utf16(busName, "Audio Input", 128); | |||
break; | |||
default: | |||
if (group.name.isNotEmpty()) | |||
strncpy_utf16(busName, group.name, 128); | |||
else | |||
strncpy_utf16(busName, port.name, 128); | |||
break; | |||
} | |||
if (inputBuses.audio == 0 && (port.hints & kAudioPortIsSidechain) == 0x0) | |||
{ | |||
busType = V3_MAIN; | |||
flags = V3_DEFAULT_ACTIVE; | |||
} | |||
break; | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
busId -= inputBuses.numGroups; | |||
switch (busId) | |||
{ | |||
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; | |||
busType = V3_AUX; | |||
flags = V3_IS_CONTROL_VOLTAGE; | |||
break; | |||
} | |||
if (busType == V3_MAIN) | |||
{ | |||
strncpy_utf16(busName, "Audio Input", 128); | |||
} | |||
else | |||
{ | |||
for (uint32_t i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
{ | |||
const AudioPortWithBusId& port(fPlugin.getAudioPort(true, i)); | |||
if (port.busId == busId) | |||
{ | |||
const PortGroupWithId& group(fPlugin.getPortGroupById(port.groupId)); | |||
if (group.name.isNotEmpty()) | |||
strncpy_utf16(busName, group.name, 128); | |||
else | |||
strncpy_utf16(busName, port.name, 128); | |||
break; | |||
} | |||
} | |||
} | |||
} | |||
#else | |||
@@ -879,50 +970,98 @@ public: | |||
else | |||
{ | |||
#if DISTRHO_PLUGIN_NUM_OUTPUTS > 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<DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) | |||
{ | |||
const AudioPortWithBusId& port(fPlugin.getAudioPort(false, i)); | |||
// TODO find port group name for sidechain buses | |||
if (port.busId == busId) | |||
{ | |||
strncpy_utf16(busName, port.name, 128); | |||
const PortGroupWithId& group(fPlugin.getPortGroupById(port.groupId)); | |||
switch (port.groupId) | |||
{ | |||
case kPortGroupMono: | |||
case kPortGroupStereo: | |||
strncpy_utf16(busName, "Audio Output", 128); | |||
break; | |||
default: | |||
if (group.name.isNotEmpty()) | |||
strncpy_utf16(busName, group.name, 128); | |||
else | |||
strncpy_utf16(busName, port.name, 128); | |||
break; | |||
} | |||
if (outputBuses.audio == 0 && (port.hints & kAudioPortIsSidechain) == 0x0) | |||
{ | |||
busType = V3_MAIN; | |||
flags = V3_DEFAULT_ACTIVE; | |||
} | |||
break; | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
busId -= outputBuses.numGroups; | |||
switch (busId) | |||
{ | |||
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; | |||
busType = V3_AUX; | |||
flags = V3_IS_CONTROL_VOLTAGE; | |||
break; | |||
} | |||
if (busType == V3_MAIN) | |||
{ | |||
strncpy_utf16(busName, "Audio Output", 128); | |||
} | |||
else | |||
{ | |||
for (uint32_t i=0; i<DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) | |||
{ | |||
const AudioPortWithBusId& port(fPlugin.getAudioPort(false, i)); | |||
if (port.busId == busId) | |||
{ | |||
const PortGroupWithId& group(fPlugin.getPortGroupById(port.groupId)); | |||
if (group.name.isNotEmpty()) | |||
strncpy_utf16(busName, group.name, 128); | |||
else | |||
strncpy_utf16(busName, port.name, 128); | |||
break; | |||
} | |||
} | |||
} | |||
} | |||
#else | |||
d_stdout("invalid bus %d", busId); | |||
@@ -1327,14 +1466,14 @@ public: | |||
return V3_NOT_IMPLEMENTED; | |||
} | |||
v3_result getBusArrangement(const int32_t busDirection, const int32_t busId, v3_speaker_arrangement* const speaker) const noexcept | |||
v3_result getBusArrangement(const int32_t busDirection, const int32_t busIndex, v3_speaker_arrangement* const speaker) const noexcept | |||
{ | |||
DISTRHO_SAFE_ASSERT_INT_RETURN(busDirection == V3_INPUT || busDirection == V3_OUTPUT, busDirection, V3_INVALID_ARG); | |||
DISTRHO_SAFE_ASSERT_INT_RETURN(busId >= 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<uint32_t>(busId); | |||
uint32_t busId = static_cast<uint32_t>(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<inputBuses.numMainAudio; ++j) | |||
for (uint32_t j=0; j<numPortsInBus; ++j) | |||
arr |= 1ull << (j + 33ull); | |||
} | |||
else if (inputBuses.sidechain != 0 && ubusId == inputBuses.audio) | |||
{ | |||
arr = 0x0; | |||
for (uint32_t j=0; j<inputBuses.numSidechain; ++j) | |||
arr |= 1ull << (inputBuses.numMainAudio + j + 33ull); | |||
} | |||
else | |||
{ | |||
arr = 1ull << (inputBuses.numMainAudio + inputBuses.numSidechain + ubusId + 33ull); | |||
busId -= inputBuses.numGroups; | |||
if (inputBuses.audio != 0 && busId == 0) | |||
{ | |||
arr = 0x0; | |||
for (uint32_t j=0; j<inputBuses.numMainAudio; ++j) | |||
arr |= 1ull << (j + 33ull); | |||
} | |||
else if (inputBuses.sidechain != 0 && busId == inputBuses.audio) | |||
{ | |||
arr = 0x0; | |||
for (uint32_t j=0; j<inputBuses.numSidechain; ++j) | |||
arr |= 1ull << (inputBuses.numMainAudio + j + 33ull); | |||
} | |||
else | |||
{ | |||
arr = 1ull << (inputBuses.numMainAudio + inputBuses.numSidechain + busId + 33ull); | |||
} | |||
} | |||
*/ | |||
break; | |||
} | |||
@@ -1384,7 +1532,7 @@ public: | |||
return V3_OK; | |||
} | |||
#endif // DISTRHO_PLUGIN_NUM_INPUTS | |||
d_stdout("invalid bus arrangement %d", busId); | |||
d_stdout("invalid bus arrangement %d", busIndex); | |||
return V3_INVALID_ARG; | |||
} | |||
else | |||
@@ -1394,7 +1542,7 @@ public: | |||
{ | |||
AudioPortWithBusId& port(fPlugin.getAudioPort(false, i)); | |||
if (port.busId != ubusId) | |||
if (port.busId != busId) | |||
continue; | |||
v3_speaker_arrangement arr; | |||
@@ -1408,25 +1556,34 @@ public: | |||
arr = V3_SPEAKER_L | V3_SPEAKER_R; | |||
break; | |||
default: | |||
return V3_INVALID_ARG; | |||
/* | |||
if (outputBuses.audio != 0 && ubusId == 0) | |||
if (busId < outputBuses.numGroups) | |||
{ | |||
const uint32_t numPortsInBus = fPlugin.getAudioPortCountWithGroupId(false, busId); | |||
arr = 0x0; | |||
for (uint32_t j=0; j<outputBuses.numMainAudio; ++j) | |||
for (uint32_t j=0; j<numPortsInBus; ++j) | |||
arr |= 1ull << (j + 33ull); | |||
} | |||
else if (outputBuses.sidechain != 0 && ubusId == outputBuses.audio) | |||
{ | |||
arr = 0x0; | |||
for (uint32_t j=0; j<outputBuses.numSidechain; ++j) | |||
arr |= 1ull << (outputBuses.numMainAudio + j + 33ull); | |||
} | |||
else | |||
{ | |||
arr = 1ull << (outputBuses.numMainAudio + outputBuses.numSidechain + ubusId + 33ull); | |||
busId -= outputBuses.numGroups; | |||
if (outputBuses.audio != 0 && busId == 0) | |||
{ | |||
arr = 0x0; | |||
for (uint32_t j=0; j<outputBuses.numMainAudio; ++j) | |||
arr |= 1ull << (j + 33ull); | |||
} | |||
else if (outputBuses.sidechain != 0 && busId == outputBuses.audio) | |||
{ | |||
arr = 0x0; | |||
for (uint32_t j=0; j<outputBuses.numSidechain; ++j) | |||
arr |= 1ull << (outputBuses.numMainAudio + j + 33ull); | |||
} | |||
else | |||
{ | |||
arr = 1ull << (outputBuses.numMainAudio + outputBuses.numSidechain + busId + 33ull); | |||
} | |||
} | |||
*/ | |||
break; | |||
} | |||
@@ -1434,7 +1591,7 @@ public: | |||
return V3_OK; | |||
} | |||
#endif // DISTRHO_PLUGIN_NUM_OUTPUTS | |||
d_stdout("invalid bus arrangement %d", busId); | |||
d_stdout("invalid bus arrangement %d", busIndex); | |||
return V3_INVALID_ARG; | |||
} | |||
} | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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 |
@@ -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) | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de> | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
// ------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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 |
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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) | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
// ------------------------------------------------------------------- | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO AmplitudeImposer, a DPF'ied AmplitudeImposer. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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 |
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO CycleShifter, a DPF'ied CycleShifter. | |||
* Copyright (C) 2004 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* Permission is hereby granted, free of charge, to any person obtaining a | |||
* copy of this software and associated documentation files (the "Software"), | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
* Copyright (C) 2015-2019 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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; | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Kars Plugin, based on karplong by Chris Cannam. | |||
* Copyright (C) 2015-2019 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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; | |||
// ------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others. | |||
* Copyright (C) 2013-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2013-2022 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 | |||
@@ -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 <falktx@falktx.com> | |||
* Copyright (C) 2013-2022 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 | |||
@@ -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) | |||
@@ -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 <falktx@falktx.com> | |||
* Copyright (C) 2013-2022 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 | |||
@@ -90,6 +90,7 @@ protected: | |||
// ------------------------------------------------------------------- | |||
// Init | |||
void initAudioPort(bool input, uint32_t index, AudioPort& port) override; | |||
void initParameter(uint32_t index, Parameter& parameter) override; | |||
// ------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO PingPongPan Plugin, based on PingPongPan by Michael Gruhn | |||
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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 |
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO ProM Plugin | |||
* Copyright (C) 2015-2021 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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 |
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO ProM Plugin | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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&) | |||
{ | |||
} | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DISTRHO ProM Plugin | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
// ------------------------------------------------------------------- | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO SoulForce, a DPF'ied SoulForce. | |||
* Copyright (C) 2006 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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 |
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO SoulForce, a DPF'ied SoulForce. | |||
* Copyright (C) 2006 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* DISTRHO SoulForce, a DPF'ied SoulForce. | |||
* Copyright (C) 2006 Niall Moody | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* 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; | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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') | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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]); | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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; | |||
// ------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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') | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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]); | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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') | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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]); | |||
@@ -3,7 +3,7 @@ | |||
* Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |||
* Copyright (C) 2000 Christian Zander <phoenix@minion.de> | |||
* Copyright (C) 2015 Nedko Arnaudov | |||
* Copyright (C) 2016 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2016-2022 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 | |||
@@ -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) | |||
@@ -3,7 +3,7 @@ | |||
* Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |||
* Copyright (C) 2000 Christian Zander <phoenix@minion.de> | |||
* Copyright (C) 2015 Nedko Arnaudov | |||
* Copyright (C) 2016 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2016-2022 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 | |||
@@ -79,6 +79,7 @@ protected: | |||
// ------------------------------------------------------------------- | |||
// Init | |||
void initAudioPort(bool input, uint32_t index, AudioPort& port) override; | |||
void initParameter(uint32_t, Parameter&) override; | |||
// ------------------------------------------------------------------- | |||
@@ -3,7 +3,7 @@ | |||
* Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |||
* Copyright (C) 2000 Christian Zander <phoenix@minion.de> | |||
* Copyright (C) 2015 Nedko Arnaudov | |||
* Copyright (C) 2016 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2016-2022 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 | |||
@@ -3,7 +3,7 @@ | |||
* Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |||
* Copyright (C) 2000 Christian Zander <phoenix@minion.de> | |||
* Copyright (C) 2015 Nedko Arnaudov | |||
* Copyright (C) 2016-2021 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2016-2022 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 | |||
@@ -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. */ | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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') | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* DPF Max Gen | |||
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2015-2022 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 | |||
@@ -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]); | |||