mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-06-12 15:22:17 +02:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 37f5071e6a | |||
| f84082b42d | |||
| 83e197721c | |||
| f76554aea0 | |||
| 9e704c0ce9 | |||
| f813aa449c | |||
| c48fd2d230 | |||
| 23c97c61e3 | |||
| 844766e614 | |||
| 437b8cc254 | |||
| 02ad319440 | |||
| 8ee50ccdbf | |||
| 4d4f613be9 | |||
| 01642fa580 | |||
| f774aad19d | |||
| cab4b549d7 | |||
| 4047eea241 | |||
| 1072326eb1 | |||
| fe172b94b5 | |||
| d15d078b23 | |||
| 2ae1cb7a05 | |||
| 6896f40711 | |||
| a19b9bab8b | |||
| 17dc4edff2 | |||
| a8ba46997b | |||
| aca77c2590 | |||
| d35db9c0c1 | |||
| fcbe0a24db | |||
| 1b98cb8891 | |||
| 8493866b21 | |||
| 2e103a104b | |||
| c7d55312c0 |
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. Please do not include AI chat transcripts.
|
||||
|
||||
**Environment**
|
||||
Please include information on the operating system and plugin host environment where you are experiencing the issue. If you can, please test in multiple different contexts (ie: different DAWs)
|
||||
|
||||
**Additional Information**
|
||||
Please add any additional detail here.
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
env:
|
||||
CXX: clang++
|
||||
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
|
||||
cpack
|
||||
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
- name: Build Plugin
|
||||
working-directory: ${{github.workspace}}/build
|
||||
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
|
||||
|
||||
- name: Run ModelTest
|
||||
|
||||
@@ -31,7 +31,12 @@ jobs:
|
||||
build-linux-x64:
|
||||
name: Build Linux x64
|
||||
needs: create_release
|
||||
strategy:
|
||||
matrix:
|
||||
native_arch: [ON, OFF]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARCHIVE_NAME: neural_amp_modeler_lv2_linux_x64${{ matrix.native_arch == 'ON' && 'v3' || '' }}.tgz
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
with:
|
||||
@@ -42,12 +47,12 @@ jobs:
|
||||
env:
|
||||
CXX: clang++
|
||||
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
|
||||
|
||||
- name: Add LV2 Archive
|
||||
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
|
||||
uses: actions/upload-release-asset@v1
|
||||
@@ -55,30 +60,35 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./build/neural_amp_modeler_lv2_linux_x64.tgz
|
||||
asset_name: neural_amp_modeler_lv2_linux_x64.tgz
|
||||
asset_path: ./build/${{ env.ARCHIVE_NAME }}
|
||||
asset_name: ${{ env.ARCHIVE_NAME }}
|
||||
asset_content_type: application/tgz
|
||||
|
||||
build-linux-x64v3:
|
||||
name: Build Linux x64v3
|
||||
build-rpi:
|
||||
name: Build Raspberry Pi
|
||||
needs: create_release
|
||||
strategy:
|
||||
matrix:
|
||||
native_arch: [rpi4, rpi5]
|
||||
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:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
|
||||
- name: Build Plugin
|
||||
working-directory: ${{github.workspace}}/build
|
||||
env:
|
||||
CXX: clang++
|
||||
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
|
||||
|
||||
- name: Add LV2 Archive
|
||||
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
|
||||
uses: actions/upload-release-asset@v1
|
||||
@@ -86,14 +96,19 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./build/neural_amp_modeler_lv2_linux_x64v3.tgz
|
||||
asset_name: neural_amp_modeler_lv2_linux_x64v3.tgz
|
||||
asset_path: ./build/${{ env.ARCHIVE_NAME }}
|
||||
asset_name: ${{ env.ARCHIVE_NAME }}
|
||||
asset_content_type: application/tgz
|
||||
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
needs: create_release
|
||||
strategy:
|
||||
matrix:
|
||||
native_arch: [ON, OFF]
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
ARCHIVE_NAME: neural_amp_modeler_lv2_win_x64${{ matrix.native_arch == 'ON' && 'v3' || '' }}.zip
|
||||
steps:
|
||||
- uses: actions/checkout@v3.3.0
|
||||
with:
|
||||
@@ -102,11 +117,11 @@ jobs:
|
||||
- name: Build Plugin
|
||||
working-directory: ${{github.workspace}}/build
|
||||
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
|
||||
|
||||
- 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
|
||||
uses: actions/upload-release-asset@v1
|
||||
@@ -114,34 +129,6 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||
asset_path: ./neural_amp_modeler_lv2_win_x64.zip
|
||||
asset_name: neural_amp_modeler_lv2_win_x64.zip
|
||||
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_path: ./${{ env.ARCHIVE_NAME }}
|
||||
asset_name: ${{ env.ARCHIVE_NAME }}
|
||||
asset_content_type: application/zip
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
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(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "The library install dir (default: lib)")
|
||||
|
||||
@@ -9,20 +9,25 @@ To get the intended behavior, **you must run your audio host at the same sample
|
||||
|
||||
For amp-only models (the most typical), **you will need to run an impulse reponse after this plugin** to model the cabinet.
|
||||
|
||||
## Models Supported
|
||||
## Usage
|
||||
|
||||
The plugin supports both [Neural Amp Modeler (NAM)](https://github.com/sdatkinson/neural-amp-modeler) models and [RTNeural keras json models](https://github.com/jatinchowdhury18/RTNeural) (like those used by [Aida-X](https://github.com/AidaDSP/AIDA-X)).
|
||||
Your DAW should expose the following input controls:
|
||||
|
||||
**Input:** - Input (pre-model) gain in dB.
|
||||
|
||||
**Output:** - Output (post-model) volume in dB.
|
||||
|
||||
**Quality:** - Model quality (if applicable). For NAM A2 models, a value below 0.5 will give you a "lite" model and a value above 0.5 will give you a "full" model.
|
||||
|
||||
**Model:** - The model file (ie: xxx.nam) to use.
|
||||
|
||||
## Models Supported and Performance
|
||||
|
||||
The plugin supports both [Neural Amp Modeler (NAM)](https://github.com/sdatkinson/neural-amp-modeler) models (both A1 and A2) and [RTNeural keras json models](https://github.com/jatinchowdhury18/RTNeural) (like those used by [Aida-X](https://github.com/AidaDSP/AIDA-X)).
|
||||
|
||||
The best source of models is [Tone3000](https://www.tone3000.com/).
|
||||
|
||||
For more information on model type support, see the [NeuralAudio](https://github.com/mikeoliphant/NeuralAudio) repository, which is where the model handling code lives.
|
||||
|
||||
## Performance
|
||||
|
||||
NAM WaveNet models are generally quite expensive to run. This isn't (much of) an issue on modern PCs, but you may have trouble running on less powerful hardware.
|
||||
|
||||
If you are having trouble running a "standard" model, try looking for "feather", or even "nano" (the least expensive) models. You can find a list of ["feather"-tagged models on Tone3000](https://www.tone3000.com/search?sizes=feather). Note that tagging models is up to the submitter, so not all "feather" models are tagged as such - you should be able to find more if you dig around.
|
||||
|
||||
For more information on model type support and performance, see the [NeuralAudio](https://github.com/mikeoliphant/NeuralAudio) repository, which is where the model handling code lives.
|
||||
|
||||
## Input Calibration
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule deps/NeuralAudio updated: 05d9fbdc95...82ac690900
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,12 +0,0 @@
|
||||
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).
|
||||
|
||||
All models were trained for 300 epochs using the NAM "v1_1_1.wav" capture signal.
|
||||
|
||||
| Model | ESR | CPU%<br>(RPi4 64bit) | Notes |
|
||||
| --- |--- | :-: | --- |
|
||||
| [BossWN-feather.nam](https://github.com/mikeoliphant/neural-amp-modeler-lv2/blob/main/models/BossWN-feather.nam) | .0001 | 37% | WaveNet "feather" preset |
|
||||
| [BossWN-4x2x1.nam](https://github.com/mikeoliphant/neural-amp-modeler-lv2/blob/main/models/BossWN-4x2x1.nam) | .0003 | 28% | WaveNet 4x2 channel |
|
||||
| [BossLSTM-2x16.nam](https://github.com/mikeoliphant/neural-amp-modeler-lv2/blob/main/models/BossLSTM-2x16.nam) | .0013 | 28% | LSTM 2x16 layers |
|
||||
| [BossLSTM-1x24.nam](https://github.com/mikeoliphant/neural-amp-modeler-lv2/blob/main/models/BossLSTM-1x24.nam) | .0017 | 22% | LSTM 1x24 layer |
|
||||
| [BossLSTM-2x8.nam](https://github.com/mikeoliphant/neural-amp-modeler-lv2/blob/main/models/BossLSTM-2x8.nam) | .0019 | 17% | LSTM 2x8 layers |
|
||||
| [BossLSTM-1x16.nam](https://github.com/mikeoliphant/neural-amp-modeler-lv2/blob/main/models/BossLSTM-1x16.nam) | .0041 | 15% | LSTM 1x16 layer |
|
||||
@@ -45,7 +45,7 @@ Models supported:
|
||||
Neural Amp Modeler (NAM): https://github.com/sdatkinson/neural-amp-modeler
|
||||
RTNeural keras/Aida-x models: https://github.com/jatinchowdhury18/RTNeural
|
||||
|
||||
A large collection of models is available at https://tonehunt.org
|
||||
A large collection of models is available at https://www.tone3000.com
|
||||
""";
|
||||
|
||||
patch:writable <@NAM_LV2_ID@#model>;
|
||||
|
||||
@@ -58,6 +58,9 @@ option(SMART_BYPASS_ENABLED "Enable auto-bypass on silence" OFF)
|
||||
|
||||
if (SMART_BYPASS_ENABLED)
|
||||
add_definitions(-DSMART_BYPASS_ENABLED)
|
||||
message(STATUS "Smart Bypass enabled")
|
||||
else()
|
||||
message(STATUS "Smart Bypass NOT enabled")
|
||||
endif (SMART_BYPASS_ENABLED)
|
||||
|
||||
set_target_properties(neural_amp_modeler
|
||||
|
||||
+3
-3
@@ -128,7 +128,7 @@ namespace NAM {
|
||||
{
|
||||
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)
|
||||
@@ -212,7 +212,7 @@ namespace NAM {
|
||||
{
|
||||
maxBufferSize = size;
|
||||
|
||||
NeuralAudio::NeuralModel::SetDefaultMaxAudioBufferSize(size);
|
||||
loader.SetDefaultMaxAudioBufferSize(size);
|
||||
}
|
||||
|
||||
void Plugin::process(uint32_t n_samples) noexcept
|
||||
@@ -256,7 +256,7 @@ namespace NAM {
|
||||
{
|
||||
qualityScale = *(ports.quality_scale);
|
||||
|
||||
NeuralAudio::NeuralModel::SetDefaultQualityScaleFactor(qualityScale);
|
||||
loader.SetDefaultQualityScaleFactor(qualityScale);
|
||||
|
||||
if (currentModel != nullptr)
|
||||
{
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace NAM {
|
||||
LV2_Log_Logger logger = {};
|
||||
LV2_Worker_Schedule* schedule = nullptr;
|
||||
|
||||
NeuralAudio::NeuralModelLoader loader;
|
||||
NeuralAudio::NeuralModel* currentModel = nullptr;
|
||||
std::string currentModelPath;
|
||||
float prevDCInput = 0;
|
||||
|
||||
Reference in New Issue
Block a user