Rockbox General > Rockbox General Discussion

Algorithm for Stereo Width?

(1/1)

resetter:
Hi all. I have been using Rockbox on my Clip+ for about a year now and am just wondering, what exactly is the algorithm used when Channel Configuration is set to Custom and we change the Stereo Width? I am confused mostly because the max value is 250%.

I can assume that when set to 100%, (with the t meaning the results), Lt = 1L and Rt = 1R. (no change)
And when 0%, Lt = 0.5L+0.5R and Rt = 0.5L+0.5R. (mono)
And when 50%, Lt = 0.75L+0.25R and Rt = 0.75R+0.25L?

I know we increase the stereo width by subtracting the opposite channel from each channel instead of adding them, but how exactly does this correlate with the Stereo Width percentage above 100%, given that the max allowed by Rockbox is 250%?

Thanks!

saratoga:

--- Quote from: resetter on March 10, 2015, 03:02:12 AM ---I know we increase the stereo width by subtracting the opposite channel from each channel instead of adding them, but how exactly does this correlate with the Stereo Width percentage above 100%, given that the max allowed by Rockbox is 250%?

--- End quote ---

http://git.rockbox.org/?p=rockbox.git;a=blob;f=lib/rbcodec/dsp/channel_mode.c;h=aa92cec412e71a247207b6f871a78397be547300;hb=HEAD#l165

Basically, it works like you're thinking for <= 100%, but for larger than 100% there is a ~1/x relationship between the setting the gain of the mid/side channels. 

resetter:
Oh, so in Mid-Side math, RB's Stereo Width value is just the ratio of Side to Mid amplification?

Navigation

[0] Message Index

Go to full version