mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-06-12 15:22:17 +02:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 844766e614 | |||
| 437b8cc254 | |||
| 02ad319440 | |||
| 8ee50ccdbf | |||
| 4d4f613be9 | |||
| 01642fa580 | |||
| f774aad19d | |||
| cab4b549d7 | |||
| 4047eea241 | |||
| 1072326eb1 | |||
| fe172b94b5 | |||
| d15d078b23 | |||
| 2ae1cb7a05 | |||
| 6896f40711 | |||
| a19b9bab8b | |||
| 17dc4edff2 | |||
| a8ba46997b | |||
| aca77c2590 | |||
| d35db9c0c1 | |||
| fcbe0a24db | |||
| 1b98cb8891 | |||
| 8493866b21 | |||
| 2e103a104b | |||
| c7d55312c0 |
@@ -20,7 +20,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
run: |
|
run: |
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_UTILS=ON -DBUILD_NAMCORE=ON -DBUILD_STATIC_RTNEURAL=ON
|
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_UTILS=ON -DBUILD_INTERNAL_STATIC_WAVENET=ON -DBUILD_INTERNAL_STATIC_LSTM=ON -DBUILD_NAMCORE=ON -DBUILD_STATIC_RTNEURAL=ON
|
||||||
cmake --build . --config $BUILD_TYPE -j4
|
cmake --build . --config $BUILD_TYPE -j4
|
||||||
cpack
|
cpack
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ jobs:
|
|||||||
- name: Build Plugin
|
- name: Build Plugin
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: |
|
run: |
|
||||||
cmake.exe -G "Visual Studio 17 2022" -A x64 -DBUILD_UTILS=ON -DBUILD_NAMCORE=ON -DBUILD_STATIC_RTNEURAL=ON -T ClangCL ..
|
cmake.exe -G "Visual Studio 17 2022" -A x64 -DBUILD_UTILS=ON -DBUILD_INTERNAL_STATIC_WAVENET=ON -DBUILD_INTERNAL_STATIC_LSTM=ON -DBUILD_NAMCORE=ON -DBUILD_STATIC_RTNEURAL=ON -T ClangCL ..
|
||||||
cmake --build . --config=release -j4
|
cmake --build . --config=release -j4
|
||||||
|
|
||||||
- name: Run ModelTest
|
- name: Run ModelTest
|
||||||
|
|||||||
@@ -31,7 +31,12 @@ jobs:
|
|||||||
build-linux-x64:
|
build-linux-x64:
|
||||||
name: Build Linux x64
|
name: Build Linux x64
|
||||||
needs: create_release
|
needs: create_release
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
native_arch: [ON, OFF]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
ARCHIVE_NAME: neural_amp_modeler_lv2_linux_x64${{ matrix.native_arch == 'ON' && 'v3' || '' }}.tgz
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.3.0
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
@@ -42,12 +47,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
run: |
|
run: |
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DLSTM_PREFER_NAM=OFF -DWAVENET_PREFER_NAM=OFF
|
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSE_NATIVE_ARCH=${{ matrix.native_arch }} -DBUILD_NAMCORE=ON -DBUILD_INTERNAL_STATIC_WAVENET=ON -DBUILD_INTERNAL_STATIC_LSTM=ON
|
||||||
cmake --build . --config $BUILD_TYPE -j4
|
cmake --build . --config $BUILD_TYPE -j4
|
||||||
|
|
||||||
- name: Add LV2 Archive
|
- name: Add LV2 Archive
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: tar -czf neural_amp_modeler_lv2_linux_x64.tgz neural_amp_modeler.lv2
|
run: tar -czf ${{ env.ARCHIVE_NAME }} neural_amp_modeler.lv2
|
||||||
|
|
||||||
- name: Upload Plugin Asset
|
- name: Upload Plugin Asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
@@ -55,30 +60,35 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
asset_path: ./build/neural_amp_modeler_lv2_linux_x64.tgz
|
asset_path: ./build/${{ env.ARCHIVE_NAME }}
|
||||||
asset_name: neural_amp_modeler_lv2_linux_x64.tgz
|
asset_name: ${{ env.ARCHIVE_NAME }}
|
||||||
asset_content_type: application/tgz
|
asset_content_type: application/tgz
|
||||||
|
|
||||||
build-linux-x64v3:
|
build-rpi:
|
||||||
name: Build Linux x64v3
|
name: Build Raspberry Pi
|
||||||
needs: create_release
|
needs: create_release
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
native_arch: [rpi4, rpi5]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/tttapa/docker-arm-cross-toolchain:aarch64-rpi3-linux-gnu-gcc12
|
||||||
|
env:
|
||||||
|
ARCHIVE_NAME: neural_amp_modeler_lv2_${{ matrix.native_arch }}.tgz
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.3.0
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Build Plugin
|
- name: Build Plugin
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
env:
|
|
||||||
CXX: clang++
|
|
||||||
run: |
|
run: |
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DUSE_NATIVE_ARCH=ON -DLSTM_PREFER_NAM=OFF -DWAVENET_PREFER_NAM=OFF
|
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_NAMCORE=ON -DBUILD_INTERNAL_STATIC_WAVENET=ON -DBUILD_INTERNAL_STATIC_LSTM=ON -DCMAKE_TOOLCHAIN_FILE=/home/develop/opt/x-tools/aarch64-rpi3-linux-gnu/aarch64-${{ matrix.native_arch }}-linux-gnu.toolchain.cmake
|
||||||
cmake --build . --config $BUILD_TYPE -j4
|
cmake --build . --config $BUILD_TYPE -j4
|
||||||
|
|
||||||
- name: Add LV2 Archive
|
- name: Add LV2 Archive
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: tar -czf neural_amp_modeler_lv2_linux_x64v3.tgz neural_amp_modeler.lv2
|
run: tar -czf ${{ env.ARCHIVE_NAME }} neural_amp_modeler.lv2
|
||||||
|
|
||||||
- name: Upload Plugin Asset
|
- name: Upload Plugin Asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
@@ -86,14 +96,19 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
asset_path: ./build/neural_amp_modeler_lv2_linux_x64v3.tgz
|
asset_path: ./build/${{ env.ARCHIVE_NAME }}
|
||||||
asset_name: neural_amp_modeler_lv2_linux_x64v3.tgz
|
asset_name: ${{ env.ARCHIVE_NAME }}
|
||||||
asset_content_type: application/tgz
|
asset_content_type: application/tgz
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Build Windows
|
name: Build Windows
|
||||||
needs: create_release
|
needs: create_release
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
native_arch: [ON, OFF]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
env:
|
||||||
|
ARCHIVE_NAME: neural_amp_modeler_lv2_win_x64${{ matrix.native_arch == 'ON' && 'v3' || '' }}.zip
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.3.0
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
@@ -102,11 +117,11 @@ jobs:
|
|||||||
- name: Build Plugin
|
- name: Build Plugin
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: |
|
run: |
|
||||||
cmake.exe -G "Visual Studio 17 2022" -A x64 -T ClangCL -DLSTM_PREFER_NAM=OFF -DWAVENET_PREFER_NAM=OFF ..
|
cmake.exe -G "Visual Studio 17 2022" -A x64 -T ClangCL -DUSE_NATIVE_ARCH=${{ matrix.native_arch }} -DBUILD_NAMCORE=ON -DBUILD_INTERNAL_STATIC_WAVENET=ON -DBUILD_INTERNAL_STATIC_LSTM=ON ..
|
||||||
cmake --build . --config=release -j4
|
cmake --build . --config=release -j4
|
||||||
|
|
||||||
- name: Add LV2 Archive
|
- name: Add LV2 Archive
|
||||||
run: Compress-Archive -Path ${{github.workspace}}\build\neural_amp_modeler.lv2 -Destination neural_amp_modeler_lv2_win_x64.zip
|
run: Compress-Archive -Path ${{github.workspace}}\build\neural_amp_modeler.lv2 -Destination ${{ env.ARCHIVE_NAME }}
|
||||||
|
|
||||||
- name: Upload Plugin Asset
|
- name: Upload Plugin Asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
@@ -114,34 +129,6 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
asset_path: ./neural_amp_modeler_lv2_win_x64.zip
|
asset_path: ./${{ env.ARCHIVE_NAME }}
|
||||||
asset_name: neural_amp_modeler_lv2_win_x64.zip
|
asset_name: ${{ env.ARCHIVE_NAME }}
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
build-windows-x64v3:
|
|
||||||
name: Build Windows x64v3
|
|
||||||
needs: create_release
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.3.0
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Build Plugin
|
|
||||||
working-directory: ${{github.workspace}}/build
|
|
||||||
run: |
|
|
||||||
cmake.exe -G "Visual Studio 17 2022" -A x64 -DUSE_NATIVE_ARCH=ON -DLSTM_PREFER_NAM=OFF -DWAVENET_PREFER_NAM=OFF -T ClangCL ..
|
|
||||||
cmake --build . --config=release -j4
|
|
||||||
|
|
||||||
- name: Add LV2 Archive
|
|
||||||
run: Compress-Archive -Path ${{github.workspace}}\build\neural_amp_modeler.lv2 -Destination neural_amp_modeler_lv2_win_x64v3.zip
|
|
||||||
|
|
||||||
- name: Upload Plugin Asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./neural_amp_modeler_lv2_win_x64v3.zip
|
|
||||||
asset_name: neural_amp_modeler_lv2_win_x64v3.zip
|
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
project(NeuralAmpModelerLv2 VERSION 0.1.9)
|
project(NeuralAmpModelerLv2 VERSION 0.2.0)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "The library install dir (default: lib)")
|
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "The library install dir (default: lib)")
|
||||||
|
|||||||
Vendored
+1
-1
Submodule deps/NeuralAudio updated: 05d9fbdc95...3ad5806370
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
These are some sample NAM models designed to be used for performance testing on CPU-limited devices. They are all based on a [LiveSpice model of a Boss SD-1 pedal](https://blog.nostatic.org/2023/04/this-boss-sd-1-pedal-does-not-exist.html).
|
These are some sample NAM models designed to be used for performance testing on CPU-limited devices. They are all based on a [LiveSpice model of a Boss SD-1 pedal](https://blog.nostatic.org/2023/04/this-boss-sd-1-pedal-does-not-exist.html). They are provided here under the [CC BY-NC-ND 4.0 license](https://creativecommons.org/licenses/by-nc-nd/4.0/deed.en).
|
||||||
|
|
||||||
All models were trained for 300 epochs using the NAM "v1_1_1.wav" capture signal.
|
All models were trained for 300 epochs using the NAM "v1_1_1.wav" capture signal.
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -128,7 +128,7 @@ namespace NAM {
|
|||||||
{
|
{
|
||||||
lv2_log_trace(&nam->logger, "Staging model change: `%s`\n", msg->path);
|
lv2_log_trace(&nam->logger, "Staging model change: `%s`\n", msg->path);
|
||||||
|
|
||||||
model = NeuralAudio::NeuralModel::CreateFromFile(msg->path);
|
model = nam->loader.CreateFromFile(msg->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model != nullptr)
|
if (model != nullptr)
|
||||||
@@ -212,7 +212,7 @@ namespace NAM {
|
|||||||
{
|
{
|
||||||
maxBufferSize = size;
|
maxBufferSize = size;
|
||||||
|
|
||||||
NeuralAudio::NeuralModel::SetDefaultMaxAudioBufferSize(size);
|
loader.SetDefaultMaxAudioBufferSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plugin::process(uint32_t n_samples) noexcept
|
void Plugin::process(uint32_t n_samples) noexcept
|
||||||
@@ -256,7 +256,7 @@ namespace NAM {
|
|||||||
{
|
{
|
||||||
qualityScale = *(ports.quality_scale);
|
qualityScale = *(ports.quality_scale);
|
||||||
|
|
||||||
NeuralAudio::NeuralModel::SetDefaultQualityScaleFactor(qualityScale);
|
loader.SetDefaultQualityScaleFactor(qualityScale);
|
||||||
|
|
||||||
if (currentModel != nullptr)
|
if (currentModel != nullptr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ namespace NAM {
|
|||||||
LV2_Log_Logger logger = {};
|
LV2_Log_Logger logger = {};
|
||||||
LV2_Worker_Schedule* schedule = nullptr;
|
LV2_Worker_Schedule* schedule = nullptr;
|
||||||
|
|
||||||
|
NeuralAudio::NeuralModelLoader loader;
|
||||||
NeuralAudio::NeuralModel* currentModel = nullptr;
|
NeuralAudio::NeuralModel* currentModel = nullptr;
|
||||||
std::string currentModelPath;
|
std::string currentModelPath;
|
||||||
float prevDCInput = 0;
|
float prevDCInput = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user