Browse Source

Misc fixing

tags/1.9.4
falkTX 11 years ago
parent
commit
f0bb700b10
9 changed files with 62 additions and 35 deletions
  1. +47
    -0
      source/backend/plugin/BridgePlugin.cpp
  2. +1
    -3
      source/backend/plugin/DssiPlugin.cpp
  3. +0
    -3
      source/backend/plugin/FluidSynthPlugin.cpp
  4. +0
    -3
      source/backend/plugin/LadspaPlugin.cpp
  5. +12
    -15
      source/backend/plugin/LinuxSamplerPlugin.cpp
  6. +1
    -4
      source/backend/plugin/Lv2Plugin.cpp
  7. +1
    -1
      source/backend/plugin/Makefile
  8. +0
    -3
      source/backend/plugin/NativePlugin.cpp
  9. +0
    -3
      source/backend/plugin/VstPlugin.cpp

+ 47
- 0
source/backend/plugin/BridgePlugin.cpp View File

@@ -701,6 +701,53 @@ public:

case kEngineControlEventTypeParameter:
{
// Control backend stuff
if (event.channel == kData->ctrlChannel)
{
float value;

if (MIDI_IS_CONTROL_BREATH_CONTROLLER(ctrlEvent.param) && (fHints & PLUGIN_CAN_DRYWET) > 0)
{
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
{
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
{
float left, right;
value = ctrlEvent.value/0.5f - 1.0f;

if (value < 0.0f)
{
left = -1.0f;
right = (value*2.0f)+1.0f;
}
else if (value > 0.0f)
{
left = (value*2.0f)-1.0f;
right = 1.0f;
}
else
{
left = -1.0f;
right = 1.0f;
}

setBalanceLeft(left, false, false);
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
}
}

// Control plugin parameters
for (k=0; k < kData->param.count; ++k)
{


+ 1
- 3
source/backend/plugin/DssiPlugin.cpp View File

@@ -1128,7 +1128,6 @@ public:
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
@@ -1136,7 +1135,6 @@ public:
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
@@ -1164,7 +1162,6 @@ public:
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif
@@ -1198,6 +1195,7 @@ public:
setParameterValue(k, value, false, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, static_cast<int32_t>(k), 0, value);
}

break;
}



+ 0
- 3
source/backend/plugin/FluidSynthPlugin.cpp View File

@@ -1122,7 +1122,6 @@ public:
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
@@ -1130,7 +1129,6 @@ public:
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
@@ -1158,7 +1156,6 @@ public:
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif


+ 0
- 3
source/backend/plugin/LadspaPlugin.cpp View File

@@ -934,7 +934,6 @@ public:
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
@@ -942,7 +941,6 @@ public:
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
@@ -970,7 +968,6 @@ public:
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif


+ 12
- 15
source/backend/plugin/LinuxSamplerPlugin.cpp View File

@@ -626,50 +626,47 @@ public:
// Control backend stuff
if (event.channel == kData->ctrlChannel)
{
double value;
float value;

if (MIDI_IS_CONTROL_BREATH_CONTROLLER(ctrlEvent.param) && (fHints & PLUGIN_CAN_DRYWET) > 0)
{
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
{
value = ctrlEvent.value*127/100;
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
{
double left, right;
value = ctrlEvent.value/0.5 - 1.0;
float left, right;
value = ctrlEvent.value/0.5f - 1.0f;

if (value < 0.0)
if (value < 0.0f)
{
left = -1.0;
right = (value*2)+1.0;
left = -1.0f;
right = (value*2.0f)+1.0f;
}
else if (value > 0.0)
else if (value > 0.0f)
{
left = (value*2)-1.0;
right = 1.0;
left = (value*2.0f)-1.0f;
right = 1.0f;
}
else
{
left = -1.0;
right = 1.0;
left = -1.0f;
right = 1.0f;
}

setBalanceLeft(left, false, false);
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif


+ 1
- 4
source/backend/plugin/Lv2Plugin.cpp View File

@@ -20,7 +20,7 @@
#ifdef WANT_LV2

#include "CarlaPluginGui.hpp"
#include "CarlaEngineOsc.hpp"
#include "../engine/CarlaEngineOsc.hpp"
#include "CarlaLv2Utils.hpp"
#include "Lv2AtomQueue.hpp"

@@ -2697,7 +2697,6 @@ public:
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
@@ -2705,7 +2704,6 @@ public:
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
@@ -2733,7 +2731,6 @@ public:
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif


+ 1
- 1
source/backend/plugin/Makefile View File

@@ -8,7 +8,7 @@ include ../Makefile.mk

# --------------------------------------------------------------

BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) -I../engine
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)

ifeq ($(HAVE_QT5),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Xml Qt5Widgets)


+ 0
- 3
source/backend/plugin/NativePlugin.cpp View File

@@ -1430,7 +1430,6 @@ public:
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
@@ -1438,7 +1437,6 @@ public:
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
@@ -1466,7 +1464,6 @@ public:
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif


+ 0
- 3
source/backend/plugin/VstPlugin.cpp View File

@@ -1211,7 +1211,6 @@ public:
value = ctrlEvent.value;
setDryWet(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
continue;
}

if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (fHints & PLUGIN_CAN_VOLUME) > 0)
@@ -1219,7 +1218,6 @@ public:
value = ctrlEvent.value*127.0f/100.0f;
setVolume(value, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
continue;
}

if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (fHints & PLUGIN_CAN_BALANCE) > 0)
@@ -1247,7 +1245,6 @@ public:
setBalanceRight(right, false, false);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
continue;
}
}
#endif


Loading…
Cancel
Save