missionpinball / mpf-mc

The Mission Pinball Framework Media Controller. Controls graphics, sounds, DMDs, and LCD displays in MPF.
http://missionpinball.org
MIT License
21 stars 42 forks source link

Audio track volume control and SoundPlayer ducking #459

Closed avanwinkle closed 8 months ago

avanwinkle commented 8 months ago

Audio Track Volume Control

This PR extends the audio tracks (defined in sound_system: tracks:) to have discrete volume levels that can be controlled from the Service Audio Menu (https://github.com/missionpinball/mpf/pull/1743). Each track can already have a separate volume level, but with this PR that level is adjustable via menu and automatically persisted as a machine var, to allow fine-tuning of relative track levels during gameplay.

SoundPlayer Ducking

This PR adds support for ducking arguments in SoundPlayer, so ducking can be defined at the player level instead of on each individual sound file separately. This is intended as a broad-strokes approach to provide basic ducking quickly, and is not nearly as accurate as defining ducking to each sound specifically. With this in mind, for any sound that has its own ducking: defined that sound's ducking will take priority over the SoundPlayer ducking.

SlidePlayer Logging

This PR reduces the log level of the SlidePlayer from INFO to DEBUG, because during a game lots of slides are played and the logging for slides is bulky. SlidePlayer logs to the machine log, so it's log level cannot be configured separately from the general machine. After this change, the SlidePlayer logs will still appear in verbose mode.

turn it up!

avanwinkle commented 8 months ago

Wheel builder is failing on this (and previous) PRs but I've run all the tests locally and they check out. Proceeding to merge.