Browse Source

Add API for ctrlChannel and options

tags/1.9.4
falkTX 11 years ago
parent
commit
84336c4ba5
19 changed files with 378 additions and 227 deletions
  1. +9
    -19
      resources/ui/carla_edit.ui
  2. +4
    -4
      source/backend/CarlaBackend.hpp
  3. +23
    -3
      source/backend/CarlaPlugin.hpp
  4. +8
    -3
      source/backend/CarlaStandalone.hpp
  5. +1
    -1
      source/backend/engine/Makefile
  6. +2
    -2
      source/backend/native/Makefile
  7. +57
    -4
      source/backend/plugin/CarlaPlugin.cpp
  8. +5
    -2
      source/backend/plugin/CarlaPluginInternal.hpp
  9. +5
    -5
      source/backend/plugin/DssiPlugin.cpp
  10. +9
    -9
      source/backend/plugin/FluidSynthPlugin.cpp
  11. +2
    -2
      source/backend/plugin/LadspaPlugin.cpp
  12. +1
    -1
      source/backend/plugin/Makefile
  13. +5
    -5
      source/backend/plugin/NativePlugin.cpp
  14. +155
    -123
      source/backend/standalone/CarlaStandalone.cpp
  15. +1
    -1
      source/bridges/CarlaBridgePlugin.cpp
  16. +26
    -26
      source/carla.py
  17. +28
    -14
      source/carla_backend.py
  18. +2
    -3
      source/carla_shared.py
  19. +35
    -0
      source/utils/CarlaBackendUtils.hpp

+ 9
- 19
resources/ui/carla_edit.ui View File

@@ -293,7 +293,7 @@ Plugin Name
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="checkBox">
<widget class="QCheckBox" name="ch_fixed_buffer">
<property name="enabled">
<bool>false</bool>
</property>
@@ -303,7 +303,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_2">
<widget class="QCheckBox" name="ch_force_stereo">
<property name="enabled">
<bool>false</bool>
</property>
@@ -313,7 +313,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_3">
<widget class="QCheckBox" name="ch_self_automation">
<property name="enabled">
<bool>false</bool>
</property>
@@ -323,7 +323,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_4">
<widget class="QCheckBox" name="ch_use_chunks">
<property name="enabled">
<bool>false</bool>
</property>
@@ -333,7 +333,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_5">
<widget class="QCheckBox" name="ch_send_all_sound_off">
<property name="enabled">
<bool>false</bool>
</property>
@@ -343,17 +343,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_6">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Send Note-Off Velocity</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_7">
<widget class="QCheckBox" name="ch_send_note_aftertouch">
<property name="enabled">
<bool>false</bool>
</property>
@@ -363,7 +353,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_8">
<widget class="QCheckBox" name="ch_send_pitchbend">
<property name="enabled">
<bool>false</bool>
</property>
@@ -513,7 +503,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label_ctrl_channel">
<property name="enabled">
<bool>false</bool>
</property>
@@ -523,7 +513,7 @@ Plugin Name
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox">
<widget class="QSpinBox" name="sb_ctrl_channel">
<property name="enabled">
<bool>false</bool>
</property>


+ 4
- 4
source/backend/CarlaBackend.hpp View File

@@ -77,9 +77,8 @@ const unsigned int PLUGIN_OPTION_FORCE_STEREO = 0x002; //!< OFF: Force m
const unsigned int PLUGIN_OPTION_SELF_AUTOMATION = 0x004; //!< OFF: Let the plugin handle MIDI-CC automation, not the host
const unsigned int PLUGIN_OPTION_USE_CHUNKS = 0x008; //!< ON: Use chunks to save data
const unsigned int PLUGIN_OPTION_SEND_ALL_SOUND_OFF = 0x010; //!< ON: Send MIDI ALL_SOUND_OFF / ALL_NOTES_OFF events
const unsigned int PLUGIN_OPTION_SEND_NOTE_OFF_VELO = 0x020; //!< OFF: Send MIDI Note-Off events with a velocity value
const unsigned int PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH = 0x040; //!< ON: Send MIDI Note aftertouch events
const unsigned int PLUGIN_OPTION_SEND_PITCHBEND = 0x080; //!< ON: Send MIDI Pitchbend events
const unsigned int PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH = 0x020; //!< ON: Send MIDI Note aftertouch events
const unsigned int PLUGIN_OPTION_SEND_PITCHBEND = 0x040; //!< ON: Send MIDI Pitchbend events
#ifdef WANT_VST
const unsigned int PLUGIN_OPTION_VST_SUPPLY_IDLE = 0x100; //!< ON: Idle Plugin's custom GUI (VST only)
const unsigned int PLUGIN_OPTION_VST_UPDATE_DISPLAY = 0x200; //!< ON: Recheck plugin properties on updateDisplay message (VST Only)
@@ -205,7 +204,8 @@ enum InternalParametersIndex {
PARAMETER_BALANCE_LEFT = -5, //!< Stereo Balance-Left parameter, range -1.0...1.0; default is -1.0.
PARAMETER_BALANCE_RIGHT = -6, //!< Stereo Balance-Right parameter, range -1.0...1.0; default is 1.0.
PARAMETER_PANNING = -7, //!< Mono Panning parameter, range -1.0...1.0; default is 0.0.
PARAMETER_MAX = -8 //!< Max value, defined for convenience
PARAMETER_CTRL_CHANNEL = -8, //!< MIDI Control channel
PARAMETER_MAX = -9 //!< Max value, defined for convenience
};

/*!


+ 23
- 3
source/backend/CarlaPlugin.hpp View File

@@ -88,8 +88,6 @@ struct SaveState;
*/
struct CarlaPluginProtectedData;

class CarlaEngineAudioPort;

/*!
* \class CarlaPlugin
*
@@ -154,7 +152,7 @@ public:
/*!
* Get the plugin's options.
*
* \see PluginOptions
* \see PluginOptions, availableOptions() and setOption()
*/
unsigned int options() const
{
@@ -325,6 +323,13 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

/*!
* Get the plugin available options.
*
* \see PluginOptions
*/
virtual unsigned int availableOptions();

/*!
* Get the current parameter value of \a parameterId.
*/
@@ -432,6 +437,13 @@ public:
*/
void setId(const unsigned int id);

/*!
* Set a plugin's option.
*
* \see options()
*/
void setOption(const unsigned int option, const bool yesNo);

/*!
* Enable or disable the plugin according to \a yesNo.
*
@@ -501,6 +513,14 @@ public:
*/
void setPanning(const float value, const bool sendOsc, const bool sendCallback);

/*!
* Set the plugin's midi control channel.
*
* \param sendOsc Send message change over OSC
* \param sendCallback Send message change to registered callback
*/
void setCtrlChannel(const int8_t channel, const bool sendOsc, const bool sendCallback);

// -------------------------------------------------------------------
// Set data (plugin-specific stuff)



+ 8
- 3
source/backend/CarlaStandalone.hpp View File

@@ -38,6 +38,8 @@ struct CarlaPluginInfo {
CarlaPluginType type;
CarlaPluginCategory category;
unsigned int hints;
unsigned int optionsAvailable;
unsigned int optionsEnabled;
const char* binary;
const char* name;
const char* label;
@@ -50,6 +52,8 @@ struct CarlaPluginInfo {
: type(CarlaBackend::PLUGIN_NONE),
category(CarlaBackend::PLUGIN_CATEGORY_NONE),
hints(0x0),
optionsAvailable(0x0),
optionsEnabled(0x0),
binary(nullptr),
name(nullptr),
label(nullptr),
@@ -160,6 +164,8 @@ CARLA_EXPORT bool carla_engine_close();
CARLA_EXPORT void carla_engine_idle();
CARLA_EXPORT bool carla_is_engine_running();
CARLA_EXPORT void carla_set_engine_about_to_close();
CARLA_EXPORT void carla_set_engine_callback(CarlaCallbackFunc func, void* ptr);
CARLA_EXPORT void carla_set_engine_option(CarlaOptionsType option, int value, const char* valueStr);

CARLA_EXPORT bool carla_load_project(const char* filename);
CARLA_EXPORT bool carla_save_project(const char* filename);
@@ -203,12 +209,14 @@ CARLA_EXPORT float carla_get_current_parameter_value(unsigned int pluginId, uint
CARLA_EXPORT float carla_get_input_peak_value(unsigned int pluginId, unsigned short portId);
CARLA_EXPORT float carla_get_output_peak_value(unsigned int pluginId, unsigned short portId);

CARLA_EXPORT void carla_set_option(unsigned int pluginId, unsigned int option, bool yesNo);
CARLA_EXPORT void carla_set_active(unsigned int pluginId, bool onOff);
CARLA_EXPORT void carla_set_drywet(unsigned int pluginId, float value);
CARLA_EXPORT void carla_set_volume(unsigned int pluginId, float value);
CARLA_EXPORT void carla_set_balance_left(unsigned int pluginId, float value);
CARLA_EXPORT void carla_set_balance_right(unsigned int pluginId, float value);
CARLA_EXPORT void carla_set_panning(unsigned int pluginId, float value);
CARLA_EXPORT void carla_set_ctrl_channel(unsigned int pluginId, int8_t channel);

CARLA_EXPORT void carla_set_parameter_value(unsigned int pluginId, uint32_t parameterId, float value);
CARLA_EXPORT void carla_set_parameter_midi_channel(unsigned int pluginId, uint32_t parameterId, uint8_t channel);
@@ -229,9 +237,6 @@ CARLA_EXPORT double carla_get_sample_rate();
CARLA_EXPORT const char* carla_get_last_error();
CARLA_EXPORT const char* carla_get_host_osc_url();

CARLA_EXPORT void carla_set_callback_function(CarlaCallbackFunc func, void* ptr);
CARLA_EXPORT void carla_set_option(CarlaOptionsType option, int value, const char* valueStr);

#if 0
CARLA_EXPORT void carla_nsm_announce(const char* url, int pid);
CARLA_EXPORT void carla_nsm_reply_open();


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

@@ -70,7 +70,7 @@ debug:

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

%.cpp.o: %.cpp
%.cpp.o: %.cpp ../CarlaEngine.hpp CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

$(SHARED): $(OBJS) $(LIBS)


+ 2
- 2
source/backend/native/Makefile View File

@@ -14,13 +14,13 @@ LINK_FLAGS += $(shell pkg-config --libs QtGui gl)

ifeq ($(HAVE_AF_DEPS),true)
AF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
AF_CXX_FLAGS += $(shell pkg-config --cflags libavcodec libavformat sndfile) -dpthread
AF_CXX_FLAGS += $(shell pkg-config --cflags libavcodec libavformat sndfile) -pthread
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat sndfile) -lpthread
endif

ifeq ($(HAVE_ZYN_DEPS),true)
ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml) -dpthread
ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml) -pthread
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml) -lpthread
endif



+ 57
- 4
source/backend/plugin/CarlaPlugin.cpp View File

@@ -70,14 +70,14 @@ CarlaPlugin::CarlaPlugin(CarlaEngine* const engine, const unsigned int id)
{
case PROCESS_MODE_SINGLE_CLIENT:
case PROCESS_MODE_MULTIPLE_CLIENTS:
kData->ctrlInChannel = 0;
kData->ctrlChannel = 0;
break;

case PROCESS_MODE_CONTINUOUS_RACK:
CARLA_ASSERT(id < MAX_RACK_PLUGINS && id < MAX_MIDI_CHANNELS);

if (id < MAX_RACK_PLUGINS && id < MAX_MIDI_CHANNELS)
kData->ctrlInChannel = id;
kData->ctrlChannel = id;

break;

@@ -240,6 +240,11 @@ int32_t CarlaPlugin::chunkData(void** const dataPtr)
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int CarlaPlugin::availableOptions()
{
return kData->availOptions;
}

float CarlaPlugin::getParameterValue(const uint32_t parameterId)
{
CARLA_ASSERT(parameterId < parameterCount());
@@ -403,7 +408,23 @@ void CarlaPlugin::setId(const unsigned int id)
fId = id;

if (kData->engine->getProccessMode() == PROCESS_MODE_CONTINUOUS_RACK)
kData->ctrlInChannel = id;
{
CARLA_ASSERT(id < MAX_RACK_PLUGINS);

if (id >= MAX_RACK_PLUGINS || kData->ctrlChannel == static_cast<int8_t>(id))
return;

kData->ctrlChannel = id;
kData->engine->callback(CALLBACK_PARAMETER_VALUE_CHANGED, fId, PARAMETER_CTRL_CHANNEL, 0, id, nullptr);
}
}

void CarlaPlugin::setOption(const unsigned int option, const bool yesNo)
{
if (yesNo)
fOptions |= option;
else
fOptions &= ~option;
}

void CarlaPlugin::setEnabled(const bool yesNo)
@@ -553,6 +574,36 @@ void CarlaPlugin::setPanning(const float value, const bool sendOsc, const bool s
#endif
}

void CarlaPlugin::setCtrlChannel(const int8_t channel, const bool sendOsc, const bool sendCallback)
{
CARLA_SAFE_ASSERT(kData->engine->getProccessMode() != PROCESS_MODE_CONTINUOUS_RACK);

if (kData->engine->getProccessMode() == PROCESS_MODE_CONTINUOUS_RACK)
return;

if (kData->ctrlChannel != channel)
{
kData->ctrlChannel = channel;

#ifndef BUILD_BRIDGE
const float ctrlf = channel;

if (sendOsc)
kData->engine->osc_send_control_set_parameter_value(fId, PARAMETER_CTRL_CHANNEL, ctrlf);
#else
// unused
(void)sendOsc;
#endif

if (sendCallback)
kData->engine->callback(CALLBACK_PARAMETER_VALUE_CHANGED, fId, PARAMETER_CTRL_CHANNEL, 0, channel, nullptr);
#ifndef BUILD_BRIDGE
else if (fHints & PLUGIN_IS_BRIDGE)
osc_send_control(&kData->osc.data, PARAMETER_CTRL_CHANNEL, ctrlf);
#endif
}
}

// -------------------------------------------------------------------
// Set data (plugin-specific stuff)

@@ -595,6 +646,8 @@ void CarlaPlugin::setParameterValueByRIndex(const int32_t rindex, const float va
return setBalanceRight(value, sendOsc, sendCallback);
if (rindex == PARAMETER_PANNING)
return setPanning(value, sendOsc, sendCallback);
if (rindex == PARAMETER_CTRL_CHANNEL)
return setCtrlChannel(int8_t(value), sendOsc, sendCallback);

for (uint32_t i=0; i < kData->param.count; i++)
{
@@ -1171,7 +1224,7 @@ void CarlaPlugin::sendMidiAllNotesOff()

PluginPostRtEvent postEvent;
postEvent.type = kPluginPostRtEventNoteOff;
postEvent.value1 = kData->ctrlInChannel;
postEvent.value1 = kData->ctrlChannel;
postEvent.value2 = 0;
postEvent.value3 = 0.0;



+ 5
- 2
source/backend/plugin/CarlaPluginInternal.hpp View File

@@ -392,9 +392,11 @@ struct CarlaPluginProtectedData {
void* lib;

// misc
int8_t ctrlInChannel;
unsigned int availOptions;
unsigned int extraHints;
int8_t ctrlChannel;

// latency
uint32_t latency;
float** latencyBuffers;

@@ -499,8 +501,9 @@ struct CarlaPluginProtectedData {
active(false),
activeBefore(false),
lib(nullptr),
ctrlInChannel(-1),
availOptions(0x0),
extraHints(0x0),
ctrlChannel(-1),
latency(0),
latencyBuffers(nullptr),
osc(engine_, plugin, mode) {}


+ 5
- 5
source/backend/plugin/DssiPlugin.cpp View File

@@ -993,7 +993,7 @@ public:
case kEngineControlEventTypeParameter:
{
// Control backend stuff
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
double value;

@@ -1077,12 +1077,12 @@ public:
}

case kEngineControlEventTypeMidiBank:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
nextBankId = ctrlEvent.param;
break;

case kEngineControlEventTypeMidiProgram:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
const uint32_t nextProgramId = ctrlEvent.param;

@@ -1099,7 +1099,7 @@ public:
break;

case kEngineControlEventTypeAllSoundOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (! allNotesOffSent)
sendMidiAllNotesOff();
@@ -1143,7 +1143,7 @@ public:
break;

case kEngineControlEventTypeAllNotesOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (! allNotesOffSent)
sendMidiAllNotesOff();


+ 9
- 9
source/backend/plugin/FluidSynthPlugin.cpp View File

@@ -365,7 +365,7 @@ public:
else if (index > static_cast<int32_t>(kData->midiprog.count))
return;

if (kData->ctrlInChannel < 0 || kData->ctrlInChannel >= 16)
if (kData->ctrlChannel < 0 || kData->ctrlChannel >= 16)
return;

// FIXME
@@ -377,12 +377,12 @@ public:
if (kData->engine->isOffline())
{
//const CarlaEngine::ScopedLocker m(x_engine, block);
fluid_synth_program_select(fSynth, kData->ctrlInChannel, fSynthId, bank, program);
fluid_synth_program_select(fSynth, kData->ctrlChannel, fSynthId, bank, program);
}
else
{
//const ScopedDisabler m(this, block);
fluid_synth_program_select(fSynth, kData->ctrlInChannel, fSynthId, bank, program);
fluid_synth_program_select(fSynth, kData->ctrlChannel, fSynthId, bank, program);
}
}

@@ -932,8 +932,8 @@ public:

uint32_t nextBankIds[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0 };

if (kData->midiprog.current >= 0 && kData->midiprog.count > 0 && kData->ctrlInChannel >= 0 && kData->ctrlInChannel < 16)
nextBankIds[kData->ctrlInChannel] = kData->midiprog.data[kData->midiprog.current].bank;
if (kData->midiprog.current >= 0 && kData->midiprog.count > 0 && kData->ctrlChannel >= 0 && kData->ctrlChannel < 16)
nextBankIds[kData->ctrlChannel] = kData->midiprog.data[kData->midiprog.current].bank;

for (i=0; i < nEvents; i++)
{
@@ -974,7 +974,7 @@ public:
case kEngineControlEventTypeParameter:
{
// Control backend stuff
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
double value;

@@ -1072,7 +1072,7 @@ public:
{
if (kData->midiprog.data[k].bank == bankId && kData->midiprog.data[k].program == progId)
{
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
setMidiProgram(k, false, false, false, false);
postponeRtEvent(kPluginPostRtEventMidiProgramChange, k, 0, 0.0);
@@ -1087,7 +1087,7 @@ public:
break;

case kEngineControlEventTypeAllSoundOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (! allNotesOffSent)
sendMidiAllNotesOff();
@@ -1100,7 +1100,7 @@ public:
break;

case kEngineControlEventTypeAllNotesOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (! allNotesOffSent)
sendMidiAllNotesOff();


+ 2
- 2
source/backend/plugin/LadspaPlugin.cpp View File

@@ -837,7 +837,7 @@ public:
case kEngineControlEventTypeParameter:
{
// Control backend stuff
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
double value;

@@ -925,7 +925,7 @@ public:
break;

case kEngineControlEventTypeAllSoundOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (fDescriptor->deactivate != nullptr)
{


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

@@ -55,7 +55,7 @@ debug:

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

%.cpp.o: %.cpp
%.cpp.o: %.cpp ../CarlaPlugin.hpp CarlaPluginInternal.hpp CarlaPluginThread.hpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

$(SHARED): $(OBJS) $(LIBS)


+ 5
- 5
source/backend/plugin/NativePlugin.cpp View File

@@ -1115,7 +1115,7 @@ public:
case kEngineControlEventTypeParameter:
{
// Control backend stuff
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
double value;

@@ -1199,12 +1199,12 @@ public:
}

case kEngineControlEventTypeMidiBank:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
nextBankId = ctrlEvent.param;
break;

case kEngineControlEventTypeMidiProgram:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
const uint32_t nextProgramId = ctrlEvent.param;

@@ -1221,7 +1221,7 @@ public:
break;

case kEngineControlEventTypeAllSoundOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (! allNotesOffSent)
sendMidiAllNotesOff();
@@ -1262,7 +1262,7 @@ public:
break;

case kEngineControlEventTypeAllNotesOff:
if (event.channel == kData->ctrlInChannel)
if (event.channel == kData->ctrlChannel)
{
if (! allNotesOffSent)
sendMidiAllNotesOff();


+ 155
- 123
source/backend/standalone/CarlaStandalone.cpp View File

@@ -319,6 +319,127 @@ void carla_set_engine_about_to_close()
standalone.engine->setAboutToClose();
}

void carla_set_engine_callback(CarlaBackend::CallbackFunc func, void* ptr)
{
carla_debug("carla_set_engine_callback(%p)", func);

standalone.callback = func;
standalone.callbackPtr = ptr;

if (standalone.engine != nullptr)
standalone.engine->setCallback(func, ptr);
}

void carla_set_engine_option(CarlaBackend::OptionsType option, int value, const char* valueStr)
{
carla_debug("carla_set_engine_option(%s, %i, \"%s\")", CarlaBackend::OptionsType2Str(option), value, valueStr);

#ifndef BUILD_BRIDGE
if (standalone.engine != nullptr)
standalone.engine->setOption(option, value, valueStr);
#endif

switch (option)
{
case CarlaBackend::OPTION_PROCESS_NAME:
standalone.procName = valueStr;
break;

case CarlaBackend::OPTION_PROCESS_MODE:
if (value < CarlaBackend::PROCESS_MODE_SINGLE_CLIENT || value > CarlaBackend::PROCESS_MODE_PATCHBAY)
return carla_stderr2("carla_set_engine_option(OPTION_PROCESS_MODE, %i, \"%s\") - invalid value", value, valueStr);

standalone.options.processMode = static_cast<CarlaBackend::ProcessMode>(value);
break;

case CarlaBackend::OPTION_FORCE_STEREO:
standalone.options.forceStereo = (value != 0);
break;

case CarlaBackend::OPTION_PREFER_PLUGIN_BRIDGES:
standalone.options.preferPluginBridges = (value != 0);
break;

case CarlaBackend::OPTION_PREFER_UI_BRIDGES:
standalone.options.preferUiBridges = (value != 0);
break;

#ifdef WANT_DSSI
case CarlaBackend::OPTION_USE_DSSI_VST_CHUNKS:
standalone.options.useDssiVstChunks = (value != 0);
break;
#endif

case CarlaBackend::OPTION_MAX_PARAMETERS:
standalone.options.maxParameters = (value > 0) ? static_cast<unsigned int>(value) : CarlaBackend::MAX_DEFAULT_PARAMETERS;
break;

case CarlaBackend::OPTION_OSC_UI_TIMEOUT:
standalone.options.oscUiTimeout = static_cast<unsigned int>(value);
break;

case CarlaBackend::OPTION_PREFERRED_BUFFER_SIZE:
standalone.options.preferredBufferSize = static_cast<unsigned int>(value);
break;

case CarlaBackend::OPTION_PREFERRED_SAMPLE_RATE:
standalone.options.preferredSampleRate = static_cast<unsigned int>(value);
break;

#ifndef BUILD_BRIDGE
case CarlaBackend::OPTION_PATH_BRIDGE_NATIVE:
standalone.options.bridge_native = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_POSIX32:
standalone.options.bridge_posix32 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_POSIX64:
standalone.options.bridge_posix64 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_WIN32:
standalone.options.bridge_win32 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_WIN64:
standalone.options.bridge_win64 = valueStr;
break;
#endif
#ifdef WANT_LV2
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_GTK2:
standalone.options.bridge_lv2gtk2 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_GTK3:
standalone.options.bridge_lv2gtk3 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_QT4:
standalone.options.bridge_lv2qt4 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_QT5:
standalone.options.bridge_lv2qt5 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_COCOA:
standalone.options.bridge_lv2cocoa = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_WINDOWS:
standalone.options.bridge_lv2win = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_X11:
standalone.options.bridge_lv2x11 = valueStr;
break;
#endif
#ifdef WANT_VST
case CarlaBackend::OPTION_PATH_BRIDGE_VST_COCOA:
standalone.options.bridge_vstcocoa = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_VST_HWND:
standalone.options.bridge_vsthwnd = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_VST_X11:
standalone.options.bridge_vstx11 = valueStr;
break;
#endif
}
}

// -------------------------------------------------------------------------------------------------------------------

bool carla_load_project(const char* filename)
@@ -395,10 +516,13 @@ const CarlaPluginInfo* carla_get_plugin_info(unsigned int pluginId)
info.type = CarlaBackend::PLUGIN_NONE;
info.category = CarlaBackend::PLUGIN_CATEGORY_NONE;
info.hints = 0x0;
info.hints = 0x0;
info.binary = nullptr;
info.name = nullptr;
info.uniqueId = 0;
info.latency = 0;
info.optionsAvailable = 0x0;
info.optionsEnabled = 0x0;

// cleanup
if (info.label != nullptr)
@@ -436,6 +560,9 @@ const CarlaPluginInfo* carla_get_plugin_info(unsigned int pluginId)
info.uniqueId = plugin->uniqueId();
info.latency = plugin->latency();

info.optionsAvailable = plugin->availableOptions();
info.optionsEnabled = plugin->options();

plugin->getLabel(strBufLabel);
info.label = carla_strdup(strBufLabel);

@@ -1061,6 +1188,20 @@ float carla_get_output_peak_value(unsigned int pluginId, unsigned short portId)

// -------------------------------------------------------------------------------------------------------------------

void carla_set_option(unsigned int pluginId, unsigned int option, bool yesNo)
{
carla_debug("carla_set_option(%i, %i, %s)", pluginId, option, bool2str(yesNo));
CARLA_ASSERT(standalone.engine != nullptr);

if (standalone.engine == nullptr)
return;

if (CarlaPlugin* const plugin = standalone.engine->getPlugin(pluginId))
return plugin->setOption(option, yesNo);

carla_stderr2("carla_set_option(%i, %i, %s) - could not find plugin", pluginId, option, bool2str(yesNo));
}

void carla_set_active(unsigned int pluginId, bool onOff)
{
carla_debug("carla_set_active(%i, %s)", pluginId, bool2str(onOff));
@@ -1145,6 +1286,20 @@ void carla_set_panning(unsigned int pluginId, float value)
carla_stderr2("carla_set_panning(%i, %f) - could not find plugin", pluginId, value);
}

void carla_set_ctrl_channel(unsigned int pluginId, int8_t channel)
{
carla_debug("carla_set_ctrl_channel(%i, %i)", pluginId, channel);
CARLA_ASSERT(standalone.engine != nullptr);

if (standalone.engine == nullptr)
return;

if (CarlaPlugin* const plugin = standalone.engine->getPlugin(pluginId))
return plugin->setCtrlChannel(channel, true, false);

carla_stderr2("carla_set_ctrl_channel(%i, %i) - could not find plugin", pluginId, channel);
}

// -------------------------------------------------------------------------------------------------------------------

void carla_set_parameter_value(unsigned int pluginId, uint32_t parameterId, float value)
@@ -1392,129 +1547,6 @@ const char* carla_get_host_osc_url()
return standalone.engine->getOscServerPathTCP();
}

// -------------------------------------------------------------------------------------------------------------------

void carla_set_callback_function(CarlaBackend::CallbackFunc func, void* ptr)
{
carla_debug("carla_set_callback_function(%p)", func);

standalone.callback = func;
standalone.callbackPtr = ptr;

if (standalone.engine != nullptr)
standalone.engine->setCallback(func, ptr);
}

void carla_set_option(CarlaBackend::OptionsType option, int value, const char* valueStr)
{
carla_debug("carla_set_option(%s, %i, \"%s\")", CarlaBackend::OptionsType2Str(option), value, valueStr);

#ifndef BUILD_BRIDGE
if (standalone.engine != nullptr)
standalone.engine->setOption(option, value, valueStr);
#endif

switch (option)
{
case CarlaBackend::OPTION_PROCESS_NAME:
standalone.procName = valueStr;
break;

case CarlaBackend::OPTION_PROCESS_MODE:
if (value < CarlaBackend::PROCESS_MODE_SINGLE_CLIENT || value > CarlaBackend::PROCESS_MODE_PATCHBAY)
return carla_stderr2("carla_set_option(OPTION_PROCESS_MODE, %i, \"%s\") - invalid value", value, valueStr);

standalone.options.processMode = static_cast<CarlaBackend::ProcessMode>(value);
break;

case CarlaBackend::OPTION_FORCE_STEREO:
standalone.options.forceStereo = (value != 0);
break;

case CarlaBackend::OPTION_PREFER_PLUGIN_BRIDGES:
standalone.options.preferPluginBridges = (value != 0);
break;

case CarlaBackend::OPTION_PREFER_UI_BRIDGES:
standalone.options.preferUiBridges = (value != 0);
break;

#ifdef WANT_DSSI
case CarlaBackend::OPTION_USE_DSSI_VST_CHUNKS:
standalone.options.useDssiVstChunks = (value != 0);
break;
#endif

case CarlaBackend::OPTION_MAX_PARAMETERS:
standalone.options.maxParameters = (value > 0) ? static_cast<unsigned int>(value) : CarlaBackend::MAX_DEFAULT_PARAMETERS;
break;

case CarlaBackend::OPTION_OSC_UI_TIMEOUT:
standalone.options.oscUiTimeout = static_cast<unsigned int>(value);
break;

case CarlaBackend::OPTION_PREFERRED_BUFFER_SIZE:
standalone.options.preferredBufferSize = static_cast<unsigned int>(value);
break;

case CarlaBackend::OPTION_PREFERRED_SAMPLE_RATE:
standalone.options.preferredSampleRate = static_cast<unsigned int>(value);
break;

#ifndef BUILD_BRIDGE
case CarlaBackend::OPTION_PATH_BRIDGE_NATIVE:
standalone.options.bridge_native = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_POSIX32:
standalone.options.bridge_posix32 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_POSIX64:
standalone.options.bridge_posix64 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_WIN32:
standalone.options.bridge_win32 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_WIN64:
standalone.options.bridge_win64 = valueStr;
break;
#endif
#ifdef WANT_LV2
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_GTK2:
standalone.options.bridge_lv2gtk2 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_GTK3:
standalone.options.bridge_lv2gtk3 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_QT4:
standalone.options.bridge_lv2qt4 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_QT5:
standalone.options.bridge_lv2qt5 = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_COCOA:
standalone.options.bridge_lv2cocoa = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_WINDOWS:
standalone.options.bridge_lv2win = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_LV2_X11:
standalone.options.bridge_lv2x11 = valueStr;
break;
#endif
#ifdef WANT_VST
case CarlaBackend::OPTION_PATH_BRIDGE_VST_COCOA:
standalone.options.bridge_vstcocoa = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_VST_HWND:
standalone.options.bridge_vsthwnd = valueStr;
break;
case CarlaBackend::OPTION_PATH_BRIDGE_VST_X11:
standalone.options.bridge_vstx11 = valueStr;
break;
#endif
}
}

#if 0
// -------------------------------------------------------------------------------------------------------------------



+ 1
- 1
source/bridges/CarlaBridgePlugin.cpp View File

@@ -158,7 +158,7 @@ public:
carla_debug("CarlaPluginClient::CarlaPluginClient()");

carla_engine_init("JACK", name);
carla_set_callback_function(callback, this);
carla_set_engine_callback(callback, this);
}

~CarlaPluginClient()


+ 26
- 26
source/carla.py View File

@@ -626,15 +626,15 @@ class CarlaMainW(QMainWindow):
print("LADISH detected but using multiple clients (not allowed), forcing single client now")
Carla.processMode = PROCESS_MODE_SINGLE_CLIENT

Carla.host.set_option(OPTION_PROCESS_MODE, Carla.processMode, "")
Carla.host.set_option(OPTION_MAX_PARAMETERS, Carla.maxParameters, "")
Carla.host.set_option(OPTION_FORCE_STEREO, forceStereo, "")
Carla.host.set_option(OPTION_PREFER_PLUGIN_BRIDGES, preferPluginBridges, "")
Carla.host.set_option(OPTION_PREFER_UI_BRIDGES, preferUiBridges, "")
Carla.host.set_option(OPTION_USE_DSSI_VST_CHUNKS, useDssiVstChunks, "")
Carla.host.set_option(OPTION_OSC_UI_TIMEOUT, oscUiTimeout, "")
Carla.host.set_option(OPTION_PREFERRED_BUFFER_SIZE, preferredBufferSize, "")
Carla.host.set_option(OPTION_PREFERRED_SAMPLE_RATE, preferredSampleRate, "")
Carla.host.set_engine_option(OPTION_PROCESS_MODE, Carla.processMode, "")
Carla.host.set_engine_option(OPTION_MAX_PARAMETERS, Carla.maxParameters, "")
Carla.host.set_engine_option(OPTION_FORCE_STEREO, forceStereo, "")
Carla.host.set_engine_option(OPTION_PREFER_PLUGIN_BRIDGES, preferPluginBridges, "")
Carla.host.set_engine_option(OPTION_PREFER_UI_BRIDGES, preferUiBridges, "")
Carla.host.set_engine_option(OPTION_USE_DSSI_VST_CHUNKS, useDssiVstChunks, "")
Carla.host.set_engine_option(OPTION_OSC_UI_TIMEOUT, oscUiTimeout, "")
Carla.host.set_engine_option(OPTION_PREFERRED_BUFFER_SIZE, preferredBufferSize, "")
Carla.host.set_engine_option(OPTION_PREFERRED_SAMPLE_RATE, preferredSampleRate, "")

# ---------------------------------------------
# Start
@@ -1265,57 +1265,57 @@ if __name__ == '__main__':

# Init backend
Carla.host = Host(libPrefix)
Carla.host.set_callback_function(callbackFunction)
Carla.host.set_option(OPTION_PROCESS_NAME, 0, "carla")
Carla.host.set_engine_callback(callbackFunction)
Carla.host.set_engine_option(OPTION_PROCESS_NAME, 0, "carla")

# Set bridge paths
if carla_bridge_native:
Carla.host.set_option(OPTION_PATH_BRIDGE_NATIVE, 0, carla_bridge_native)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_NATIVE, 0, carla_bridge_native)

if carla_bridge_posix32:
Carla.host.set_option(OPTION_PATH_BRIDGE_POSIX32, 0, carla_bridge_posix32)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_POSIX32, 0, carla_bridge_posix32)

if carla_bridge_posix64:
Carla.host.set_option(OPTION_PATH_BRIDGE_POSIX64, 0, carla_bridge_posix64)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_POSIX64, 0, carla_bridge_posix64)

if carla_bridge_win32:
Carla.host.set_option(OPTION_PATH_BRIDGE_WIN32, 0, carla_bridge_win32)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_WIN32, 0, carla_bridge_win32)

if carla_bridge_win64:
Carla.host.set_option(OPTION_PATH_BRIDGE_WIN64, 0, carla_bridge_win64)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_WIN64, 0, carla_bridge_win64)

if WINDOWS:
if carla_bridge_lv2_windows:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_WINDOWS, 0, carla_bridge_lv2_windows)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_WINDOWS, 0, carla_bridge_lv2_windows)

if carla_bridge_vst_hwnd:
Carla.host.set_option(OPTION_PATH_BRIDGE_VST_HWND, 0, carla_bridge_vst_hwnd)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_VST_HWND, 0, carla_bridge_vst_hwnd)

elif MACOS:
if carla_bridge_lv2_cocoa:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_COCOA, 0, carla_bridge_lv2_cocoa)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_COCOA, 0, carla_bridge_lv2_cocoa)

if carla_bridge_vst_cocoa:
Carla.host.set_option(OPTION_PATH_BRIDGE_VST_COCOA, 0, carla_bridge_vst_cocoa)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_VST_COCOA, 0, carla_bridge_vst_cocoa)

else:
if carla_bridge_lv2_gtk2:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_GTK2, 0, carla_bridge_lv2_gtk2)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_GTK2, 0, carla_bridge_lv2_gtk2)

if carla_bridge_lv2_gtk3:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_GTK3, 0, carla_bridge_lv2_gtk3)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_GTK3, 0, carla_bridge_lv2_gtk3)

if carla_bridge_lv2_qt4:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_QT4, 0, carla_bridge_lv2_qt4)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_QT4, 0, carla_bridge_lv2_qt4)

if carla_bridge_lv2_qt5:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_QT5, 0, carla_bridge_lv2_qt5)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_QT5, 0, carla_bridge_lv2_qt5)

if carla_bridge_lv2_x11:
Carla.host.set_option(OPTION_PATH_BRIDGE_LV2_X11, 0, carla_bridge_lv2_x11)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_LV2_X11, 0, carla_bridge_lv2_x11)

if carla_bridge_vst_x11:
Carla.host.set_option(OPTION_PATH_BRIDGE_VST_X11, 0, carla_bridge_vst_x11)
Carla.host.set_engine_option(OPTION_PATH_BRIDGE_VST_X11, 0, carla_bridge_vst_x11)

# Create GUI and start engine
Carla.gui = CarlaMainW()


+ 28
- 14
source/carla_backend.py View File

@@ -83,6 +83,8 @@ class CarlaPluginInfo(Structure):
("type", c_enum),
("category", c_enum),
("hints", c_uint),
("optionsAvailable", c_uint),
("optionsEnabled", c_uint),
("binary", c_char_p),
("name", c_char_p),
("label", c_char_p),
@@ -173,10 +175,16 @@ class Host(object):

self.lib.carla_is_engine_running.argtypes = None
self.lib.carla_is_engine_running.restype = c_bool
self.lib.carla_set_engine_about_to_close.argtypes = None
self.lib.carla_set_engine_about_to_close.restype = None

self.lib.carla_set_engine_callback.argtypes = [CallbackFunc, c_void_p]
self.lib.carla_set_engine_callback.restype = None

self.lib.carla_set_engine_option.argtypes = [c_enum, c_int, c_char_p]
self.lib.carla_set_engine_option.restype = None

self.lib.carla_load_project.argtypes = [c_char_p]
self.lib.carla_load_project.restype = c_bool

@@ -269,6 +277,9 @@ class Host(object):
self.lib.carla_get_output_peak_value.argtypes = [c_uint, c_ushort]
self.lib.carla_get_output_peak_value.restype = c_float

self.lib.carla_set_option.argtypes = [c_uint, c_uint, c_bool]
self.lib.carla_set_option.restype = None

self.lib.carla_set_active.argtypes = [c_uint, c_bool]
self.lib.carla_set_active.restype = None

@@ -287,6 +298,9 @@ class Host(object):
self.lib.carla_set_panning.argtypes = [c_uint, c_float]
self.lib.carla_set_panning.restype = None

self.lib.carla_set_ctrl_channel.argtypes = [c_uint, c_int8]
self.lib.carla_set_ctrl_channel.restype = None

self.lib.carla_set_parameter_value.argtypes = [c_uint, c_uint32, c_float]
self.lib.carla_set_parameter_value.restype = None

@@ -329,12 +343,6 @@ class Host(object):
self.lib.carla_get_host_osc_url.argtypes = None
self.lib.carla_get_host_osc_url.restype = c_char_p

self.lib.carla_set_callback_function.argtypes = [CallbackFunc]
self.lib.carla_set_callback_function.restype = None

self.lib.carla_set_option.argtypes = [c_enum, c_int, c_char_p]
self.lib.carla_set_option.restype = None

#self.lib.nsm_announce.argtypes = [c_char_p, c_int]
#self.lib.nsm_announce.restype = None

@@ -374,6 +382,13 @@ class Host(object):
def set_engine_about_to_close(self):
self.lib.carla_set_engine_about_to_close()

def set_engine_callback(self, func):
self._callback = CallbackFunc(func)
self.lib.carla_set_engine_callback(self._callback, c_nullptr)

def set_engine_option(self, option, value, valueStr):
self.lib.carla_set_engine_option(option, value, valueStr.encode("utf-8"))

def load_project(self, filename):
return self.lib.carla_load_project(filename.encode("utf-8"))

@@ -465,6 +480,9 @@ class Host(object):
def get_output_peak_value(self, pluginId, portId):
return self.lib.carla_get_output_peak_value(pluginId, portId)

def set_option(self, pluginId, option, yesNo):
self.lib.carla_set_option(pluginId, option, yesNo)

def set_active(self, pluginId, onOff):
self.lib.carla_set_active(pluginId, onOff)

@@ -483,6 +501,9 @@ class Host(object):
def set_panning(self, pluginId, value):
self.lib.carla_set_panning(pluginId, value)

def set_ctrl_channel(self, pluginId, channel):
self.lib.carla_set_ctrl_channel(pluginId, channel)

def set_parameter_value(self, pluginId, parameterId, value):
self.lib.carla_set_parameter_value(pluginId, parameterId, value)

@@ -525,13 +546,6 @@ class Host(object):
def get_sample_rate(self):
return self.lib.carla_get_sample_rate()

def set_callback_function(self, func):
self._callback = CallbackFunc(func)
self.lib.carla_set_callback_function(self._callback)

def set_option(self, option, value, valueStr):
self.lib.carla_set_option(option, value, valueStr.encode("utf-8"))

#def nsm_announce(self, url, pid):
#self.lib.nsm_announce(url.encode("utf-8"), pid)



+ 2
- 3
source/carla_shared.py View File

@@ -176,9 +176,8 @@ PLUGIN_OPTION_FORCE_STEREO = 0x002
PLUGIN_OPTION_SELF_AUTOMATION = 0x004
PLUGIN_OPTION_USE_CHUNKS = 0x008
PLUGIN_OPTION_SEND_ALL_SOUND_OFF = 0x010
PLUGIN_OPTION_SEND_NOTE_OFF_VELO = 0x020
PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH = 0x040
PLUGIN_OPTION_SEND_PITCHBEND = 0x080
PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH = 0x020
PLUGIN_OPTION_SEND_PITCHBEND = 0x040
PLUGIN_OPTION_VST_SUPPLY_IDLE = 0x100
PLUGIN_OPTION_VST_UPDATE_DISPLAY = 0x200



+ 35
- 0
source/utils/CarlaBackendUtils.hpp View File

@@ -25,6 +25,39 @@ CARLA_BACKEND_START_NAMESPACE

// -------------------------------------------------

static inline
const char* PluginOption2Str(const unsigned int& option)
{
switch (option)
{
case PLUGIN_OPTION_FIXED_BUFFER:
return "PLUGIN_OPTION_FIXED_BUFFER";
case PLUGIN_OPTION_FORCE_STEREO:
return "PLUGIN_OPTION_FORCE_STEREO";
case PLUGIN_OPTION_SELF_AUTOMATION:
return "PLUGIN_OPTION_SELF_AUTOMATION";
case PLUGIN_OPTION_USE_CHUNKS:
return "PLUGIN_OPTION_USE_CHUNKS";
case PLUGIN_OPTION_SEND_ALL_SOUND_OFF:
return "PLUGIN_OPTION_SEND_ALL_SOUND_OFF";
case PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH:
return "PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH";
case PLUGIN_OPTION_SEND_PITCHBEND:
return "PLUGIN_OPTION_SEND_PITCHBEND";
#ifdef WANT_VST
case PLUGIN_OPTION_VST_SUPPLY_IDLE:
return "PLUGIN_OPTION_VST_SUPPLY_IDLE";
case PLUGIN_OPTION_VST_UPDATE_DISPLAY:
return "PLUGIN_OPTION_VST_UPDATE_DISPLAY";
#endif
}

carla_stderr("CarlaBackend::PluginOption2Str(%i) - invalid type", option);
return nullptr;
}

// -------------------------------------------------

static inline
const char* BinaryType2Str(const BinaryType& type)
{
@@ -152,6 +185,8 @@ const char* InternalParametersIndex2Str(const InternalParametersIndex& index)
return "PARAMETER_BALANCE_RIGHT";
case PARAMETER_PANNING:
return "PARAMETER_PANNING";
case PARAMETER_CTRL_CHANNEL:
return "PARAMETER_CTRL_CHANNEL";
case PARAMETER_MAX:
return "PARAMETER_MAX";
}


Loading…
Cancel
Save