lucianodato / noise-repellent

Lv2 suite of plugins for broadband noise reduction
GNU Lesser General Public License v3.0
455 stars 38 forks source link

Sidechain noise source input #74

Open unfa opened 3 years ago

unfa commented 3 years ago

I wonder if it'd be possible to use a separate input for realtime noise profiling.

Use case:

Have a close mic to capture the subject. Have a far mic to capture the noise.

Use the far mic to remove background noise from the close mic.

I think this is what most smartphones do to clean up the call audio.

Efenstor commented 3 years ago

@unfa Interesting idea, but as far as I know Noise Repellent in its current form won't help much here because it provides only broadband noise reduction, while what you suggest is the dynamic noise subtraction (or whatever it's usually called). Of course it can be implemented, but shall require a lot of work. I guess.

pms967 commented 3 years ago

@unfa Interesting idea, but as far as I know Noise Repellent in its current form won't help much here because it provides only broadband noise reduction, while what you suggest is the dynamic noise subtraction (or whatever it's usually called).

"Dynamic noise subtraction" would not work, as the signals from the two mics would not be in phase (they would not even be exactly the same, for that matter). Dynamic multiband gating based on sidechain may work, though.

FrnchFrgg commented 3 years ago

@Efenstor What @unfa suggests seems more to ask for using another input to be used for the automatic incremental noise analysis mode. That way, you can have a mic closer to the noise source and farther from the signal that you absolutely do not want the algorithm to consider as noise. The "noise spectrum" would still be analyzed, and subtracted in the frequency domain.

The advantage would be to have the noise profile adapt to (slow) changes in the noise, without needing to carefully select parts where you know there is no wanted signal, yet not risking for wanted frequencies to be detected as noise.

Efenstor commented 3 years ago

@FrnchFrgg Yeah, that should work. But the microphones should ideally be identical. Besides, some pure signal will still be heard by the second mike and it will be quite different in spectrum and in dynamics... I don't know. Having a sidechain noise source in whole is a good thing to have but as of how exactly to use it is another topic.

unfa commented 3 years ago

I wonder how does it work in smartphones.... Maybe they are also tuned to use the rear-facing microphone for noise rejection. I thought maybe the spectral substraction could be performed not against a static noise profile stored inside of the plug-in, but against a live audio input. Kinda of "active noise cancelling" but without necessarily needing the signal phases to be perfectly aligned.

Efenstor commented 3 years ago

@unfa I think smartphones and noise-cancelling headphones do it with hardware, thus with zero latency: they simply take the signal from the rear mic, invert its phase and mix it with the signal of the front mic, then probably also amplify the resulting signal quite a bit. Additional amplification may be needed because I guess the resulting useful signal is very quiet, because the rear mic is still picking up a lot of the same useful signal as the front mic.

unfa commented 3 years ago

@Efenstor I don't think it's that simple. On my phone which is OnePlus 5T the 2 microphones are more than 10 cm apart. For anything but the lowest frequencies this would be completely off in regards to phase. So I think some spectral analysis and subtraction must be taking place or this wouldn't work. I think active noise canceling headphones can place the microphones much closer to the sound source, minimizing the phase offset.

Efenstor commented 3 years ago

@unfa Well, I think there's no need for us to invent the wheel, dear fellow ))) Just read some patents: https://patents.google.com/?q=active+noise+cancellation

lucianodato commented 2 years ago

Hey guys! sorry for the absolutely ridiculous delay in my response (life got in my way). Sounds like and adaptive feature. There are plenty to look for in the science department to do that. I used to have a method working in previous versions but it was really low quality (probably because of my implementation and not the method). Either way I think of noise repellent like the spectral denoise module in iZotope RX. So the idea is that it should work better for post than for real time. Speech denoise does much better in the adapting department if that's what you are looking for. By the way @unfa I've been watching your videos lately. You are killing it!

unfa commented 2 years ago

@lucianodato Thanks for your eventual response though :D

I was hoping Nosie Repellent could be used with a secondary mic for live de-reverberation of sorts or to increase source separation (kinda like noise-cancelling heaphones only done in frequency domain not by simple wave substracion, as that wouldn't work unless we've designed a well tuned hardware system for that).

I am currently using Noie Repellent in my live streaming/recording processing chain to lower the amount of background noise before I gate it.

Speech Denoiser is nice, but it's a bit limited in options for my needs.

lucianodato commented 2 years ago

I don't think that noise-repellent is good for de-verb purposes. There are probably better algorithms for that. Still nothing in the opensource world?

unfa commented 2 years ago

I have not seen a single one. And I've been looking. Postfish seemed to have somethig but it did not work for me at all. Plus is super old.

lucianodato commented 2 years ago

Yeah I feel you. I think that's a good opportunity to make a specific plugin for that. I might be able to do it now that my life is in better shape in terms of time. To be honest though I would prefer to do a noise-repellent2 using dpf or juce and once I have a good framework going for spectral processing that would be easy.

Efenstor commented 2 years ago

To be honest though I would prefer to do a noise-repellent2 using dpf or juce and once I have a good framework going for spectral processing that would be easy.

Yeah!

Efenstor commented 2 years ago

I have not seen a single one. And I've been looking.

Me neither.

unfa commented 2 years ago

@lucianodato I'll be happy to see any new software from you, honestly - if that path seems to work better - sure!