Feature Request - Play sound
Background
I would like to have an action to play an arbitrary sound file.
Use case: When my mic mutes or unmutes, AdvSS plays a sound to my headset. I was also able to replace the "Mic Muted Notification" plugin with AdvSS with a macro that checks the configured volume level (muted) + output audio volume (greater than -40db) on my microphone. And in doing so, I got rid of extra macros to turn that filter on and off depending on whether or not I was streaming!
However, there's no easy way to use AdvSS to "play a sound" without using media sources or external programs. I listed some approaches below and ultimately settled on a series of AdvSS actions to change the path on a media source and then play it, and add that media source to every scene. But that's kind of clunky.
Solution
A minimal implementation (which I would be thrilled with) would be a "play local sound" action with these parameters, which would always play to the monitor only:
- Filename
- Volume
A more complete "play sound" action might have some more parameters to make it possible to send the sound to the stream. I could see this being useful for sound alert types of actions. That could take these parameters:
- Filename
- Monitoring (monitor off, monitor and output, monitor only/mute output)
- Volume
- Outputs 1-6
I'd imagine that functionality like adding filters, selecting specific scenes where you want the sounds to play, etc., would probably just end up re-implementing large parts of a media source. At that point it's probably just best to use a media source...
Alternatives
All of these work but each is clunky in its own way:
- Create one media source and use AdvSS to create a series of actions to change its file path, pause for 0.20 seconds, and then restart it. Add that media source to every scene (or use downstream keyer).
- Create a separate media source with the sound you need, add each one to every scene (or use downstream keyer), and play the sound with AdvSS.
- Run a command in your operating environment that plays a file.
- Send a HTTP call to Firebot or similar to trigger its "Play Sound" effect which feeds back into OBS.
Anything else we should know?
This is a "nice to have" rather than an essential requirement since there are other ways to achieve the same result. But it would be super cool and I know you're always looking for ideas! 😃
You can also create a scene with sounds like "Soundboard" and add it to each scene. Personally I include it in my few overlay scenes.
But I wouldn't mind something like that either as OBS media sourcews are awful and e.g. autoplay at OBS launch if you include them globally like that. A duration parameter would also shorten few macros I have that start a sound -> wait for X seconds -> stop a sound. THen starting point would also be great for control