Home of the Squeezebox™ & Transporter® network music players.
Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 64

Thread: Balance

  1. #41
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,545

    Balance

    > ok, I'll wait for somebody with a transporter and will do then

    I haven't been near my Transporter for months... it's in the office :-(

  2. #42
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,108
    Quote Originally Posted by mherger View Post
    > ok, I'll wait for somebody with a transporter and will do then

    I haven't been near my Transporter for months... it's in the office :-(
    I'll assume it works as the other ip3k, except the Boom (for understandable reasons). I've pushed an update that also corrects my grade 5 calculation error
    Last edited by philippe_44; 2021-03-01 at 15:50.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  3. #43
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,108
    Quote Originally Posted by wt0 View Post
    I think the server side implementation of balance for SqueezePlay players is broken. When I added "Balance=1" to SB Player's HELO string, the balance slider shows up in Player -> Audio. However when I adjust the slider, the gainL/gainR values SB Player gets for the channel that should be lowered changes from a 16.16 fixed point value between 0 and 1.0, to between 0 and 24.
    Quote Originally Posted by philippe_44 View Post
    Are you sure? I just traced that on my squeezelite-esp32 and the value I'm receiving is the gainL multiplied by a ratio of (25-Balance)/Balance (if balance is negative, negate it and apply that to gainR). Where are you tracing the gainL and gainR values from?
    You were obviously right. It's either time for me to retire or go back to school at grade < 5
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  4. #44
    Senior Member
    Join Date
    May 2006
    Location
    Silicon Valley
    Posts
    644
    Quote Originally Posted by philippe_44 View Post
    You were obviously right. It's either time for me to retire or go back to school at grade < 5
    Philippe, you need a rest, sleep, and a vacation! Your work has been invaluable to all of us LMS users.

    I need to learn Perl, so that some day maybe I can be of some help.
    Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
    Laptop: System76 Galago + Ubuntu 16.04 + Squeezelite + Vivaldi/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
    Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
    Phone: Pixel 3a + SB Player + Material APK > Senn IE80 earbuds
    Server: Puget Systems Serenity + Ubuntu 18.04 + LMS 8.2

  5. #45
    Senior Member wt0's Avatar
    Join Date
    Jul 2008
    Posts
    737
    Quote Originally Posted by wt0 View Post
    I'm not talking about what you see in the browser. I'm talking about what the player actually receives from server. I'm trying to add balance support to SB Player and noticed that when the balance is not zero, the gain value of the "audg" command of one of the channels is no longer a fixed point value between 0 and 1.0 (which is an integer value between 0 and 65536). Instead it changes to a fixed point value between 0 and 24 (integer value between 0 and 1572864)
    Yes I'm sure, I'm logging the raw values that I'm getting from the server. With volume set to 100 and a balance setting of 1, gainL is 1572864 and gainR is 65536. I even used Wireshark to sniff the network packets just to be sure. Here's hex dump + ascii from the audg packet:
    Code:
    0000   10 7b 44 68 cc 37 00 d8 61 d3 20 a2 08 00 45 00   .{Dh.7..a. ...E.
    0010   00 44 a5 9c 00 00 80 06 00 00 c0 a8 14 72 c0 a8   .D...........r..
    0020   14 67 0d 9b e3 d8 5a fa 44 36 7d 3b 3e db 50 18   .g....Z.D6};>.P.
    0030   04 02 e0 3a 00 00 00 1a 61 75 64 67 00 00 0c 00   ...:....audg....
    0040   00 00 00 80 01 ff 00 18 00 00 00 01 00 00 00 00   ................
    0050   00 00                                             ..
    The hex value for gainL is "00 18 00 00" which is 1572864.

    Am I just not interpreting the data correctly?

    I'm using LMS 8.2.0 - 1614413430
    --------------
    Squeezebox apps for Android and Windows UWP, http://www.angrygoatapps.com

  6. #46
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,108
    Quote Originally Posted by wt0 View Post
    Yes I'm sure, I'm logging the raw values that I'm getting from the server. With volume set to 100 and a balance setting of 1, gainL is 1572864 and gainR is 65536. I even used Wireshark to sniff the network packets just to be sure. Here's hex dump + ascii from the audg packet:
    Code:
    0000   10 7b 44 68 cc 37 00 d8 61 d3 20 a2 08 00 45 00   .{Dh.7..a. ...E.
    0010   00 44 a5 9c 00 00 80 06 00 00 c0 a8 14 72 c0 a8   .D...........r..
    0020   14 67 0d 9b e3 d8 5a fa 44 36 7d 3b 3e db 50 18   .g....Z.D6};>.P.
    0030   04 02 e0 3a 00 00 00 1a 61 75 64 67 00 00 0c 00   ...:....audg....
    0040   00 00 00 80 01 ff 00 18 00 00 00 01 00 00 00 00   ................
    0050   00 00                                             ..
    The hex value for gainL is "00 18 00 00" which is 1572864.

    Am I just not interpreting the data correctly?

    I'm using LMS 8.2.0 - 1614413430
    No you are reading data correctly - per my previous post, it was me
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  7. #47
    Senior Member
    Join Date
    May 2006
    Location
    Silicon Valley
    Posts
    644
    I just pulled the latest commit for LMS 8.2 which corrects the Balance math, and I will test using my SBT player. I also just wrangled a Transporter a few minutes ago, so I will test with that also.
    Living Room: SB Touch + DIY PSU > CI Audio VDA.2 DAC + VAC.1 PSU > VRX.1 cables > Emotiva XSP-1 Gen 2 preamp + XPA-DR2 amp > Blue Jeans cables > B&W 804 speakers
    Laptop: System76 Galago + Ubuntu 16.04 + Squeezelite + Vivaldi/Material Skin > Emotiva Little Ego DAC > Grado PS500 headphones
    Bedroom: RPi Zero W + Squeezelite > miniBOSS DAC HAT > Bose SoundLink Revolve
    Phone: Pixel 3a + SB Player + Material APK > Senn IE80 earbuds
    Server: Puget Systems Serenity + Ubuntu 18.04 + LMS 8.2

  8. #48
    Senior Member wt0's Avatar
    Join Date
    Jul 2008
    Posts
    737
    Quote Originally Posted by philippe_44 View Post
    No you are reading data correctly - per my previous post, it was me
    I didn't realize you meant you made a mistake in the code. I just thought you made a typo in the post.
    --------------
    Squeezebox apps for Android and Windows UWP, http://www.angrygoatapps.com

  9. #49
    Senior Member wt0's Avatar
    Join Date
    Jul 2008
    Posts
    737
    I just downloaded the latest LMS update, and the values look like they are corrected. However, the gainL/gainR values are normally based on the volume curve of the SB Boom so 0.96 gain is actually 52224 not 62914. I guess I could detect for balance changes and calculate the gain differently when that happens, but I think having it the balanced values be consistent with the normal values would be nicer.

    In case you need it, here's the array I use for converting the values:
    Code:
    0, 16, 18, 22, 26, 31, 36, 43, 51, 61, 72, 85, 101, 120, 142, 168, 200, 237, 281, 333, 395, 468, 555, 658, 781, 926, 980, 1037, 1098, 1162, 1230, 1302, 1378, 1458, 1543, 1634, 1729, 1830, 1937, 2050, 2048, 2304, 2304, 2560, 2816, 2816, 3072, 3328, 3328, 3584, 3840, 4096, 4352, 4608, 4864, 5120, 5376, 5632, 6144, 6400, 6656, 7168, 7680, 7936, 8448, 8960, 9472, 9984, 10752, 11264, 12032, 12544, 13312, 14080, 14848, 15872, 16640, 17664, 18688, 19968, 20992, 22272, 23552, 24832, 26368, 27904, 29696, 31232, 33024, 35072, 37120, 39424, 41728, 44032, 46592, 49408, 52224, 55296, 58624, 61952, 65536
    This was copied from the SqueezePlay code.
    --------------
    Squeezebox apps for Android and Windows UWP, http://www.angrygoatapps.com

  10. #50
    Senior Member wt0's Avatar
    Join Date
    Jul 2008
    Posts
    737
    Quote Originally Posted by philippe_44 View Post
    ok, I'll wait for somebody with a transporter to confirm and will do then
    I have a Transporter. Balance is working.

    BTW, what is ip3k?

    Edit: Nevermind, just figured it out.
    Last edited by wt0; 2021-03-01 at 17:47.
    --------------
    Squeezebox apps for Android and Windows UWP, http://www.angrygoatapps.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •