Skip to content
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

per-output volume control #434

Open
tremby opened this Issue Dec 5, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@tremby
Copy link
Contributor

commented Dec 5, 2018

I see that a patch for this was posted to the mailing list a few years ago:

http://mailman.blarg.de/pipermail/mpd-devel/2015-October/000445.html

It doesn't look like that was ever finished or merged.

It's a feature I'd very much like to see; it'd be very useful for multi-room audio setups.

It looks like one hangup was how to treat the master volume. If that's still an issue, what about this approach?

  • Allow outputs to be ranked in priority order, defaulting to the order they're given in configuration
  • Have the existing set volume command control the volume of the top-ranked enabled non-none mixer
  • Add an extra argument to the set volume command (and get volume etc) if a particular output is to be affected/read

This would give backward compatibility without introducing any complicated proportional adjustment logic.

@miccoli

This comment has been minimized.

Copy link
Contributor

commented Dec 8, 2018

I would suggest a different approach:

  • a single master volume (1 ... 100) that affects all outputs
  • an attenuation (possibly measured in dB) that can be set for the single outputs.

At least for the ALSA mixer plugin this would be fairly simple: you just have to redefine the volume mapping so that MPD volume 100 does not correspond to full scale but to full scale minus attenuation.

The attenuation could be set in the config file, plus a new command in the MPD protocol to change the attenuation of the individual outputs.

See also #219.

@tremby

This comment has been minimized.

Copy link
Contributor Author

commented Dec 9, 2018

I don't want the outputs to always have the same volume ratios.

Your suggested behaviour might be useful in some situations, but wouldn't fulfill my usage pattern.

I don't see the relevance of the issue you linked.

@tremby

This comment has been minimized.

Copy link
Contributor Author

commented Dec 9, 2018

Oh, I missed the part where you suggested a command to alter the different outputs' attenuations. That would work. That makes it more like the patch I linked to in my original post, I think.

@miccoli

This comment has been minimized.

Copy link
Contributor

commented Dec 9, 2018

@tremby The relevance of the other issue is linked to the need to have an API in MPD that allows direct control of the mixer settings in terms of dB gain. If I got it right, in MPD volume control is 0...100 (arbitrary units) that are mapped to the audio card internal settings by the individual output plugins. How this mapping is done is unspecified. It would be very useful to have an API in which I can

  • set output at (say) -12dB (where 0dB is full scale)
  • alter the current mixer settings in terms of a ±∆ dB

This would allow a lot of interesting applications and also a more accurate implementation of ReplayGain

In a multi-room audio system I would like to have

  • default volume at approx the same perceived loudness in each room
  • a master volume control changing the volume in all rooms
  • the ability to change the relative (perceived) loudness between rooms.

And finally, yes, my approach is very similar to the original patch, but defined in terms of dB, and not as the product of arbitrary loudness scales.

@MaxKellermann MaxKellermann changed the title Feature request: per-output volume control per-output volume control Dec 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.