Browse Source

Automable is not a word, sorry!

Signed-off-by: falkTX <falktx@falktx.com>
pull/351/head
falkTX 3 years ago
parent
commit
14423c5eec
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
16 changed files with 35 additions and 31 deletions
  1. +2
    -2
      distrho/DistrhoInfo.hpp
  2. +8
    -4
      distrho/DistrhoPlugin.hpp
  3. +1
    -1
      distrho/src/DistrhoPluginCarla.cpp
  4. +2
    -2
      distrho/src/DistrhoPluginLV2export.cpp
  5. +2
    -2
      distrho/src/DistrhoPluginVST2.cpp
  6. +1
    -1
      distrho/src/DistrhoPluginVST3.cpp
  7. +2
    -2
      distrho/src/lv2/lv2_kxstudio_properties.h
  8. +1
    -1
      examples/CVPort/ExamplePluginCVPort.cpp
  9. +3
    -3
      examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp
  10. +2
    -2
      examples/ExternalUI/ExternalExamplePlugin.cpp
  11. +1
    -1
      examples/ImGuiSimpleGain/PluginSimpleGain.cpp
  12. +2
    -2
      examples/Info/InfoExamplePlugin.cpp
  13. +2
    -2
      examples/Latency/LatencyExamplePlugin.cpp
  14. +3
    -3
      examples/Meters/ExamplePluginMeters.cpp
  15. +1
    -1
      examples/Metronome/ExamplePluginMetronome.cpp
  16. +2
    -2
      examples/Parameters/ExamplePluginParameters.cpp

+ 2
- 2
distrho/DistrhoInfo.hpp View File

@@ -221,7 +221,7 @@ START_NAMESPACE_DISTRHO
{ {
// we only have one parameter so we can skip checking the index // we only have one parameter so we can skip checking the index


parameter.hints = kParameterIsAutomable;
parameter.hints = kParameterIsAutomatable;
parameter.name = "Gain"; parameter.name = "Gain";
parameter.symbol = "gain"; parameter.symbol = "gain";
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
@@ -331,7 +331,7 @@ START_NAMESPACE_DISTRHO
*/ */
void initParameter(uint32_t index, Parameter& parameter) override void initParameter(uint32_t index, Parameter& parameter) override
{ {
parameter.hints = kParameterIsAutomable;
parameter.hints = kParameterIsAutomatable;
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
parameter.ranges.max = 2.0f; parameter.ranges.max = 2.0f;
parameter.ranges.def = 1.0f; parameter.ranges.def = 1.0f;


+ 8
- 4
distrho/DistrhoPlugin.hpp View File

@@ -86,10 +86,14 @@ static const uint32_t kCVPortHasScaledRange = 0x80;
*/ */


/** /**
Parameter is automable (real-time safe).
Parameter is automatable (real-time safe).
@see Plugin::setParameterValue(uint32_t, float) @see Plugin::setParameterValue(uint32_t, float)
*/ */
static const uint32_t kParameterIsAutomable = 0x01;
static const uint32_t kParameterIsAutomatable = 0x01;

/** It was a typo, sorry.. */
DISTRHO_DEPRECATED_BY("kParameterIsAutomatable")
static const uint32_t kParameterIsAutomable = kParameterIsAutomatable;


/** /**
Parameter value is boolean.@n Parameter value is boolean.@n
@@ -563,7 +567,7 @@ struct Parameter {
case kParameterDesignationNull: case kParameterDesignationNull:
break; break;
case kParameterDesignationBypass: case kParameterDesignationBypass:
hints = kParameterIsAutomable|kParameterIsBoolean|kParameterIsInteger;
hints = kParameterIsAutomatable|kParameterIsBoolean|kParameterIsInteger;
name = "Bypass"; name = "Bypass";
shortName = "Bypass"; shortName = "Bypass";
symbol = "dpf_bypass"; symbol = "dpf_bypass";
@@ -1010,7 +1014,7 @@ protected:
/** /**
Change a parameter value.@n Change a parameter value.@n
The host may call this function from any context, including realtime processing.@n The host may call this function from any context, including realtime processing.@n
When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
When a parameter is marked as automatable, you must ensure no non-realtime operations are performed.
@note This function will only be called for parameter inputs. @note This function will only be called for parameter inputs.
*/ */
virtual void setParameterValue(uint32_t index, float value); virtual void setParameterValue(uint32_t index, float value);


+ 1
- 1
distrho/src/DistrhoPluginCarla.cpp View File

@@ -238,7 +238,7 @@ protected:
int nativeParamHints = ::NATIVE_PARAMETER_IS_ENABLED; int nativeParamHints = ::NATIVE_PARAMETER_IS_ENABLED;
const uint32_t paramHints = fPlugin.getParameterHints(index); const uint32_t paramHints = fPlugin.getParameterHints(index);


if (paramHints & kParameterIsAutomable)
if (paramHints & kParameterIsAutomatable)
nativeParamHints |= ::NATIVE_PARAMETER_IS_AUTOMABLE; nativeParamHints |= ::NATIVE_PARAMETER_IS_AUTOMABLE;
if (paramHints & kParameterIsBoolean) if (paramHints & kParameterIsBoolean)
nativeParamHints |= ::NATIVE_PARAMETER_IS_BOOLEAN; nativeParamHints |= ::NATIVE_PARAMETER_IS_BOOLEAN;


+ 2
- 2
distrho/src/DistrhoPluginLV2export.cpp View File

@@ -851,10 +851,10 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " lv2:portProperty lv2:integer ;\n"; pluginString += " lv2:portProperty lv2:integer ;\n";
if (hints & kParameterIsLogarithmic) if (hints & kParameterIsLogarithmic)
pluginString += " lv2:portProperty <" LV2_PORT_PROPS__logarithmic "> ;\n"; pluginString += " lv2:portProperty <" LV2_PORT_PROPS__logarithmic "> ;\n";
if ((hints & kParameterIsAutomable) == 0 && plugin.isParameterInput(i))
if ((hints & kParameterIsAutomatable) == 0 && plugin.isParameterInput(i))
{ {
pluginString += " lv2:portProperty <" LV2_PORT_PROPS__expensive "> ,\n"; pluginString += " lv2:portProperty <" LV2_PORT_PROPS__expensive "> ,\n";
pluginString += " <" LV2_KXSTUDIO_PROPERTIES__NonAutomable "> ;\n";
pluginString += " <" LV2_KXSTUDIO_PROPERTIES__NonAutomatable "> ;\n";
} }


// group // group


+ 2
- 2
distrho/src/DistrhoPluginVST2.cpp View File

@@ -992,8 +992,8 @@ public:
{ {
const uint32_t hints(fPlugin.getParameterHints(index)); const uint32_t hints(fPlugin.getParameterHints(index));


// must be automable, and not output
if ((hints & kParameterIsAutomable) != 0 && (hints & kParameterIsOutput) == 0)
// must be automatable, and not output
if ((hints & kParameterIsAutomatable) != 0 && (hints & kParameterIsOutput) == 0)
return 1; return 1;
} }
break; break;


+ 1
- 1
distrho/src/DistrhoPluginVST3.cpp View File

@@ -1458,7 +1458,7 @@ public:
break; break;
} }


if (hints & kParameterIsAutomable)
if (hints & kParameterIsAutomatable)
flags |= V3_PARAM_CAN_AUTOMATE; flags |= V3_PARAM_CAN_AUTOMATE;
if (hints & kParameterIsOutput) if (hints & kParameterIsOutput)
flags |= V3_PARAM_READ_ONLY; flags |= V3_PARAM_READ_ONLY;


+ 2
- 2
distrho/src/lv2/lv2_kxstudio_properties.h View File

@@ -1,6 +1,6 @@
/* /*
LV2 KXStudio Properties Extension LV2 KXStudio Properties Extension
Copyright 2014 Filipe Coelho <falktx@falktx.com>
Copyright 2014-2021 Filipe Coelho <falktx@falktx.com>


Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above
@@ -26,7 +26,7 @@
#define LV2_KXSTUDIO_PROPERTIES_URI "http://kxstudio.sf.net/ns/lv2ext/props" #define LV2_KXSTUDIO_PROPERTIES_URI "http://kxstudio.sf.net/ns/lv2ext/props"
#define LV2_KXSTUDIO_PROPERTIES_PREFIX LV2_KXSTUDIO_PROPERTIES_URI "#" #define LV2_KXSTUDIO_PROPERTIES_PREFIX LV2_KXSTUDIO_PROPERTIES_URI "#"


#define LV2_KXSTUDIO_PROPERTIES__NonAutomable LV2_KXSTUDIO_PROPERTIES_PREFIX "NonAutomable"
#define LV2_KXSTUDIO_PROPERTIES__NonAutomatable LV2_KXSTUDIO_PROPERTIES_PREFIX "NonAutomatable"
#define LV2_KXSTUDIO_PROPERTIES__TimePositionTicksPerBeat LV2_KXSTUDIO_PROPERTIES_PREFIX "TimePositionTicksPerBeat" #define LV2_KXSTUDIO_PROPERTIES__TimePositionTicksPerBeat LV2_KXSTUDIO_PROPERTIES_PREFIX "TimePositionTicksPerBeat"
#define LV2_KXSTUDIO_PROPERTIES__TransientWindowId LV2_KXSTUDIO_PROPERTIES_PREFIX "TransientWindowId" #define LV2_KXSTUDIO_PROPERTIES__TransientWindowId LV2_KXSTUDIO_PROPERTIES_PREFIX "TransientWindowId"




+ 1
- 1
examples/CVPort/ExamplePluginCVPort.cpp View File

@@ -159,7 +159,7 @@ protected:
parameter.name = "Hold Time"; parameter.name = "Hold Time";
parameter.symbol = "hold_time"; parameter.symbol = "hold_time";
parameter.hints = kParameterIsAutomable|kParameterIsLogarithmic;
parameter.hints = kParameterIsAutomatable|kParameterIsLogarithmic;
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
parameter.ranges.max = kMaxHoldTime; parameter.ranges.max = kMaxHoldTime;
parameter.ranges.def = 0.1f; parameter.ranges.def = 0.1f;


+ 3
- 3
examples/EmbedExternalUI/EmbedExternalExamplePlugin.cpp View File

@@ -108,7 +108,7 @@ protected:
switch (index) switch (index)
{ {
case kParameterWidth: case kParameterWidth:
parameter.hints = kParameterIsAutomable|kParameterIsInteger;
parameter.hints = kParameterIsAutomatable|kParameterIsInteger;
parameter.ranges.def = 512.0f; parameter.ranges.def = 512.0f;
parameter.ranges.min = 256.0f; parameter.ranges.min = 256.0f;
parameter.ranges.max = 4096.0f; parameter.ranges.max = 4096.0f;
@@ -117,7 +117,7 @@ protected:
parameter.unit = "px"; parameter.unit = "px";
break; break;
case kParameterHeight: case kParameterHeight:
parameter.hints = kParameterIsAutomable|kParameterIsInteger;
parameter.hints = kParameterIsAutomatable|kParameterIsInteger;
parameter.ranges.def = 256.0f; parameter.ranges.def = 256.0f;
parameter.ranges.min = 256.0f; parameter.ranges.min = 256.0f;
parameter.ranges.max = 4096.0f; parameter.ranges.max = 4096.0f;
@@ -152,7 +152,7 @@ protected:
/** /**
Change a parameter value. Change a parameter value.
The host may call this function from any context, including realtime processing. The host may call this function from any context, including realtime processing.
When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
When a parameter is marked as automatable, you must ensure no non-realtime operations are performed.
@note This function will only be called for parameter inputs. @note This function will only be called for parameter inputs.
*/ */
void setParameterValue(uint32_t index, float value) override void setParameterValue(uint32_t index, float value) override


+ 2
- 2
examples/ExternalUI/ExternalExamplePlugin.cpp View File

@@ -107,7 +107,7 @@ protected:
if (index != 0) if (index != 0)
return; return;
parameter.hints = kParameterIsAutomable|kParameterIsInteger;
parameter.hints = kParameterIsAutomatable|kParameterIsInteger;
parameter.ranges.def = 0.0f; parameter.ranges.def = 0.0f;
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
parameter.ranges.max = 100.0f; parameter.ranges.max = 100.0f;
@@ -134,7 +134,7 @@ protected:
/** /**
Change a parameter value. Change a parameter value.
The host may call this function from any context, including realtime processing. The host may call this function from any context, including realtime processing.
When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
When a parameter is marked as automatable, you must ensure no non-realtime operations are performed.
@note This function will only be called for parameter inputs. @note This function will only be called for parameter inputs.
*/ */
void setParameterValue(uint32_t index, float value) override void setParameterValue(uint32_t index, float value) override


+ 1
- 1
examples/ImGuiSimpleGain/PluginSimpleGain.cpp View File

@@ -49,7 +49,7 @@ void PluginSimpleGain::initParameter(uint32_t index, Parameter& parameter)
parameter.ranges.min = -90.0f; parameter.ranges.min = -90.0f;
parameter.ranges.max = 30.0f; parameter.ranges.max = 30.0f;
parameter.ranges.def = -0.0f; parameter.ranges.def = -0.0f;
parameter.hints = kParameterIsAutomable;
parameter.hints = kParameterIsAutomatable;
parameter.name = "Gain"; parameter.name = "Gain";
parameter.shortName = "Gain"; parameter.shortName = "Gain";
parameter.symbol = "gain"; parameter.symbol = "gain";


+ 2
- 2
examples/Info/InfoExamplePlugin.cpp View File

@@ -109,7 +109,7 @@ protected:
*/ */
void initParameter(uint32_t index, Parameter& parameter) override void initParameter(uint32_t index, Parameter& parameter) override
{ {
parameter.hints = kParameterIsAutomable|kParameterIsOutput;
parameter.hints = kParameterIsAutomatable|kParameterIsOutput;
parameter.ranges.def = 0.0f; parameter.ranges.def = 0.0f;
parameter.ranges.min = 0.0f; parameter.ranges.min = 0.0f;
parameter.ranges.max = 16777216.0f; parameter.ranges.max = 16777216.0f;
@@ -193,7 +193,7 @@ protected:
/** /**
Change a parameter value. Change a parameter value.
The host may call this function from any context, including realtime processing. The host may call this function from any context, including realtime processing.
When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
When a parameter is marked as automatable, you must ensure no non-realtime operations are performed.
@note This function will only be called for parameter inputs. @note This function will only be called for parameter inputs.
*/ */
void setParameterValue(uint32_t, float) override void setParameterValue(uint32_t, float) override


+ 2
- 2
examples/Latency/LatencyExamplePlugin.cpp View File

@@ -117,7 +117,7 @@ protected:
if (index != 0) if (index != 0)
return; return;
parameter.hints = kParameterIsAutomable;
parameter.hints = kParameterIsAutomatable;
parameter.name = "Latency"; parameter.name = "Latency";
parameter.symbol = "latency"; parameter.symbol = "latency";
parameter.unit = "s"; parameter.unit = "s";
@@ -144,7 +144,7 @@ protected:
/** /**
Change a parameter value. Change a parameter value.
The host may call this function from any context, including realtime processing. The host may call this function from any context, including realtime processing.
When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
When a parameter is marked as automatable, you must ensure no non-realtime operations are performed.
@note This function will only be called for parameter inputs. @note This function will only be called for parameter inputs.
*/ */
void setParameterValue(uint32_t index, float value) override void setParameterValue(uint32_t index, float value) override


+ 3
- 3
examples/Meters/ExamplePluginMeters.cpp View File

@@ -120,7 +120,7 @@ protected:
switch (index) switch (index)
{ {
case 0: case 0:
parameter.hints = kParameterIsAutomable|kParameterIsInteger;
parameter.hints = kParameterIsAutomatable|kParameterIsInteger;
parameter.name = "color"; parameter.name = "color";
parameter.symbol = "color"; parameter.symbol = "color";
parameter.enumValues.count = 2; parameter.enumValues.count = 2;
@@ -136,12 +136,12 @@ protected:
} }
break; break;
case 1: case 1:
parameter.hints = kParameterIsAutomable|kParameterIsOutput;
parameter.hints = kParameterIsAutomatable|kParameterIsOutput;
parameter.name = "out-left"; parameter.name = "out-left";
parameter.symbol = "out_left"; parameter.symbol = "out_left";
break; break;
case 2: case 2:
parameter.hints = kParameterIsAutomable|kParameterIsOutput;
parameter.hints = kParameterIsAutomatable|kParameterIsOutput;
parameter.name = "out-right"; parameter.name = "out-right";
parameter.symbol = "out_right"; parameter.symbol = "out_right";
break; break;


+ 1
- 1
examples/Metronome/ExamplePluginMetronome.cpp View File

@@ -156,7 +156,7 @@ protected:
*/ */
void initParameter(uint32_t index, Parameter& parameter) override void initParameter(uint32_t index, Parameter& parameter) override
{ {
parameter.hints = kParameterIsAutomable;
parameter.hints = kParameterIsAutomatable;
switch (index) switch (index)
{ {


+ 2
- 2
examples/Parameters/ExamplePluginParameters.cpp View File

@@ -122,10 +122,10 @@ The plugin will be treated as an effect, but it will not change the host audio."
*/ */
/** /**
Changing parameters does not cause any realtime-unsafe operations, so we can mark them as automable.
Changing parameters does not cause any realtime-unsafe operations, so we can mark them as automatable.
Also set as boolean because they work as on/off switches. Also set as boolean because they work as on/off switches.
*/ */
parameter.hints = kParameterIsAutomable|kParameterIsBoolean;
parameter.hints = kParameterIsAutomatable|kParameterIsBoolean;
/** /**
Minimum 0 (off), maximum 1 (on). Minimum 0 (off), maximum 1 (on).


Loading…
Cancel
Save