-
Notifications
You must be signed in to change notification settings - Fork 30
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
FR - Stereo widener, Virtual bass #37
Comments
Both appear to be quite easy to implement. You can actually make the stereo widener with existing effects:
Decreasing the mid gain will widen the stereo image and decreasing the side gain will make it narrower. Anyway, I can probably write a "virtual bass" effect based on the code you linked pretty quickly. |
Okay so only one of them should be adjusted at a time?
I found this MATLAB description very accurate to what I have known about virtual bass. The repo I linked was the only thing I could find as a code., though all it does is add distortion, which isn't entirely accurate. |
Technically both should be changed in order to keep the overall level the same, but the exact amount depends on how correlated the left and right channels are. The code you linked uses a "weight" of 0.2 for the mid channel and 1.0 for the side, so the side level changes more than the mid level.
I've been looking into different techniques a bit, and there are quite a few different algorithms out there. The simplest ones use full-wave rectifiers, full-wave integrators, or nonlinear devices (which add various kinds of distortion, depending on the function used). I also found this paper (PDF warning), which proposes a modified envelope detector for generating the harmonics. There are more complex approaches such as those using phase vocoders, as well as hybrid approaches. Using a full-wave integrator or modified envelope detector would probably be the easiest way to get acceptable performance, but it seems that there are better (albeit much more complex) algorithms out there. |
Hey Not certain if this is helpful, but this git repo separates audio into its harmonics. I tried filtering out parts of low ends manually from the generated samples in Audacity to replicate the psychouacoustic boost. It was nice. Also, I found a LADSPA plugin. I presume this uses an IIR filter. But the PDF you linked suggested to use FIR filters. |
In the book 'Small signal audio design' by Douglas self I read about another way of increasing stereo width: On page 254 a circuit is mentioned that increases percieved stereo width by mixing a little bit of the phase inverted right channel into the left channel and vice versa. This results in some slight left-right crosstalk cancellation. This is done instead of just splitting mid and side signals and increasing the volume on the side channel and mixing the resulting signals back into left and right channel. My question is: can I achieve this 'slight crosstalk cancelling' stereo widening effect with dsp? I imagine it should be doable but so far I could not figure out how to invert a channels phase in the config of dsp. This quote is from the book, it probably explains what I want to achieve in a better way:
|
You can invert polarity with
The anti-phase component in this example is 10% (not sure what value might be optimal). |
Thank you so much, that worked right away :) The next thing I'll play with is mid-side separation. I want to generate a mid-side channel so that I can phase reverse the mid channel and mix it with the regular stereo signal so that I have a 'stereo-without-mid' signal, process that with anti-phase crossfeed and then add the mid signal back to get my 'enhanced stereo' with the mid signal and bass still intact. I think this could also be a cool trick to use on my boombox that has 2 nice coax speakers mounted close together, |
Hi @bmc0 were you able to look into psychoacoustic bass boost? Would like to know your ideas. |
I've played around with it a bit, but I haven't come up with anything worth adding yet. Truth be told, it's not that high on my priority list since I'm unlikely to use the effect myself. |
In small setups, boosting the low end is extremely difficult. It creates a lot of distortion. Virtual bass boost helps a lot in that regard, without loading the drivers to their excursion limit. Since, I play around with lot of small units, this was one solution to help with the overall system response. I am keen to know what can be done otherwise. Generally I have relied on Linkwitz transform, but that itself can push the driver to its excursion limit and moreover only specific type of drivers can handle the transform. |
Hey @bmc0 Any updates on this? |
Hey, |
I decided to spend a little time on this today. There's a Usage is as follows:
Where The algorithm probably needs some refinement. I don't know what the optimal levels for the individual harmonics might be. |
Oh, and the effect makes no attempt to avoid clipping, so you'll need to pad the output down a bit. |
The implementation is little strange, the input is split into low and high component, to just be added back again. Also that paper talks about taking input from band-passed signal (extreme low and extreme highs being filtered out) to harmonics generator. |
Nice, let me study and play with it.
There is this MATLAB version which implements something true to what you generally find Waves Audio implementing it, for example. Have actually tried these with TI DSP chip which integrate their tech. |
Hey
I have been wanting to post this for quite some time.
I was investigating on some effects, for instance, stereo widener, psychoacoustic bass boost
These effects are really helpful when setting up a system.
I wanted to see if I could study these and I have been teaching myself the subject, but my knowledge on C and by extensions DSP is at present limited. I thought I could start a discussion here with you. I have linked existing implementations I could find on Github.
How do you propose we can work on this. This would be really interesting.
The text was updated successfully, but these errors were encountered: