lucianodato / libspecbleach

C library for audio noise reduction and other spectral effects
GNU Lesser General Public License v2.1
63 stars 12 forks source link

Expose more key functionality through the API #43

Closed SimonG4ELI closed 1 year ago

SimonG4ELI commented 2 years ago

Hi,

https://www.vocal.com/noise-reduction/musical-noise/ is an interesting read, it'll take me some days to fully understand it. Would be good to get the musicality removed, I think you effectively have this in libspecbleach, maybe some parameters should be exposed.

Look at https://www.youtube.com/watch?v=eRIqabVpltM to see libspecbleach in action, sometimes the musicality is pronounced.

BTW - this is not a complaint!

lucianodato commented 2 years ago

Hey Simon! Thanks for the demo. Yeah to really reach the level of understanding that this requires took me a lot of time and more than a 100 papers worth of read. I'm mentioning just the most representative in the wiki. Have a look!

For the years that this has been out as noise repellent I've learned that most user don't understand what is doing what even after a good explanation. I'm just restricting to the bare essentials to be easy to use. As you already found there's configurations that you can change but requires a recompile. I don't think it's too useful to expose those parameters in the API but it might be cool to expose them through a config file..what do you think?

SimonG4ELI commented 2 years ago

Yes,

Config file maybe

SimonG4ELI commented 2 years ago

Also,

Looking at the code I see rescale option adjusts beta but you don't have a way to adjust alpha, have you tried adjusting alpha dynamically?

lucianodato commented 2 years ago

That's being modulated by the masking thresholds. Yes it's signal dependant and so dynamic. Masking threshold is the best criteria from all of the implemented. You can check there are many enums that list the different available

SimonG4ELI commented 2 years ago

OK, I'll try the different masking thresholds and see what I find.

lucianodato commented 2 years ago

I mean https://github.com/lucianodato/libspecbleach/blob/main/src/shared/pre_estimation/noise_scaling_criterias.h you have the enum for the implemented ones. I always resource to use the masking threshold one because it gives the best results. Note that this is entirely signal dependant. From what you show in your example the type of noise that you are dealing with seemed to be very colored. I think masking threshold would be probably the best. But let me know what you find

SimonG4ELI commented 2 years ago

OK, I'll try the different masking thresholds and see what I find.

I would like the enum NoiseScalingType to be a parameter so the user can switch while it's running, otherwise I have no suggestions at the moment.

lucianodato commented 2 years ago

Fair enough! How about changing the name of this issue too? Also did you find other criteria better for your use case?

SimonG4ELI commented 2 years ago

Hi,

Not sure how I change the name. It's hard to compare when I have to recompile etc., tomorrow I'll test with a recording and let you know.

lucianodato commented 2 years ago

Sure we can track whatever you find useful through the other issue which I renamed to Expose more key functionality through the api so it could be more general

SimonG4ELI commented 2 years ago

Hi,

At the moment NoiseScalingType is interesting but expose as much as you want!

lucianodato commented 2 years ago

Post filter control should be exposed too. This is because there are profile modeling options now that will allow it to be configured a little bit more aggressively.

lucianodato commented 2 years ago

Also expose processing window size so the precision of the fft could be specified at the init stage

lucianodato commented 1 year ago

Done, will be included in next release