Nbickford / REAPERDenoiser

Tutorial source code: A JSFX denoiser for REAPER based on Norbert Weiner's deconvolution algorithm.
MIT License
24 stars 2 forks source link

Compilation error (version differences?) #1

Closed micsthepick closed 4 years ago

micsthepick commented 4 years ago

attempting to compile the plugin with the ReaJS 236 VST 2 from ReaPlugs, on Windows fails with the error

@sample: 121 'fft_real' undefined: 'fft_real(bufferI1L, SIZE)'

image

I suspect the issue is that fft_real is a newer function, and that that ReaPlugs is just outdated. It looks like fff and ifft are both valid functions, but fft_real is not. I also tried fftr, but that is also undefined

Nbickford commented 4 years ago

Interesting! I bet you’re probably right about ReaPlugs being outdated, I had no idea - let me see if I can reproduce this issue this week. Worst case scenario, it should be possible to use the complex FFT instead (at the expense of some additional computational cost), or maybe there’s some way to update ReaPlugs. Thank you!

(P.S. I’m glad to hear that people are trying to use this!)

On Wed, Jun 10, 2020 at 12:35 AM micsthepick notifications@github.com wrote:

attempting to compile the plugin with the ReaJS 236 VST 2 from ReaPlugs https://www.reaper.fm/reaplugs/, on Windows fails with the error

@sample: 121 'fft_real' undefined: 'fft_real(bufferI1L, SIZE);'

[image: image] https://user-images.githubusercontent.com/11528421/84234459-a780ab80-ab37-11ea-8f2d-b2a49d8fe48f.png

I suspect the issue is that fft_real is a newer function, and that that ReaPlugs is just outdated. It looks like fff and ifft are both valid functions, but fft_real is not. I also tried fftr, but that is also undefined

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Nbickford/REAPERDenoiser/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIFUVOT5OJHQYL2A4IDP5TRV4ZUVANCNFSM4N2DP7AQ .

Nbickford commented 4 years ago

Quick update: I haven't had the chance to work on this yet, unfortunately, but have been able to confirm that this breaks on fft_real as you describe on the most recent version of ReaPlugs (2016) in Ableton. I'll see if I can send Cockos an email, and modify the JS code to use fft instead of fft_real.

micsthepick commented 4 years ago

ok, thanks for your help!

Nbickford commented 4 years ago

Hi micsthepick! I think commit https://github.com/Nbickford/REAPERDenoiser/commit/80c825a8177a22c51555b8cbe70a1e5b0c54ea6c should hopefully fix this - it replaces fft_real with a complex-valued FFT with some logic to convert between buffers of real values and buffers of complex values. This seems to fix the compatibility issue for me when running ReaPlugs inside Ableton 10! The blog post has also been updated to let readers know that it will be updated.

Let me know if this works for you (sorry for the delay)!

micsthepick commented 4 years ago

That seems to work well. Thanks for your help.

I was wondering if you would be interested in helping me make a JSFX plugin that uses the fft with the mid and side channels to make a weighted center channel for vocal reduction or isolation?

Nbickford commented 4 years ago

That's fantastic to hear!

I've unfortunately got a bit much on my plate on the moment, but there are a couple of things you can do! One not too tricky way to do this (which I think is similar to how Audacity's Vocal Reduction and Isolation plugin does it, although I'm not 100% sure - you can find the source code for Audacity's Vocal Reduction and Isolation at https://github.com/audacity/audacity/blob/master/plug-ins/vocalrediso.ny) is to convert the stereo L/R signal into mid-side format. Then treat the side channel as noise and apply this denoising algorithm to the mid signal to isolate the content of the mid channel from the side channel content.

I think the current state-of-the-art for this is to use a neural sound source separation approach - although this is a very active area of research and most papers on it don't seem to release their trained models, Deezer recently released their sound source separation engine (https://deezer.io/releasing-spleeter-deezer-r-d-source-separation-engine-2b88985e797e), and yan/azuki and Guillaume Vincke turned this into a VST: https://github.com/diracdeltas/vstSpleeter

Hope this helps!

micsthepick commented 4 years ago

I was aware of and have started to port the Audacity vocal reduction filter that you linked to to JSFX, the idea being that I can use it live, instead of just with recordings. I'm basing my code off of your filter. I might open a repo for the code, then you can look at it when you like.

micsthepick commented 4 years ago

I've implemented the algorithm as it's own repository, instead of forking this one. https://github.com/micsthepick/JSVocalRedIso . Looks like I didn't need help after all, since I managed to get it to work fine. Thanks for making this plugin!