sdatkinson / neural-amp-modeler

Neural network emulator for guitar amplifiers.
MIT License
1.82k stars 142 forks source link

[FEATURE] bin/run.py should be easier to use for processing a wav file with a nam model #329

Closed EdwardPayne closed 11 months ago

EdwardPayne commented 11 months ago

bin/run.py is too complicated to use for processing a wav file with a nam model. I don't want to install too many things on my linux server to process a wav file with a nam model. My purpose is to batch process many guitar DIs with different NAM-model files and output them to a directory.

I want to process a guitar DI file offline to process it with my NAM-model. The input parameters today are not easy to understand and I have to install Anaconda to use it. The NAM VST/AU plugin don't need anaconda - right?

What I want is to simply run something like this:

run.py marshallAmp.nam guitarDI.wav cabinet-ir.wav outputfile.wav

# or compile it to a binary instead of python in the future?

./nam-modeler marshallAmp.nam guitarDI.wav cabinet-ir.wav outputfile.wav

Maybe add a settings.json file with settings for the amps gain, treble, mids, bass like.

run.py settings.json marshallAmp.nam guitarDI.wav cabinet-ir.wav outputfile.wav
{
 "bass": 5,
 "mid": 5,
 "treble": 5
 "gain": 10
}
sdatkinson commented 11 months ago

I guess the root of the confusion here is that .nam sort of imply an "exit" from the (Python-based) training setting, and into the (mainly C++) end-usage setting.

This script could definitely be improved if #233 were shipped--then you wouldn't need the model configuration JSON and the PyTorch model checkpoint.

However, that still isn't going to solve your problem with Python and its weighty dependencies--and that's the real part that's going to give you trouble here.

The NAM VST/AU plugin don't need anaconda - right?

Correct--it's written in a different language (C++)!

For your use case, I recommend having a look at the NeuralAmpModelerCore repository and consider writing a little C++ program to do what you're looking for. Something like benchmodel.cpp would be a great starting point.


Let me know if either (a) we're going to close this because you're doing the second suggestion, or (b) if this will turn into an Issue about using #233's functionality in run.py.

EdwardPayne commented 11 months ago

I guess the root of the confusion here is that .nam sort of imply an "exit" from the (Python-based) training setting, and into the (mainly C++) end-usage setting.

This script could definitely be improved if #233 were shipped--then you wouldn't need the model configuration JSON and the PyTorch model checkpoint.

However, that still isn't going to solve your problem with Python and its weighty dependencies--and that's the real part that's going to give you trouble here.

The NAM VST/AU plugin don't need anaconda - right?

Correct--it's written in a different language (C++)!

For your use case, I recommend having a look at the NeuralAmpModelerCore repository and consider writing a little C++ program to do what you're looking for. Something like benchmodel.cpp would be a great starting point.

Let me know if either (a) we're going to close this because you're doing the second suggestion, or (b) if this will turn into an Issue about using #233's functionality in run.py.

Thank you, yes the option with NeuralAmpModelerCore is more what I really want. I will take a look at that. But I will need some help with that and I don't expect any of you to help me but IF.. if someone see this and feels like helping out. I am a developer, but C++ is not my experise.