commit 33e708984a75886f97872e27ac0e6942ddfb5f52
parent 11ac4b4dfb5e9304b5e3b9282033632732ef9371
Author: Keith Bloemer <32459398+GuitarML@users.noreply.github.com>
Date: Tue, 1 Feb 2022 14:43:49 -0600
Merge pull request #22 from GuitarML/continuous-integration
Continuous integration
Diffstat:
4 files changed, 89 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
@@ -0,0 +1,72 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - main
+ - develop
+ pull_request:
+ branches:
+ - main
+ - develop
+
+ workflow_dispatch:
+
+jobs:
+ build_and_test:
+ 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
+ name: Test plugin on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
+ matrix:
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+
+ steps:
+ - name: Install Linux Deps
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt-get update
+ 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
+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
+ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
+ - name: Get latest CMake
+ uses: lukka/get-cmake@latest
+
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+
+ - name: Configure
+ shell: bash
+ run: cmake -Bbuild
+
+ - name: Build
+ shell: bash
+ run: cmake --build build --config Release --parallel 4
+
+ - name: Validate
+ if: runner.os == 'Windows'
+ run: bash validate.sh
+
+ - name: Upload Linux Artifact GitHub Action
+ if: runner.os == 'Linux'
+ uses: actions/upload-artifact@v2
+ with:
+ name: linux-assets
+ path: /home/runner/work/NeuralPi/NeuralPi/build/NeuralPi_artefacts
+
+ - name: Upload Mac Artifact GitHub Action
+ if: runner.os == 'macOS'
+ uses: actions/upload-artifact@v2
+ with:
+ name: mac-assets
+ path: /Users/runner/work/NeuralPi/NeuralPi/build/NeuralPi_artefacts
+
+ - name: Upload Windows Artifact GitHub Action
+ if: runner.os == 'Windows'
+ uses: actions/upload-artifact@v2
+ with:
+ name: win-assets
+ path: D:/a/NeuralPi/NeuralPi/build/NeuralPi_artefacts
diff --git a/README.md b/README.md
@@ -1,5 +1,7 @@
# NeuralPi
+[](https://github.com/GuitarML/NeuralPi/actions/workflows/cmake.yml) [](https://www.gnu.org/licenses/gpl-3.0) [](https://somsubhra.github.io/github-release-stats/?username=GuitarML&repository=NeuralPi&page=1&per_page=30)
+
NeuralPi is a guitar pedal using neural networks to emulate real amps and pedals on a Raspberry Pi 4. The NeuralPi software is a VST3 plugin built with JUCE, which can be run as a normal audio plugin or cross-compiled to run on the Raspberry Pi 4 with [Elk Audio OS](https://elk.audio/). The NeuralPi includes model selection, EQ, and gain/volume controls from a remote instance of the plugin over WiFi. The pedal runs high quality amp/pedal models on an economical DIY setup, costing around $120 for hardware to build yourself. <br>
Check out a video demo on [YouTube](https://www.youtube.com/watch?v=_3zFD6h6Wrc)<br>
Check out the step by step build guide published on [Towards Data Science](https://towardsdatascience.com/neural-networks-for-real-time-audio-raspberry-pi-guitar-pedal-bded4b6b7f31)
diff --git a/Source/RTNeuralLSTM.cpp b/Source/RTNeuralLSTM.cpp
@@ -21,8 +21,8 @@ template <typename T1>
void RT_LSTM::set_weights(T1 model, const char* filename)
{
// Initialize the correct model
- auto& lstm = (*model).get<0>();
- auto& dense = (*model).get<1>();
+ auto& lstm = (*model).template get<0>();
+ auto& dense = (*model).template get<1>();
// read a JSON file
std::ifstream i2(filename);
diff --git a/validate.sh b/validate.sh
@@ -24,18 +24,24 @@ install_pluginval_win()
# install
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
- pluginval=$(install_pluginval_linux)
- plugin="build/NeuralPi_artefacts/Release/VST3/NeuralPi.vst3"
+ exit 0
+ # pluginval=$(install_pluginval_linux)
+ # declare -a plugins=()
elif [[ "$OSTYPE" == "darwin"* ]]; then
pluginval=$(install_pluginval_mac)
- plugin="build/NeuralPi_artefacts/VST3/NeuralPi.vst3"
+ declare -a plugins=("build/NeuralPi_artefacts/VST3/NeuralPi.vst3")
+else
+ pluginval=$(install_pluginval_win)
+ declare -a plugins=("build/NeuralPi_artefacts/Release/VST3/NeuralPi.vst3")
fi
echo "Pluginval installed at ${pluginval}"
-echo "Validating ${plugin}"
-$pluginval --strictness-level 8 --validate-in-process --validate $plugin --timeout-ms 600000
-result=$?
+
+# run
+for plugin in "${plugins[@]}"; do
+ echo "Validating ${plugin}"
+ $pluginval --strictness-level 8 --validate-in-process --validate $plugin
+done
# clean up
rm -Rf pluginval*
-exit $result