commit ad4ce2119c4375d4106e38e8f90e6a546cae30bf
parent 2946cb17d2f5872604a03f7c885eebc10152d29a
Author: jatinchowdhury18 <[email protected]>
Date: Sat, 27 Nov 2021 14:07:08 +0000
Enable parameter automation menus in AAX plugin (#231)
* Adjust AAX build script
* Enable parameter automation menus in AAX build
Co-authored-by: jatinchowdhury18 <[email protected]>
Diffstat:
8 files changed, 75 insertions(+), 43 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -28,8 +28,9 @@ LV2.mak
*.swp
*~
-#Visual Studio Code files
+# IDE settings
.vscode/
+.idea/
# Other files I don't want
*.asd
diff --git a/.gitmodules b/.gitmodules
@@ -1,6 +1,6 @@
[submodule "Plugin/foleys_gui_magic"]
path = Plugin/modules/foleys_gui_magic
- url = https://github.com/jatinchowdhury18/foleys_gui_magic.git
+ url = https://github.com/Chowdhury-DSP/foleys_gui_magic.git
[submodule "Plugin/modules/chowdsp_utils"]
path = Plugin/modules/chowdsp_utils
url = https://github.com/Chowdhury-DSP/chowdsp_utils
diff --git a/Plugin/Source/GUI/Assets/gui.xml b/Plugin/Source/GUI/Assets/gui.xml
@@ -48,7 +48,7 @@
<View flex-direction="column" tab-color="" background-color="FF31323A"
padding="0" tab-caption="Gain">
<TextButton id="mid_side" tooltip="Toggles between left/right and mid/side processing modes" margin="5" padding="0"
- parameter="mid_side" text="Mid/Side" width="100" height="35"
+ parameter="mid_side" text="Stereo" text_on="Mid/Side" width="100" height="35"
min-height="30" min-width="100" flex-align-self="center" max-height="40"
name="Mid/Side" lookAndFeel="LookAndFeel_V3" button-color="FF33343D"
button-on-color="FFB41717" button-off-text="FFFFFFFF" button-on-text="FFFFFFFF"/>
@@ -65,7 +65,7 @@
tooltip="Applies a low cut filter before applying tape processing."/>
<Slider caption="High Cut" parameter="ifilt_high" class="Slider" name="High Cut"
tooltip="Applies a high cut filter before applying tape processing."/>
- <TextButton parameter="ifilt_makeup" text="Makeup" background-color="00000000"
+ <TextButton parameter="ifilt_makeup" text="Makeup" text_on="Makeup" background-color="00000000"
margin="0" padding="5" button-color="FF33343D" flex-grow="0.35"
button-on-color="FFB41717" lookAndFeel="LookAndFeel_V3" name="Makeup"
tooltip="Adds the signal cut out by the cut filters back to the processed signal."
@@ -171,7 +171,7 @@
flex-grow="2.5" flex-shrink="2.5" padding=""/>
<TextButton flex-align-self="auto" parameter="deg_point1x" max-height="160"
background-color="FF31323A" button-on-color="FFB41717" button-color="FF33343D"
- text="0.1x" button-off-text="FFFFFFFF" button-on-text="FFFFFFFF"
+ text="0.1x" text_on="0.1x" button-off-text="FFFFFFFF" button-on-text="FFFFFFFF"
height="" width="" min-height="0.0" padding="0" caption-placement="centred"
min-width="" margin="5" caption="" flex-grow="1.0" flex-shrink="0.1"
name="0.1x" lookAndFeel="LookAndFeel_V3" tooltip="Scales the Depth value by 0.1 to allow for more subtle degradation"/>
diff --git a/Plugin/Source/GUI/Assets/gui_ios.xml b/Plugin/Source/GUI/Assets/gui_ios.xml
@@ -82,7 +82,7 @@
<View flex-direction="column" tab-color="" background-color="FF31323A"
padding="0" tab-caption="Gain">
<TextButton id="mid_side" tooltip="Toggles between left/right and mid/side processing modes" margin="5" padding="0"
- parameter="mid_side" text="Mid/Side" width="100" height="35"
+ parameter="mid_side" text="Stereo" text_on="Mid/Side" width="100" height="35"
min-height="30" min-width="100" flex-align-self="center" max-height="40"
name="Mid/Side" lookAndFeel="LookAndFeel_V3" button-color="FF33343D"
button-on-color="FFB41717" button-off-text="FFFFFFFF" button-on-text="FFFFFFFF"/>
@@ -105,7 +105,7 @@
tooltip="Applies a low cut filter before applying tape processing."/>
<Slider caption="High Cut" parameter="ifilt_high" class="Slider" name="High Cut"
tooltip="Applies a high cut filter before applying tape processing."/>
- <TextButton parameter="ifilt_makeup" text="Makeup" background-color="00000000"
+ <TextButton parameter="ifilt_makeup" text="Makeup" text_on="Makeup" background-color="00000000"
margin="0" padding="5" button-color="FF33343D" flex-grow="0.35"
button-on-color="FFB41717" lookAndFeel="LookAndFeel_V3" name="Makeup"
tooltip="Adds the signal cut out by the cut filters back to the processed signal."
@@ -225,7 +225,7 @@
max-height="70" margin="0" min-height="0" slidertext-width="80"
flex-grow="2.5" flex-shrink="2.5" padding=""/>
<TextButton flex-align-self="auto" parameter="deg_point1x" max-height="160" background-color="FF31323A"
- button-on-color="FFB41717" button-color="FF33343D" text="0.1x"
+ button-on-color="FFB41717" button-color="FF33343D" text="0.1x" text_on="0.1x"
button-off-text="FFFFFFFF" button-on-text="FFFFFFFF" height=""
width="" min-height="0.0" padding="0" caption-placement="centred"
min-width="" margin="5" caption="" flex-grow="1.0" flex-shrink="0.1"
diff --git a/Plugin/Source/GUI/OnOff/PowerButton.cpp b/Plugin/Source/GUI/OnOff/PowerButton.cpp
@@ -1,24 +1,14 @@
#include "PowerButton.h"
-PowerButton::PowerButton() : button ("", DrawableButton::ImageStretched)
+PowerButton::PowerButton() : DrawableButton ("", DrawableButton::ImageFitted)
{
setColour (buttonColourId, Colours::blue);
setColour (buttonOnColourId, Colours::red);
- button.setColour (DrawableButton::backgroundColourId, Colours::transparentBlack);
- button.setColour (DrawableButton::backgroundOnColourId, Colours::transparentBlack);
+ setColour (DrawableButton::backgroundColourId, Colours::transparentBlack);
+ setColour (DrawableButton::backgroundOnColourId, Colours::transparentBlack);
- addAndMakeVisible (button);
updateColours();
- button.setClickingTogglesState (true);
-}
-
-void PowerButton::resized()
-{
- auto dim = (int) ((float) jmin (getWidth(), getHeight()) * 0.6f);
- auto centre = getLocalBounds().getCentre();
- auto topLeft = centre.translated (-dim / 2, -dim / 2);
-
- button.setBounds (topLeft.x, topLeft.y, dim, dim);
+ setClickingTogglesState (true);
}
void PowerButton::updateColours()
@@ -28,7 +18,23 @@ void PowerButton::updateColours()
onImage->replaceColour (Colours::black, findColour (buttonOnColourId));
offImage->replaceColour (Colours::black, findColour (buttonColourId));
- button.setImages (offImage.get(), offImage.get(), onImage.get(), offImage.get(), onImage.get(), onImage.get(), offImage.get());
+ setImages (offImage.get(), offImage.get(), offImage.get(), nullptr, onImage.get(), onImage.get(), onImage.get());
+}
+
+void PowerButton::mouseDown (const MouseEvent& e)
+{
+ if (e.mods.isAnyModifierKeyDown())
+ return;
+
+ DrawableButton::mouseDown (e);
+}
+
+void PowerButton::mouseUp (const MouseEvent& e)
+{
+ if (e.mods.isAnyModifierKeyDown())
+ return;
+
+ DrawableButton::mouseUp (e);
}
//===============================================================
@@ -41,36 +47,48 @@ PowerButtonItem::PowerButtonItem (foleys::MagicGUIBuilder& builder, const juce::
addAndMakeVisible (button);
}
+void PowerButtonItem::resized()
+{
+ auto indent = (int) ((float) jmin (getWidth(), getHeight()) * 0.2f);
+ button.setEdgeIndent (indent);
+
+ GuiItem::resized();
+}
+
void PowerButtonItem::update()
{
attachment.reset();
- auto& actualButton = button.getButton();
- auto parameter = configNode.getProperty (foleys::IDs::parameter, juce::String()).toString();
+ auto parameter = getControlledParameterID ({});
if (parameter.isNotEmpty())
- attachment = getMagicState().createAttachment (parameter, actualButton);
+ attachment = getMagicState().createAttachment (parameter, button);
auto triggerID = getProperty (pOnClick).toString();
if (triggerID.isNotEmpty())
- actualButton.onClick = getMagicState().getTrigger (triggerID);
+ button.onClick = getMagicState().getTrigger (triggerID);
button.updateColours();
- actualButton.setName (magicBuilder.getStyleProperty (foleys::IDs::name, configNode).toString());
+ button.setName (magicBuilder.getStyleProperty (foleys::IDs::name, configNode).toString());
auto tooltip = magicBuilder.getStyleProperty (foleys::IDs::tooltip, configNode).toString();
if (tooltip.isNotEmpty())
- actualButton.setTooltip (tooltip);
+ button.setTooltip (tooltip);
}
std::vector<foleys::SettableProperty> PowerButtonItem::getSettableProperties() const
{
std::vector<foleys::SettableProperty> itemProperties;
- itemProperties.push_back ({ configNode, foleys::IDs::parameter, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenu() });
- itemProperties.push_back ({ configNode, pOnClick, foleys::SettableProperty::Choice, {}, magicBuilder.createTriggerMenu() });
+ itemProperties.push_back ({ configNode, foleys::IDs::parameter, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenuLambda() });
+ itemProperties.push_back ({ configNode, pOnClick, foleys::SettableProperty::Choice, {}, magicBuilder.createTriggerMenuLambda() });
return itemProperties;
}
+String PowerButtonItem::getControlledParameterID (Point<int>)
+{
+ return configNode.getProperty (foleys::IDs::parameter, String()).toString();
+}
+
const juce::Identifier PowerButtonItem::pOnClick { "onClick" };
diff --git a/Plugin/Source/GUI/OnOff/PowerButton.h b/Plugin/Source/GUI/OnOff/PowerButton.h
@@ -3,7 +3,7 @@
#include <JuceHeader.h>
-class PowerButton : public Component
+class PowerButton : public DrawableButton
{
public:
PowerButton();
@@ -14,13 +14,12 @@ public:
buttonOnColourId,
};
- void resized();
+ void mouseDown (const MouseEvent& e) override;
+ void mouseUp (const MouseEvent& e) override;
+
void updateColours();
- DrawableButton& getButton() { return button; }
private:
- DrawableButton button;
-
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PowerButton)
};
@@ -34,8 +33,10 @@ public:
PowerButtonItem (foleys::MagicGUIBuilder& builder, const juce::ValueTree& node);
+ void resized() override;
void update() override;
std::vector<foleys::SettableProperty> getSettableProperties() const override;
+ String getControlledParameterID (Point<int>) override;
juce::Component* getWrappedComponent() override
{
diff --git a/Plugin/Source/GUI/OversamplingMenu.cpp b/Plugin/Source/GUI/OversamplingMenu.cpp
@@ -148,10 +148,10 @@ void OversamplingMenu::generateComboBoxMenu()
std::vector<foleys::SettableProperty> OversamplingMenu::getSettableProperties() const
{
std::vector<foleys::SettableProperty> properties;
- properties.push_back ({ configNode, osParam, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenu() });
- properties.push_back ({ configNode, osMode, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenu() });
- properties.push_back ({ configNode, osOfflineParam, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenu() });
- properties.push_back ({ configNode, osOfflineMode, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenu() });
+ properties.push_back ({ configNode, osParam, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenuLambda() });
+ properties.push_back ({ configNode, osMode, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenuLambda() });
+ properties.push_back ({ configNode, osOfflineParam, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenuLambda() });
+ properties.push_back ({ configNode, osOfflineMode, foleys::SettableProperty::Choice, {}, magicBuilder.createParameterMenuLambda() });
return properties;
}
diff --git a/Scripts/aax_builds.sh b/Scripts/aax_builds.sh
@@ -3,6 +3,14 @@
# exit on failure
set -e
+# need to run in sudo mode on Mac
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ if [ "$EUID" -ne 0 ]; then
+ echo "This script must be run in sudo mode! Exiting..."
+ exit 1
+ fi
+fi
+
if [[ "$*" = *debug* ]]; then
echo "Making DEBUG build"
build_config="Debug"
@@ -87,6 +95,8 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
--in $aax_location \
--out $aax_location
+ # --keyfile $HOME/Downloads/jatin_aax_cert.p12 \
+ # --keypassword "$ilok_pass" \
wraptool verify --verbose --in $aax_location
else # Windows
@@ -108,7 +118,9 @@ sed_cmakelist "s~juce_set_aax_sdk_path.*~# juce_set_aax_sdk_path(NONE)~"
rm -rf "$aax_target_dir/CHOWTapeModel.aaxplugin"
cp -R "$aax_location" "$aax_target_dir/CHOWTapeModel.aaxplugin"
-set +e
+if [[ "$*" = *deploy* ]]; then
+ set +e
-ssh "[email protected]" "rm -r ~/aax_builds/${TARGET_DIR}/CHOWTapeModel.aaxplugin"
-scp -r "$aax_location" "[email protected]:~/aax_builds/${TARGET_DIR}/"
+ ssh "[email protected]" "rm -r ~/aax_builds/${TARGET_DIR}/CHOWTapeModel.aaxplugin"
+ scp -r "$aax_location" "[email protected]:~/aax_builds/${TARGET_DIR}/"
+fi