AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

commit a68d1d9756633b408e3e6b78c7524913e5956745
parent 2651726bd1e53d56a0a4fcd3c1eaac6edfd654b5
Author: jatinchowdhury18 <jatinchowdhury18@gmail.com>
Date:   Sun,  5 Sep 2021 03:01:30 -0700

Updates for iOS (#217)

* Updates for iOS

* Fix UI orientation options

* Fix compilation issues with JUCE 6.1.0

* Revert back to JUCE 6.0.8
Diffstat:
MPlugin/CMakeLists.txt | 6+++---
MPlugin/Source/GUI/Assets/gui_ios.xml | 62+++++++++++++++++++++++++++++++++++++++-----------------------
MPlugin/Source/Headless/Main.cpp | 3+++
MPlugin/Source/Processors/Compression/CompressionProcessor.cpp | 4++--
MPlugin/modules/CMakeLists.txt | 8+++++++-
Mios_builds.sh | 3++-
6 files changed, 56 insertions(+), 30 deletions(-)

diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.15) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment target") set(CMAKE_CXX_STANDARD 17) -project(CHOWTapeModel VERSION 2.8.1) +project(CHOWTapeModel VERSION 2.8.2) add_subdirectory(modules) include_directories(modules/RTNeural) @@ -37,8 +37,8 @@ juce_add_plugin(CHOWTapeModel LV2_URI https://github.com/jatinchowdhury18/AnalogTapeModel ICON_BIG Source/GUI/Assets/logo.png MICROPHONE_PERMISSION_ENABLED TRUE - IPHONE_SCREEN_ORIENTATIONS UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - IPAD_SCREEN_ORIENTATIONS UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + IPHONE_SCREEN_ORIENTATIONS UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + IPAD_SCREEN_ORIENTATIONS UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight NEEDS_STORE_KIT TRUE ) diff --git a/Plugin/Source/GUI/Assets/gui_ios.xml b/Plugin/Source/GUI/Assets/gui_ios.xml @@ -30,6 +30,28 @@ <View id="root" resizable="1" resize-corner="1" flex-direction="column" padding="0" width="580" height="580" background-color="FF8B3232" background-image="Background_svg" image-placement="stretch"> + <View max-height="40" min-height="20" margin="0" padding="0" background-color="FF31323A" + flex-grow="0.1"> + <View background-color="00000000" flex-grow="0.1"/> + <OversamplingMenu caption="Oversampling" os-param="os" os-mode="os_mode" + os-off-param="os_render_factor" os-off-mode="os_render_mode" + os-off-same="os_render_like_realtime" class="Slider" + caption-size="0" padding="0" combo-text="FFEAA92C" combo-background="00000000" + max-height="100" margin="" lookAndFeel="ComboBoxLNF" name="Oversampling" + tooltip="Sets the amount of oversampling used for the hysteresis processing. More oversampling will reduce aliasing artifacts, but requires more CPU resources."/> + <ComboBox lookAndFeel="ComboBoxLNF" padding="0" border="0" background-color="00000000" + name="Hysteresis Mode" caption="Hysteresis Mode" caption-size="0" + combo-text="FFEAA92C" caption-color="FFFFFFFF" max-height="100" + margin="" parameter="mode" combo-background="00000000" tooltip="Selects the mode to use for hysteresis processing. Choose between 2nd/4th order Runge-Kutta method, 4 or 8 Newton-Raphson iterations, or revert to version 1.0."/> + <View flex-grow="0.1" background-color="00000000"/> + <ComboBox lookAndFeel="ComboBoxLNF" padding="0" border="0" background-color="00000000" + name="Mix Group" caption="Mix Group" caption-size="0" flex-grow="0.85" + combo-text="FFEAA92C" caption-color="FFFFFFFF" max-height="100" + margin="0" parameter="mix_group" combo-background="00000000" + tooltip="Adds this plugin to a mix group. When the plugin is added to a group, the group parameters will be copied to this plugin, and their parameters will remain in sync."/> + <MixGroupViz flex-grow="0.3" margin="5" padding="0" background-color="00000000"/> + <TipJar flex-grow="0.75" margin="0" padding="0" background-color="00000000" lookAndFeel="ComboBoxLNF"/> + </View> <View max-height="80" padding="0" margin="0" background-color=""> <View margin="2" padding="" background-color="00000000" flex-direction="column" flex-grow="0.41"> @@ -86,7 +108,7 @@ </View> </View> <View margin="0" padding="0" flex-grow="0.07" background-color="00000000"/> - <View display="tabbed" padding="0" background-color="FF31323A" lookAndFeel="MyLNF"> + <View display="tabbed" padding="0" background-color="FF31323A" lookAndFeel="MyLNF" flex-grow="1.5"> <View flex-direction="column" tab-color="" background-color="FF31323A" padding="0" tab-caption="Tape" margin="0"> <View margin="0" padding="0" flex-grow="0.05" background-color="00000000"/> @@ -104,6 +126,22 @@ <View margin="0" padding="0" flex-grow="0.05" background-color="00000000"/> </View> <View flex-direction="column" tab-color="" background-color="FF31323A" + padding="0" tab-caption="Comp" margin="0"> + <View margin="0" padding="0" flex-grow="0.05" background-color="00000000"/> + <PowerButton flex-grow="1.0" margin="0" padding="0" background-color="00000000" + button-on-color="FFEAA92C" min-height="20" max-height="35" button-color="ff595c6b" + parameter="comp_onoff" name="Comp. On/Off" tooltip="Turns the tape compression on or off."/> + <Slider caption="Amount [dB]" parameter="comp_amt" class="Slider" name="Compression Amount" padding="0" + margin="0" tooltip="Controls the amount of tape compression applied by the effect."/> + <View margin="0" padding="0" flex-grow="0.1" background-color="00000000"/> + <Slider caption="Attack [ms]" parameter="comp_attack" class="Slider" name="Compression Attack" + padding="0" margin="0" tooltip="Controls the attack speed of the tape compression."/> + <View margin="0" padding="0" flex-grow="0.1" background-color="00000000"/> + <Slider caption="Release [ms]" parameter="comp_release" class="Slider" name="Compression Release" + padding="0" margin="0" tooltip="Controls the release speed of the tape compression."/> + <View margin="0" padding="0" flex-grow="0.05" background-color="00000000"/> + </View> + <View flex-direction="column" tab-color="" background-color="FF31323A" padding="0" tab-caption="Tone" margin="0"> <View margin="0" padding="0" flex-grow="0.05" background-color="00000000"/> <PowerButton max-height="35" min-height="20" margin="0" padding="0" background-color="00000000" @@ -269,27 +307,5 @@ </View> </View> </View> - <View max-height="40" min-height="20" margin="0" padding="0" background-color="FF31323A" - flex-grow="0.1"> - <View background-color="00000000" flex-grow="0.1"/> - <OversamplingMenu caption="Oversampling" os-param="os" os-mode="os_mode" - os-off-param="os_render_factor" os-off-mode="os_render_mode" - os-off-same="os_render_like_realtime" class="Slider" - caption-size="0" padding="0" combo-text="FFEAA92C" combo-background="00000000" - max-height="100" margin="" lookAndFeel="ComboBoxLNF" name="Oversampling" - tooltip="Sets the amount of oversampling used for the hysteresis processing. More oversampling will reduce aliasing artifacts, but requires more CPU resources."/> - <ComboBox lookAndFeel="ComboBoxLNF" padding="0" border="0" background-color="00000000" - name="Hysteresis Mode" caption="Hysteresis Mode" caption-size="0" - combo-text="FFEAA92C" caption-color="FFFFFFFF" max-height="100" - margin="" parameter="mode" combo-background="00000000" tooltip="Selects the mode to use for hysteresis processing. Choose between 2nd/4th order Runge-Kutta method, 4 or 8 Newton-Raphson iterations, or revert to version 1.0."/> - <View flex-grow="0.1" background-color="00000000"/> - <ComboBox lookAndFeel="ComboBoxLNF" padding="0" border="0" background-color="00000000" - name="Mix Group" caption="Mix Group" caption-size="0" flex-grow="0.85" - combo-text="FFEAA92C" caption-color="FFFFFFFF" max-height="100" - margin="0" parameter="mix_group" combo-background="00000000" - tooltip="Adds this plugin to a mix group. When the plugin is added to a group, the group parameters will be copied to this plugin, and their parameters will remain in sync."/> - <MixGroupViz flex-grow="0.3" margin="5" padding="0" background-color="00000000"/> - <TipJar flex-grow="0.75" margin="0" padding="0" background-color="00000000" lookAndFeel="ComboBoxLNF"/> - </View> </View> </magic> diff --git a/Plugin/Source/Headless/Main.cpp b/Plugin/Source/Headless/Main.cpp @@ -40,5 +40,8 @@ int main (int argc, char* argv[]) UnitTests unitTests; app.addCommand (unitTests); + // ArgumentList args { "--unit-tests", "MixGroupsTest" }; + // unitTests.runUnitTests (args); + return app.findAndRunCommand (argc, argv); } diff --git a/Plugin/Source/Processors/Compression/CompressionProcessor.cpp b/Plugin/Source/Processors/Compression/CompressionProcessor.cpp @@ -106,8 +106,8 @@ void CompressionProcessor::processBlock (AudioBuffer<float>& buffer) // since the slew will be applied to the gain, we need to reverse the attack and release parameters! slewLimiter[ch].setParameters (releaseParam->load(), attackParam->load()); - for (size_t n = 0; n < (size_t) numSamples; ++n) - compGainVec[n] = jmin (compGainVec[n], slewLimiter[ch].processSample (compGainVec[n])); + for (size_t k = 0; k < (size_t) numSamples; ++k) + compGainVec[k] = jmin (compGainVec[k], slewLimiter[ch].processSample (compGainVec[k])); FloatVectorOperations::multiply (x, compGainVec.data(), numSamples); } diff --git a/Plugin/modules/CMakeLists.txt b/Plugin/modules/CMakeLists.txt @@ -1,4 +1,9 @@ -add_subdirectory(JUCE) +set(JUCE_PATH JUCE) +if(CUSTOM_JUCE_PATH) + set(JUCE_PATH "${CUSTOM_JUCE_PATH}") +endif() + +add_subdirectory(${JUCE_PATH} juce) include(cmake/SubprojectVersion.cmake) subproject_version(JUCE juce_version) message(STATUS "VERSION for JUCE: ${juce_version}") @@ -36,6 +41,7 @@ target_compile_definitions(juce_plugin_modules JUCE_WEB_BROWSER=0 JUCE_USE_CURL=0 JUCE_VST3_CAN_REPLACE_VST2=0 + JUCE_MODAL_LOOPS_PERMITTED=$<IF:$<PLATFORM_ID:iOS>,0,1> FOLEYS_SHOW_GUI_EDITOR_PALLETTE=0 FOLEYS_ENABLE_BINARY_DATA=1 CHOWDSP_USE_XSIMD=1 diff --git a/ios_builds.sh b/ios_builds.sh @@ -23,7 +23,8 @@ cmake -Bbuild-ios -GXcode -DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_OSX_DEPLOYMENT_TARGET=11.4 \ -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM="$TEAM_ID" \ -DCMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY="1,2" \ - -DCMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE="NO" + -DCMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE="NO" \ + -DCUSTOM_JUCE_PATH=../../../JUCE_610 if [ "$1" == "build" ]; then xcodebuild -project build-ios/CHOWTapeModel.xcodeproj \