Skip to content

Commit

Permalink
Merge pull request #8 from GuitarML/v1-3-updates
Browse files Browse the repository at this point in the history
V1 3 updates
  • Loading branch information
GuitarML authored Aug 31, 2022
2 parents 6efc53d + 221c52b commit 83479b1
Show file tree
Hide file tree
Showing 44 changed files with 3,732 additions and 284 deletions.
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "modules/JUCE"]
path = modules/JUCE
url = https://github.com/juce-framework/JUCE.git
[submodule "modules/chowdsp_utils"]
path = modules/chowdsp_utils
url = https://github.com/Chowdhury-DSP/chowdsp_utils
[submodule "modules/libsamplerate"]
path = modules/libsamplerate
url = https://github.com/libsndfile/libsamplerate
[submodule "modules/eigen"]
path = modules/eigen
url = https://gitlab.com/libeigen/eigen.git
58 changes: 58 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
cmake_minimum_required(VERSION 3.15)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment target")
project(SmartPedal VERSION 1.4.0)

set(CMAKE_CXX_STANDARD 17)

add_subdirectory(modules)
include_directories(modules)

juce_set_aax_sdk_path(C:/SDKs/AAX_SDK/)

set(JUCE_FORMATS AU VST3)

# Build LV2 only on Linux
if(UNIX AND NOT APPLE)
message(STATUS "Building LV2 plugin format")
list(APPEND JUCE_FORMATS LV2)
endif()

# Build AAX if SDK target exists
if(TARGET juce_aax_sdk)
message(STATUS "Building AAX plugin format")
list(APPEND JUCE_FORMATS AAX)
endif()

juce_add_plugin(SmartPedal
COMPANY_NAME GuitarML
PLUGIN_MANUFACTURER_CODE GtML
PLUGIN_CODE Npi3
FORMATS ${JUCE_FORMATS}
ProductName "SmartPedal"
LV2_URI https://github.com/GuitarML/SmartPedal
ICON_BIG resources/logo.png
MICROPHONE_PERMISSION_ENABLED TRUE
)

# create JUCE header
juce_generate_juce_header(SmartPedal)

# add sources
add_subdirectory(src)
include_directories(src)
add_subdirectory(resources)

target_compile_definitions(SmartPedal
PUBLIC
JUCE_DISPLAY_SPLASH_SCREEN=0
JUCE_REPORT_APP_USAGE=0
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0
JUCE_MODAL_LOOPS_PERMITTED=1
)

target_link_libraries(SmartPedal PUBLIC
juce_plugin_modules
)

674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,30 @@ Also see companion plugin, the [SmartGuitarAmp](https://github.com/GuitarML/Smar

## Installing the plugin

1. Download plugin (Windows 10, Ubuntu Linux) [here](https://github.com/keyth72/SmartGuitarPedal/releases)
2. Copy to your DAW's VST directory
3. Copy .json models from the models/ directory of this repository to the DAW's executable directory when using VST,
(for example: "C:\Program Files\REAPER (x64)\\*.json") or to the same directory as the SmartPedal.exe when using standalone. You can also add the files to your user application data directory (see [Loading hardware models](#loading-hardware-models) below).
4. As an alternative to the drop down menu, as of release v1.2 there is a "LOAD MODEL" button to select one model
at a time from a file select dialog. Note that the model name won't appear in the drop down, but will be loaded by the plugin.

1. Download the appropriate plugin installer (Windows, Mac, Linux)
2. Run the installer and follow the instructions. May need to reboot to allow your DAW to recognize the new plugin.

## Build Instructions

1. Clone or download this repository.
2. Download and install [JUCE](https://juce.com/) This project uses the "Projucer" application from the JUCE website.
3. Download [Eigen](http://eigen.tuxfamily.org)
Extract Eigen to a convenient location on your system (will be linked with Projucer)
4. Open SmartGuitarPedal.jucer file with Projucer
5. Add the <full_path_to>/ Eigen folder to "Header Search Paths" in Exporters -> Debug/Release
6. Open and build project in Visual Studio (Windows), Xcode (Mac), or Code::Blocks/Makefile (Linux)
### Build with Cmake

Note: Make sure to build in Release mode unless actually debugging. Debug mode will not keep up with real time playing.
```bash
# Clone the repository
$ git clone https://github.com/GuitarML/SmartGuitarPedal.git
$ cd SmartGuitarPedal

### Loading hardware models
Models are auto loaded from the working directory of the executable. When using the plugin, add the .json files to your DAW
.exe path (for example: "C:\Program Files\REAPER (x64)"). When running the stand alone exe, put in the same directory as
SmartPedal.exe.
# initialize and set up submodules
$ git submodule update --init --recursive

Alternatively, you can add the files to your user application data directory under "GuitarML\SmartPedal", and the plugin should load them. This corresponds to:
- Mac: `~/Library/GuitarML/SmartPedal`
- Linux: `~/.config/GuitarML/SmartPedal`
- Windows: `C:\Users\<username>\AppData\Roaming\GuitarML\SmartPedal`
# build with CMake
$ cmake -Bbuild
$ cmake --build build --config Release
```
The binaries will be located in `SmartPedal/build/SmartPedal_artefacts/`

### Loading hardware models
Use the Load Model button to select a folder containing SmartPedal json models. Note that models for NeuralPi and SmartAmpPro use
a different model architecture and will not be compatible. Only WaveNet models trained using PedalNetRT are compatible with SmartPedal.

## License
This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details.
Expand Down
122 changes: 0 additions & 122 deletions SmartPedal/SmartPedal.jucer

This file was deleted.

115 changes: 115 additions & 0 deletions aax_builds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/bash

# 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"
else
echo "Making RELEASE build"
build_config="Release"
fi

# clean up old builds
if [[ $* = *clean* ]]; then
echo "Cleaning previous build..."
rm -rf build-aax/
fi

sed_cmakelist()
{
sed_args="$1"

if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "$sed_args" CMakeLists.txt
else
sed -i -e "$sed_args" CMakeLists.txt
fi
}

# set up OS-dependent variables
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "Building for MAC"
AAX_PATH=~/Developer/AAX_SDK/
ilok_pass=$(more ~/Developer/ilok_pass)
aax_target_dir="/Library/Application Support/Avid/Audio/Plug-Ins"
TEAM_ID=$(more ~/Developer/mac_id)
TARGET_DIR="Mac"

else # Windows
echo "Building for WINDOWS"
AAX_PATH=C:/SDKs/AAX_SDK/
ilok_pass=$(cat /c/SDKs/ilok_pass)
aax_target_dir="/c/Program Files/Common Files/Avid/Audio/Plug-Ins"
TARGET_DIR="Win64"
fi

# set up build AAX
#sed_cmakelist "s~# juce_set_aax_sdk_path.*~juce_set_aax_sdk_path(${AAX_PATH})~"

# cmake new builds
if [[ "$OSTYPE" == "darwin"* ]]; then
cmake -Bbuild-aax -GXcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="Developer ID Application" \
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM="$TEAM_ID" \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE="Manual" \
-D"CMAKE_OSX_ARCHITECTURES=x86_64" \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \
-DCMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--timestamp" \
-DMACOS_RELEASE=ON

cmake --build build-aax --config $build_config --target SmartPedal_AAX | xcpretty

else # Windows
cmake -Bbuild-aax -G"Visual Studio 16 2019" -A x64
cmake --build build-aax --config $build_config --parallel $(nproc) --target SmartPedal_AAX
fi

# sign with PACE
aax_location=build-aax/SmartPedal_artefacts/$build_config/AAX/SmartPedal.aaxplugin
wcguid="" # Update
if [[ "$OSTYPE" == "darwin"* ]]; then
/Applications/PACEAntiPiracy/Eden/Fusion/Current/bin/wraptool sign --verbose \
--account keyth72 \
--password "$ilok_pass" \
--wcguid $wcguid \
--dsig1-compat off \
--signid "Developer ID Application: Keith Bloemer" \
--in $aax_location \
--out $aax_location

/Applications/PACEAntiPiracy/Eden/Fusion/Current/bin/wraptool verify --verbose --in $aax_location

else # Windows
wraptool sign --verbose \
--account keyth72 \
--password "$ilok_pass" \
--wcguid $wcguid \
--keyfile /c/SDKs/keith_aax_cert.p12 \
--keypassword "$ilok_pass" \
--in $aax_location \
--out $aax_location

wraptool verify --verbose --in $aax_location/Contents/x64/SmartPedal.aaxplugin
fi

# reset AAX SDK field...
#sed_cmakelist "s~juce_set_aax_sdk_path.*~# juce_set_aax_sdk_path(NONE)~"

rm -rf "$aax_target_dir/SmartPedal.aaxplugin"
cp -R "$aax_location" "$aax_target_dir/SmartPedal.aaxplugin"

if [[ "$*" = *deploy* ]]; then
set +e

ssh "smartguitarml@gmail.com" "rm -r ~/aax_builds/${TARGET_DIR}/SmartPedal.aaxplugin"
scp -r "$aax_location" "smartguitarml@gmail.com:~/aax_builds/${TARGET_DIR}/"
fi
Loading

0 comments on commit 83479b1

Please sign in to comment.