Live data from Hacker News

Reverse-engineering my speakers' API to get reasonable volume control

jamesbvaughan.com

1–10 of 144 posts

Re: Reverse-engineering my speakers' API to get reasonable volume control

#2
I know it is tangential, but this about his old system caught my attention:

  With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls.
Assuming an analog input, this might result in a noticable quality reduction at low volumes.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#3
While I’m all for physical controls, especially ones that self-adjust to reflect the state of the remote device at all times, I wonder if the author just doesn’t know you can finely adjust volume in iOS control center by force/long pressing and then dragging.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#4

I know it is tangential, but this about his old system caught my attention: With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls. Assuming an analog input, this might result in a noticable quality reduction at low volumes.

In this case, I was using the optical out from a WiiM mini into a Yamaha amp. I don't know much about digital audio, but I know that I was able to control the volume of the WiiM's digital output with that setup.

On the other hand, I use a Schiit Asgard at my desk, where I have it connected to my Mac via USB-C. In that setup, I have no control over the volume level going in to the Asgard. MacOS just disables the software volume control when I'm using that audio output.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#5
post #3

While I’m all for physical controls, especially ones that self-adjust to reflect the state of the remote device at all times, I wonder if the author just doesn’t know you can finely adjust volume in iOS control center by force/long pressing and then dragging.

This is a great point! When I'm using AirPlay, that feature is really useful. I'm more often using Spotify Connect though, where I'm limited to either using the physical volume buttons on my phone, the small slider in the desktop app, or the slider that's many clicks in to the Spotify mobile app.

In reality though, this project is more about the fun of it than about it being a really pressing need.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#6

I know it is tangential, but this about his old system caught my attention: With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls. Assuming an analog input, this might result in a noticable quality reduction at low volumes.

Reducing excessively before the DAC and high gain after the DAC is far more likely to result in quality reduction, due to quantization error. Having reasonable levels before the DAC and just the right amount of gain after the DAC (e.g., via an amplifier's attenuator setting) is the best possible scenario. So TFA's prior setup may have been superior in this regard, depending on how the digital volume control on the new speakers is implemented (i.e., before the DAC, or as a VCA after the DAC).

Where this breaks down is if the analog signal path (after the DAC) consists of something noisy after the attenuator. Passive attenuation (like built into an amp, or the master fader of a mixer, etc.) won't add noise, but something active like an outboard EQ would. The attenuation to set desired max level must be completely last (before power amp) to avoid noise.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#7

I know it is tangential, but this about his old system caught my attention: With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls. Assuming an analog input, this might result in a noticable quality reduction at low volumes.

Tangential fun fact: amps have a fixed gain, because it's hard to make a variable gain without distortion [1]. The volume knob doesn't control amplification, in fact it controls an attenuation stage, because it's easier to make variable attenuation with low distortion.

[1] that's why there were so many different "classes" of amps, they're all making different tradeoffs about how they're doing the amplification.

Re: Reverse-engineering my speakers' API to get reasonable volume control

#9

I know it is tangential, but this about his old system caught my attention: With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls. Assuming an analog input, this might result in a noticable quality reduction at low volumes.

Tangential fun fact: amps have a fixed gain, because it's hard to make a variable gain without distortion [1]. The volume knob doesn't control amplification, in fact it controls an attenuation stage, because it's easier to make variable attenuation with low distortion. [1] that's why there were so many different "classes" of amps, they're all making different tradeoffs about how they're doing the amplification.

That helps explain why the "volume" as represented on disk in the debug bundle as "attenuation" and was measured in negative dB.
Post reply on HN