Author Topic: Display-Specific Music?  (Read 359 times)

YellowBirdAZ

  • Full Member
  • ***
  • Posts: 29
    • View Profile
Display-Specific Music?
« on: July 06, 2017, 10:33:14 AM »
I'm still working on my cabinet, but I was curious to know whether some functionality I recently implemented would useful to others.

A couple of things I did:

1. Added a voice announcing which display is being shown (or which filter is being applied). So in my case, if the user is scrolling across different displays (like Platform, Shmup, Sports), a robotic voice tells the user what they are looking at. (Of course, this doesn't have to be a voice, it could be any unique sound.)

2. Added unique music for each display. So for example, my cabinet plays Conan music when you are browsing Hack & Slash games, and Top Gun with Shmups, so on.

I accomplished both these additions through hacks to the music plug-in.

I was wondering -- if this sounds like something others might use, I might spend some time making a proper plugin for this. Because as it stands now, it works, but it's not pretty.

Any feedback welcome... whether it's saying you would use this, or even just to say I am going about it all wrong.

jedione

  • Sr. Member
  • ****
  • Posts: 313
  • punktoe
    • View Profile
Re: Display-Specific Music?
« Reply #1 on: July 06, 2017, 07:34:37 PM »
this only makes you stronger...bro ill try it
so so when i switch to fighting games in the display layout,,it says
"lets get ready to rummble"  would be bad ass ...
just make it so u can edit the sounds from a file...

have addd...

« Last Edit: July 06, 2017, 07:41:52 PM by jedione »
help a friend....

YellowBirdAZ

  • Full Member
  • ***
  • Posts: 29
    • View Profile
Re: Display-Specific Music?
« Reply #2 on: July 09, 2017, 10:30:24 PM »
Here's how it works in practice.

https://youtu.be/W-R37keZyRM

So in the genre-specific displays, the appropriate music plays. On my set-up if you look at All Games there is no theme music, the sound of the snap videos is played instead.

I also dumped the voice thing. It's technically doable, but it was unnecessary. Too much going on.
« Last Edit: July 10, 2017, 09:36:32 AM by YellowBirdAZ »

jedione

  • Sr. Member
  • ****
  • Posts: 313
  • punktoe
    • View Profile
Re: Display-Specific Music?
« Reply #3 on: July 14, 2017, 06:30:22 AM »
i love it,   can u share it...please..
top gun is sick..
help a friend....

YellowBirdAZ

  • Full Member
  • ***
  • Posts: 29
    • View Profile
Re: Display-Specific Music?
« Reply #4 on: July 15, 2017, 01:18:10 AM »
OK, I attached the plug-in. Tried to make it presentable. There's not much in the way of comments, error handling or logging.

How to use:
  • Create a parent folder to hold your music (or ambient sounds). Mine is "Music".
  • Within that folder, create subfolders with names matching the displays for which you want music to play. For example, my "Music/Hack & Slash" folder contains all the music I want to play when users are browsing Hack & Slash games. If you don't want music for a display, don't make a folder for it.
  • Now enable the plugin in AttractMode and specify your parent folder as "Source Directory".

Ignore the other options for now. With this basic configuration you should get unique playlists for whichever displays you want to have music. Be aware there is no checking for illegal characters, so I guess if you put weird characters in your display names you might run into problems creating folders with matching names.

This isn't a jukebox, so although it's based on AudioMode (thanks to whoever wrote that) a lot of that functionality is stripped out. It just plays random music from the appropriate subfolder, and it restarts every time you leave and then return to whatever display the music is associated with.

I added the Alternate Source options in case someone wanted to offer a B-track. It works exactly the same. Just create a second parent folder, with subfolders named after whatever displays you want to play music. Then assign a key to toggle between the original music and the alternate music. This is optional, and hitting the toggle when no alternate source is defined will not do anything. As an example, I have "Music" as my original source, and I have "Music_Chiptunes" as an alternate set of music.

If you use the alternate source options, make sure in your attract.cfg file the value specified for "layout" under each "display" entry is exactly right. The values are case-sensitive. So in my case, I was getting weird behavior if layout was specified as "flavors" rather than the correct "Flavors". It caused the plug-in to reload and it messed up the toggling between the original and alternate music whenever I viewed a display with a misspecified layout.

Finally, in my set-up I have displays where I don't want music, but I want to hear the sound of the snap videos being shown. I also don't want the video sounds to play underneath music. I accomplished this outside of the DisplayMusic plugin. In my layout.nut, I used the video_flags (Vid.Default and Vid.NoAudio) to mute the videos for displays with music, and to play the video sounds in the display with no music.

For anyone who wants display-specific music, I hope this helps.






« Last Edit: July 15, 2017, 01:24:51 AM by YellowBirdAZ »

caminiti45

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Display-Specific Music?
« Reply #5 on: September 09, 2017, 04:29:11 PM »
YellowBirdAZ This is a fantastic plugin and exactly what I was looking for! I only have one minor issue and that is, in the theme I am using, it has the ability to add favorites and to switch between favorites or all. When doing any of these, the music starts all over again. Can you think of anything that I can do to keep the music playing while performing these actions? Thanks a bunch!
-Rob

YellowBirdAZ

  • Full Member
  • ***
  • Posts: 29
    • View Profile
Re: Display-Specific Music?
« Reply #6 on: September 15, 2017, 04:08:36 PM »
Glad you like it!

I updated the plug-in since I first posted it. I am travelling so I can't really dig into it. I am pretty sure I did not address the issue you are speaking of, but it might be possible to catch the transition and prevent it from short-circuiting your display-specific music. Not sure when I can look at this, but I will.

It might be smarter to make the music change key off of something else, but again I will have to take a deeper look.

I completely toned my whole front-end down, now I just have 80s music for 80s games, 90s for 90s and electronic stuff for "retro-style" PC games like Broforce. Simpler is better.

caminiti45

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Display-Specific Music?
« Reply #7 on: September 15, 2017, 05:58:10 PM »
Thanks for looking into it. Ok, I feel stupid asking this, but this plugin worked perfectly in attract mode for windows, but once I put it on my raspberry pi, I cannot get the music to play. I am using the folder /home/pi/RetroPie/music/ and under the music folder is folders that match the display names with an .mp3 in each folder. plug in is enabled. I can get music to play using the audiomode plugin which I believe you said your plugin was based off of, so I'm at a total loss lol. Any suggestions?

calle81

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: Display-Specific Music?
« Reply #8 on: October 14, 2017, 12:13:08 PM »
Hi, awesome! Can I stop the sound from looping? I'd like to have an announcement only

caminiti45

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Display-Specific Music?
« Reply #9 on: October 15, 2017, 04:45:13 PM »
YellowBirdAZ:
Are you using your display music plugin within windows or on a pie? Do you think it would be possible to build a display specific screensaver plugin with some modifications to your music plugin?
Thanks!