Playing Sounds w/ Stream Deck

Playing Sounds w/ Stream Deck

Continuing tinkering with the Stream Deck I rigged up a button to play a random "God Damnit" from It's Always Sunny in Philadelphia.

I used Audacity (http://www.audacityteam.org/) to clip 16 singluar "God Damnit"'s and saved them in a folder w/ sequential names (gdi-1.mp3, gdi-2.mp3, gdi-3.mp3,...,gdi-16.mp3). Then I created a simple new batch script which uses nircmd to play a sound file, but generate a number between 1 and 16 which we will use in our nircmd. (You may need to extend the play time to match your longest clip, in my example it's set to 12s).

set /a var=%random% %% 17 C:\nircmd\nircmd.exe mediaplay 12000 "c:\nircmd\scripts\sounds\gdi\gdi-%var%.mp3"

Save and wire this batch file up to a Stream Deck button (prepending the call to your batch file with nircmd exec hide to suppress the command window from displaying). Nice and easy random "God Damnit" button.

Related Article