Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Algorithm for Stereo Width?
« previous next »
  • Print
Pages: [1]

Author Topic: Algorithm for Stereo Width?  (Read 1321 times)

Offline resetter

  • Member
  • *
  • Posts: 6
Algorithm for Stereo Width?
« on: March 10, 2015, 03:02:12 AM »
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!
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Algorithm for Stereo Width?
« Reply #1 on: March 10, 2015, 12:05:14 PM »
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%?

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. 
Logged

Offline resetter

  • Member
  • *
  • Posts: 6
Re: Algorithm for Stereo Width?
« Reply #2 on: May 29, 2015, 08:51:28 PM »
Oh, so in Mid-Side math, RB's Stereo Width value is just the ratio of Side to Mid amplification?
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Algorithm for Stereo Width?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.066 seconds with 15 queries.