Skip to content

Commit e363310

Browse files
authored
Merge pull request #30 from GuitarML/v1-3-updates
V1 3 updates
2 parents 7f90cae + 9771f3a commit e363310

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3060
-516
lines changed

.github/workflows/cmake.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
workflow_dispatch:
14+
15+
jobs:
16+
build_and_test:
17+
if: contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
18+
name: Test plugin on ${{ matrix.os }}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
22+
matrix:
23+
os: [ubuntu-latest, windows-2019, macOS-latest]
24+
25+
steps:
26+
- name: Install Linux Deps
27+
if: runner.os == 'Linux'
28+
run: |
29+
sudo apt-get update
30+
sudo apt install libasound2-dev libcurl4-openssl-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev libjack-jackd2-dev lv2-dev
31+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
32+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
33+
- name: Get latest CMake
34+
uses: lukka/get-cmake@latest
35+
36+
- name: Checkout code
37+
uses: actions/checkout@v2
38+
with:
39+
submodules: recursive
40+
41+
- name: Configure
42+
shell: bash
43+
run: cmake -Bbuild
44+
45+
- name: Build
46+
shell: bash
47+
run: cmake --build build --config Release --parallel 4
48+
49+
# Failing validation, fix
50+
#- name: Validate
51+
# if: runner.os == 'Windows'
52+
# run: bash validate.sh
53+
54+
- name: Upload Linux Artifact GitHub Action
55+
if: runner.os == 'Linux'
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: linux-assets
59+
path: /home/runner/work/TS-M1N3/TS-M1N3/build/TS-M1N3_artefacts
60+
61+
- name: Upload Mac Artifact GitHub Action
62+
if: runner.os == 'macOS'
63+
uses: actions/upload-artifact@v2
64+
with:
65+
name: mac-assets
66+
path: /Users/runner/work/TS-M1N3/TS-M1N3/build/TS-M1N3_artefacts
67+
68+
- name: Upload Windows Artifact GitHub Action
69+
if: runner.os == 'Windows'
70+
uses: actions/upload-artifact@v2
71+
with:
72+
name: win-assets
73+
path: D:/a/TS-M1N3/TS-M1N3/build/TS-M1N3_artefacts

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "modules/JUCE"]
2+
path = modules/JUCE
3+
url = https://github.com/juce-framework/JUCE.git
4+
[submodule "modules/chowdsp_utils"]
5+
path = modules/chowdsp_utils
6+
url = https://github.com/Chowdhury-DSP/chowdsp_utils
7+
[submodule "modules/libsamplerate"]
8+
path = modules/libsamplerate
9+
url = https://github.com/libsndfile/libsamplerate
10+
[submodule "modules/eigen"]
11+
path = modules/eigen
12+
url = https://gitlab.com/libeigen/eigen.git

CMakeLists.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment target")
3+
project(SmartAmp VERSION 1.3)
4+
5+
set(CMAKE_CXX_STANDARD 17)
6+
7+
add_subdirectory(modules)
8+
include_directories(modules)
9+
10+
juce_set_aax_sdk_path(C:/SDKs/AAX_SDK/)
11+
12+
set(JUCE_FORMATS AU VST3)
13+
14+
# Build LV2 only on Linux
15+
if(UNIX AND NOT APPLE)
16+
message(STATUS "Building LV2 plugin format")
17+
list(APPEND JUCE_FORMATS LV2)
18+
endif()
19+
20+
# Build AAX if SDK target exists
21+
if(TARGET juce_aax_sdk)
22+
message(STATUS "Building AAX plugin format")
23+
list(APPEND JUCE_FORMATS AAX)
24+
endif()
25+
26+
juce_add_plugin(SmartAmp
27+
COMPANY_NAME GuitarML
28+
PLUGIN_MANUFACTURER_CODE GtML
29+
PLUGIN_CODE Npi3
30+
FORMATS ${JUCE_FORMATS}
31+
ProductName "SmartAmp"
32+
LV2_URI https://github.com/GuitarML/SmartAmp
33+
ICON_BIG resources/logo.png
34+
MICROPHONE_PERMISSION_ENABLED TRUE
35+
)
36+
37+
# create JUCE header
38+
juce_generate_juce_header(SmartAmp)
39+
40+
# add sources
41+
add_subdirectory(src)
42+
include_directories(src)
43+
add_subdirectory(resources)
44+
45+
target_compile_definitions(SmartAmp
46+
PUBLIC
47+
JUCE_DISPLAY_SPLASH_SCREEN=0
48+
JUCE_REPORT_APP_USAGE=0
49+
JUCE_WEB_BROWSER=0
50+
JUCE_USE_CURL=0
51+
JUCE_VST3_CAN_REPLACE_VST2=0
52+
JUCE_MODAL_LOOPS_PERMITTED=1
53+
)
54+
55+
target_link_libraries(SmartAmp PUBLIC
56+
juce_plugin_modules
57+
)
58+

LICENSE renamed to LICENSE.txt

File renamed without changes.

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,32 @@ Model training is done using PyTorch on pre recorded .wav samples. More info in
2020
To share your best models, email the json files to [email protected] and they may be included
2121
in the latest release as a downloadable zip.
2222

23-
Also see companion plugin, the [SmartGuitarPedal](https://github.com/GuitarML/SmartGuitarPedal)
23+
Also see companion plugin, the [SmartGuitarPedal](https://github.com/GuitarML/SmartGuitarPedal)<br>
24+
Note: As of SmartAmp version 1.3, the custom model load was removed to simplify the plugin. To load user
25+
trained models, use the SmartGuitarPedal, which plays all models trained with PedalNetRT.
2426

2527
## Installing the plugin
2628

27-
1. Download plugin (Windows 10, Mac, Ubuntu Linux) [here](https://github.com/keyth72/SmartGuitarAmp/releases)
28-
2. Copy to your DAW's VST directory (for Mac, use .dmg installer or copy AU/VST3 to desired folder)
29+
1. Download the appropriate plugin installer (Windows, Mac, Linux)
30+
2. Run the installer and follow the instructions. May need to reboot to allow your DAW to recognize the new plugin.
2931

3032
## Build Instructions
3133

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

40-
Note: Make sure to build in Release mode unless actually debugging. Debug mode will not keep up with real time playing.
36+
```bash
37+
# Clone the repository
38+
$ git clone https://github.com/GuitarML/SmartGuitarAmp.git
39+
$ cd SmartGuitarAmp
4140

42-
## Using your own custom trained models (or models from the TonePack)
41+
# initialize and set up submodules
42+
$ git submodule update --init --recursive
4343

44-
Use the "Load Tone" button in the plugin to load tone models trained with PedalNetRT. The current channel's
45-
EQ/gain will be applied to the custom tone. Switching the clean/lead channel unloads the custom tone and
46-
reloads the channel's default tone.
44+
# build with CMake
45+
$ cmake -Bbuild
46+
$ cmake --build build --config Release
47+
```
48+
The binaries will be located in `SmartAmp/build/SmartAmp_artefacts/`
4749

4850
## License
4951
This project is licensed under the Apache License, Version 2.0 - see the [LICENSE](LICENSE) file for details.

aax_builds.sh

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#!/bin/bash
2+
3+
# exit on failure
4+
set -e
5+
6+
# need to run in sudo mode on Mac
7+
if [[ "$OSTYPE" == "darwin"* ]]; then
8+
if [ "$EUID" -ne 0 ]; then
9+
echo "This script must be run in sudo mode! Exiting..."
10+
exit 1
11+
fi
12+
fi
13+
14+
if [[ "$*" = *debug* ]]; then
15+
echo "Making DEBUG build"
16+
build_config="Debug"
17+
else
18+
echo "Making RELEASE build"
19+
build_config="Release"
20+
fi
21+
22+
# clean up old builds
23+
if [[ $* = *clean* ]]; then
24+
echo "Cleaning previous build..."
25+
rm -rf build-aax/
26+
fi
27+
28+
sed_cmakelist()
29+
{
30+
sed_args="$1"
31+
32+
if [[ "$OSTYPE" == "darwin"* ]]; then
33+
sed -i '' "$sed_args" CMakeLists.txt
34+
else
35+
sed -i -e "$sed_args" CMakeLists.txt
36+
fi
37+
}
38+
39+
# set up OS-dependent variables
40+
if [[ "$OSTYPE" == "darwin"* ]]; then
41+
echo "Building for MAC"
42+
AAX_PATH=~/Developer/AAX_SDK/
43+
ilok_pass=$(more ~/Developer/ilok_pass)
44+
aax_target_dir="/Library/Application Support/Avid/Audio/Plug-Ins"
45+
TEAM_ID=$(more ~/Developer/mac_id)
46+
TARGET_DIR="Mac"
47+
48+
else # Windows
49+
echo "Building for WINDOWS"
50+
AAX_PATH=C:/SDKs/AAX_SDK/
51+
ilok_pass=$(cat /c/SDKs/ilok_pass)
52+
aax_target_dir="/c/Program Files/Common Files/Avid/Audio/Plug-Ins"
53+
TARGET_DIR="Win64"
54+
fi
55+
56+
# set up build AAX
57+
#sed_cmakelist "s~# juce_set_aax_sdk_path.*~juce_set_aax_sdk_path(${AAX_PATH})~"
58+
59+
# cmake new builds
60+
if [[ "$OSTYPE" == "darwin"* ]]; then
61+
cmake -Bbuild-aax -GXcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="Developer ID Application" \
62+
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM="$TEAM_ID" \
63+
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE="Manual" \
64+
-D"CMAKE_OSX_ARCHITECTURES=x86_64" \
65+
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \
66+
-DCMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--timestamp" \
67+
-DMACOS_RELEASE=ON
68+
69+
cmake --build build-aax --config $build_config --target SmartAmp_AAX | xcpretty
70+
71+
else # Windows
72+
cmake -Bbuild-aax -G"Visual Studio 16 2019" -A x64
73+
cmake --build build-aax --config $build_config --parallel $(nproc) --target SmartAmp_AAX
74+
fi
75+
76+
# sign with PACE
77+
aax_location=build-aax/SmartAmp_artefacts/$build_config/AAX/SmartAmp.aaxplugin
78+
wcguid="" # Update
79+
if [[ "$OSTYPE" == "darwin"* ]]; then
80+
/Applications/PACEAntiPiracy/Eden/Fusion/Current/bin/wraptool sign --verbose \
81+
--account keyth72 \
82+
--password "$ilok_pass" \
83+
--wcguid $wcguid \
84+
--dsig1-compat off \
85+
--signid "Developer ID Application: Keith Bloemer" \
86+
--in $aax_location \
87+
--out $aax_location
88+
89+
/Applications/PACEAntiPiracy/Eden/Fusion/Current/bin/wraptool verify --verbose --in $aax_location
90+
91+
else # Windows
92+
wraptool sign --verbose \
93+
--account keyth72 \
94+
--password "$ilok_pass" \
95+
--wcguid $wcguid \
96+
--keyfile /c/SDKs/keith_aax_cert.p12 \
97+
--keypassword "$ilok_pass" \
98+
--in $aax_location \
99+
--out $aax_location
100+
101+
wraptool verify --verbose --in $aax_location/Contents/x64/SmartAmp.aaxplugin
102+
fi
103+
104+
# reset AAX SDK field...
105+
#sed_cmakelist "s~juce_set_aax_sdk_path.*~# juce_set_aax_sdk_path(NONE)~"
106+
107+
rm -rf "$aax_target_dir/SmartAmp.aaxplugin"
108+
cp -R "$aax_location" "$aax_target_dir/SmartAmp.aaxplugin"
109+
110+
if [[ "$*" = *deploy* ]]; then
111+
set +e
112+
113+
ssh "[email protected]" "rm -r ~/aax_builds/${TARGET_DIR}/SmartAmp.aaxplugin"
114+
scp -r "$aax_location" "[email protected]:~/aax_builds/${TARGET_DIR}/"
115+
fi

installers/linux/build_deb.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
# This script builds a .deb package for installing the VST3, and LV2 plugins on Linux
3+
4+
# Set the app name and version here
5+
app_name=SmartAmp
6+
version=1.3
7+
8+
9+
# 1. Create the package directory structure and control file
10+
11+
mkdir -p $app_name"/DEBIAN"
12+
13+
printf "Package: $app_name\n\
14+
Version: $version\n\
15+
Section: custom\n\
16+
Priority: optional\n\
17+
Architecture: all\n\
18+
Essential: no\n\
19+
Installed-Size: 16480128\n\
20+
Maintainer: GuitarML\n\
21+
Description: GuitarML Plugin Debian Package (VST3, LV2)\n" > $app_name"/DEBIAN/control"
22+
23+
24+
# 2. Copy VST3 and LV2 plugins to the package directory (assumes project is already built)
25+
26+
mkdir -p $app_name/usr/local/lib/vst3/
27+
echo "Copying ../../build/"$app_name"_artefacts/Release/VST3/"$app_name".vst3"
28+
cp -r "../../build/"$app_name"_artefacts/Release/VST3/"$app_name".vst3" $app_name"/usr/local/lib/vst3/"
29+
30+
mkdir -p $app_name/usr/local/lib/lv2/
31+
echo "Copying ../../build/"$app_name"_artefacts/Release/LV2/"$app_name".lv2"
32+
cp -r "../../build/"$app_name"_artefacts/Release/LV2/"$app_name".lv2" $app_name"/usr/local/lib/lv2/"
33+
34+
35+
# 3. Build the .deb package and rename
36+
37+
dpkg-deb --build $app_name
38+
39+
mv $app_name.deb $app_name-Linux-x64-$version.deb

installers/mac/Intro.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This application will install the SmartAmp audio plugin version ##APPVERSION## to your computer.

0 commit comments

Comments
 (0)