Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - YellowBirdAZ

Pages: 1 ... 3 4 [5] 6
61
Scripting / Re: Display-Specific Music?
« 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.

62
Scripting / Re: Pause AM During Intro Movie?
« on: August 28, 2017, 11:06:20 PM »
OK so I found a way to do it, maybe this will work for others too.

First, I had to set some global variables. Trick for me was to find the right places to do it.

I set INTRO_DELAY to true (that is, wait for the intro to play) and INTRO_DELAY_LENGTH to a number that corresponds roughly to the number of "ticks" (milliseconds?) it takes my intro video to play.

These two globals are set in two places... first in intro.nut.

::INTRO_DELAY <- true;
::INTRO_DELAY_LENGTH <- 28000;

Next, they are set in my layout.nut. But here they receive new values.

::INTRO_DELAY <- false;
::INTRO_DELAY_LENGTH <- 0;

They are different because once the layout.nut runs the need to wait is over. My issue was the music-playing plugin was starting up during intro.nut. I don't really need the delay for the post-intro layouts.

Then I added a check in the on_tick function in my music player plug-in. Once ttime meets or exceeds the value specified in INTRO_DELAY_TIME, INTRO_DELAY gets flipped to false. (Basically, when this condition is satisfied the plug-in is done waiting for the intro.)

   function on_tick( ttime )
   {
      if ( ::INTRO_DELAY && ttime < ::INTRO_DELAY_LENGTH) {
         return false;
      }
      else
      {
         ::INTRO_DELAY <- false;
      }
      if ( fe.ambient_sound.playing == false)
         change_track( 1 );
   }

Then wrapped most of the other functions in the plug-in in a if/then check of INTRO_DELAY. If INTRO_DELAY is still false, the functions dump out with a false return value before they do whatever they are supposed to do. This basically stops the music from playing. (The function that loads and shuffles a playlist is allowed to execute even if INTRO_DELAY is false, because it doesn't actually start playing the music.)

I could have the delay time specified in the UserConfig of the intro.nut. Maybe some error checking. I just didn't do it yet. But this appears to work.

63
Scripting / Re: Pause AM During Intro Movie?
« on: August 28, 2017, 10:03:27 PM »
I started looking at it and realize there might be a wrinkle to my case. The solutions you guys are point to are probably correct, but in my set-up the layout itself isn't handling the music. Instead I wrote a plugin to handle it (it switches music source folders based on which game list I am displaying... so 80s games have 80s music, for instance).

Maybe I just need to figure out how to get my music plugin to wait on start-up. Could probably use similar code to what bjose2345 proposed.

64
Scripting / Re: Pause AM During Intro Movie?
« on: August 28, 2017, 07:14:42 AM »
Thanks guys! I will take a look as soon as I can and report my progress.

65
Scripting / Pause AM During Intro Movie?
« on: August 27, 2017, 12:43:03 AM »
I was trying to add an intro movie to my AM set-up and then quickly realized it just plays over the top of the layout.

So if your intro movie has music or sound, and your layout itself plays ambient sound, they will overlap. It is very annoying.

I've hacked around issues like this before by inserting silent sound files of predetermined lengths to generate audio pauses where needed. I'm reluctant to keep adding hacks though.

Anyone have a solution or suggestion?

I could just launch the intro movie outside of AM, and then launch AM upon the video's completion, but there has to be another way.


66
Scripting / Re: Display-Specific Music?
« 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.







67
Scripting / Re: Display-Specific Music?
« 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.

68
Scripting / 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.

69
General / Re: FBA with AM on a CRT Cabinet
« on: June 04, 2017, 10:05:41 PM »
preserve_aspect_ratio = true

Exactly what someone else suggested, and it works great.

I also went back to your original font choice (Alegre Sans Bold). I thought it wouldn't work well in low-resolution, but it's actually better. I can get away with bigger charsize (more readable) because the font is more horizontally compact.

70
General / Re: FBA with AM on a CRT Cabinet
« on: June 03, 2017, 03:32:13 PM »
Here is what it looks like in action. Slight modifications, but it's pretty much straight Flavors.

https://www.youtube.com/watch?v=zQh6EWomnxI&feature=youtu.be

71
Scripting / Re: Alignment of Videos?
« on: June 02, 2017, 12:22:14 AM »
Thanks!

I will check out the preserve_art module, but for now preserve_aspect_ratio did the trick. It looks just the way I imagined it should.

72
General / Re: FBA with AM on a CRT Cabinet
« on: June 01, 2017, 10:22:03 AM »
No problem, it's a great layout.

While I have your attention... I asked this in another post. But if I wanted the snap vids in this layout to be horizontally-centered, is there a method you'd recommend? That's really the last piece of the puzzle for me in terms of implementing this on my cabinet.

73
Scripting / Alignment of Videos?
« on: June 01, 2017, 06:59:07 AM »
What is the best way to center snap videos on screen in AM? (Even if it's just horizontally.)

I searched and didn't find anything on this, probably because the answer is so obvious no one posts about it.

I have a layout where the snap videos are anchored at the upper left corner (0,0), but since they all differ in size it looks cruddy as you browse games. Likewise, scaling the videos to fill the screen doesn't look great. I guess I could ffmpeg my snap videos so they are in pillarboxes to at least make them all the same width as the layout, but this isn't the best either.

I'd prefer to just be able to center the video in the layout.

74
General / Re: FBA with AM on a CRT Cabinet
« on: May 31, 2017, 02:32:08 PM »
I am having to tweak it a bit, especially the font sizes. Just remember you can change the values of the .charsize attribute to adjust the size of on-screen type. At low-res there isn't much room for large type.

Also check this out... I may switch if this will work in lo-res...
http://forum.attractmode.org/index.php?topic=1500.0

75
General / Re: FBA with AM on a CRT Cabinet
« on: May 30, 2017, 06:41:49 AM »
OK, I "solved" this. Just updating in case anyone else runs into similar issue.

I ended up just sidestepping the issue by going with Retroarch. Now all my games not driven by some version of MAME (basically NeoGeo and Capcom arcade games, and console games) are relying on Retroarch "cores" rather than stand-alone emulators.

I recommend Retroarch... as far as I can tell the Final Burn Alpha core performs perfectly with AttractMode, while the latest stand-alone was giving me problems. The Mednafen Sega Saturn core is impressive too.

It also reduced the clutter of having a dozen one-off emulators to maintain. Cleaned things up nicely.

I'm pretty sure I could run everything through Retroarch if I used its MAME cores to run my other games, but they are performing fine as is so I'm not going to bother right now.


PS: For anyone else using a CRT in their cabinet, check out keilmillerjr's Flavors layout. If you are trying to avoid interlacing at 640x480 on a CRT, it's a layout that looks good at 320x240.

Pages: 1 ... 3 4 [5] 6