Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Newly (Today) created LSTM creates aliasing sounding artifacts until fully driven and backed down [VIDEO attached] #524

Open
38github opened this issue Dec 31, 2024 · 10 comments
Labels
bug Something isn't working priority:low Low-priority issues

Comments

@38github
Copy link

38github commented Dec 31, 2024

Describe the bug
When loading the LSTM model the sound is full of what I call "aliasing sounding" artifacts. These however go away when I push the input to max (20dB) and then back down. I have never experienced this before.

To Reproduce
See video.

Expected behavior
No such artifacts

Screenshots
Video
Untitled Project.webm

Desktop (please complete the following information):

  • Linux Tumbleweed (x86_64)

Additional context
I used both Neural Amp Modeler LV2 and Ratatouille to demonstrate in the video.

NAM file affected by this
1959hw-crunch-48khz-lstm-nl2hs28.zip

@38github 38github added bug Something isn't working priority:low Low-priority issues unread This issue is new and hasn't been seen by the maintainers yet labels Dec 31, 2024
@38github
Copy link
Author

Maybe @brummer10 and @mikeoliphant can also help out since I experienced it with their plugins.

@38github
Copy link
Author

Maybe this Issue should be in the NeuralAmpModelerCore repository instead? If so I apologise for the inconvenience.

@38github
Copy link
Author

I compiled neural-amp-modeler-lv2 with -DLSTM_PREFER_NAM=OFF which I believe makes it use RTNEURAL for LSTMs but it still had issues.

@38github
Copy link
Author

Now I have also tried it using Steve's plugin under Windows and it behaves the same way.

@sdatkinson
Copy link
Owner

Thanks for the bug report.

My intuition is that it's a problem with the initial values that the hidden/cell states are set to.

If I'm right, then if you re-train the model, then it may turn out fine. You should set the RNG seed to something different to be sure.

I don't have time right now to check in more detail, but I'll get it queued up.

@sdatkinson sdatkinson removed the unread This issue is new and hasn't been seen by the maintainers yet label Dec 31, 2024
@38github
Copy link
Author

38github commented Jan 1, 2025

If I'm right, then if you re-train the model, then it may turn out fine. You should set the RNG seed to something different to be sure.

No problem at all. I will have to read up on RNG seed!

@mikeoliphant
Copy link
Contributor

I wonder if this could potentially be a problem caused by the sigmoid approximation?

@38github To test, you would need to comment out the call to "nam::activations::Activation::enable_fast_tanh();" (which also enables fast sigmoid in LSTM) in whatever plugin you want to test with.

@38github
Copy link
Author

38github commented Jan 2, 2025

I wonder if this could potentially be a problem caused by the sigmoid approximation?

@38github To test, you would need to comment out the call to "nam::activations::Activation::enable_fast_tanh();" (which also enables fast sigmoid in LSTM) in whatever plugin you want to test with.

Thank you Mike for "joining the issue"! Can you give me a hint where I can find and comment out that? Which file? Regards.

@mikeoliphant
Copy link
Contributor

Can you give me a hint where I can find and comment out that? Which file? Regards.

For the lv2 plugin, you need to do it in "/deps/NeuralAudio/NeuralAudio/NAMModel.h":

https://github.com/mikeoliphant/NeuralAudio/blob/84ef71b3189685dbab7a4757f19907dcb9e1d803/NeuralAudio/NAMModel.h#L16

@mikeoliphant
Copy link
Contributor

Make sure you aren't do cmake with "-DLSTM_PREFER_NAM=OFF" - otherwise you'll get the RTNeural version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low Low-priority issues
Projects
None yet
Development

No branches or pull requests

3 participants