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

YellowBirdAZ

  • Jr. Member
  • **
  • Posts: 16
    • 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: 283
  • 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

  • Jr. Member
  • **
  • Posts: 16
    • 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: 283
  • 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

  • Jr. Member
  • **
  • Posts: 16
    • 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 »