Jump to content

Select media at random from folder.


Ashek

Recommended Posts

Here is the idea: Rather than limiting ourselves to loading a single theme, video, or piece of background music, how about allowing the creation of another folder in these same locations that would follow the games naming convention. You could then place whatever media therein and have HyperSpin pick something at random.

This idea actually came to me while working on background audio for Battlefield Vietnam. I put together a special soundtrack that plays in-game consisting of classic anti-war rock from the era and as it is now; I have to pick only one despite having dozens of iconic tracks to choose from. I also have to manually go in and change it up every now and then when the wife gets sick of hearing the same thing pop on. There are so many titles out there that could benefit from this kind of expansion of our media base.

Please comment if this is something you too would enjoy seeing!

Link to comment
Share on other sites

Good thinking, Ashek. A big +1 to this idea! There are a number of themes that I'd love to get multiple audio tracks in rotation on. It's hard to choose just one!

I'd like it for video too. In my Main Menu, instead of just gameplay videos, I've collected a number of of old commercials for each of the systems on the wheel. To get them all to play, I had to edit the videos and string them together. The downside to this is that some of the commercials that are real gems, you only get to see if you're patient enough to wait for the video montage to get to that point. This would solve that problem too. It's a two-fer!

Link to comment
Share on other sites

Thanks for the feedback. I was thinking about the feature and how it could be a little more dynamic...

What if HyperSpin were to load a theme at random as suggested, but then check the video folder for a MP4 with an identical naming. If one is found, it would select it, otherwise one gets picked at random. Then it looks at say the background music folder, looks for a MP3 with identical naming to the theme, if not found it looks for one matching the video (assuming it picked a random video of course), and if nothing matches, it then picks a track at random.

This would allow for an even greater level of customization. Not only can you have HyperSpin pick random themes, but you can still tie them to certain videos and song that really help it shine. All you'd have to do is rename the video and song to match the theme and your done.

Link to comment
Share on other sites

That sounds awesome to me! I have little to no programming experience so not sure how realistic of a request this is. I envision the hardest part to get around would be the naming convention. Clearly the files can't all have the same name in the same location, because windows wouldn't allow that without adding a number to it. And HyperSpin in its current state requires all files to have the same name. Sure you can add a folder and that would get around one instance, but what if you have 5 different themes, 5 different background music files, etc?

Link to comment
Share on other sites

Well lets say you have 5 of each media item. Themes 1-4 you want to use random videos and songs. However Theme 5 prominently displays a favorite character from the game. In this situation you want to use a video of them, as well as their theme song. You would rename those two items to match the name of the theme; since media items are not kept together in the same folder, there will be no naming conflicts. The only downside would be Themes 1-4 randomly picking the special video/track for Theme 5 on occasion since its sharing the same file location. This could be easily fixed by adding a folder titled "Theme 5" or whatever its named, therein you place the special video/track and whenever Theme 5 is randomly picked it will only use the media from within those specially named folders, ignoring Video and Song files 1-4. This adds even more dynamics because you could for example, add multiple tracks to this special "Theme 5" folder, say two versions of the character's theme song. Now when Theme 5 loads, it will use its special video file and then randomly choose between the available songs; but when Themes 1-4 load they will never display the media files locked away inside the Theme 5 folders.

All of this follows and simply builds on the same file organization we already use for HyperSpin media files. :D

Link to comment
Share on other sites

This one has my vote. It'd settle those agonizing choices between themes.

Another idea along the same lines is to be able to randomly pick from a set of themes such as differing universal themes. I know there aren't many universal themes out there to choose from but some themes do work better as a set and it would be could to package them together.

Link to comment
Share on other sites

I think randomization would be great, I've asked for this in the past. Not sure how easy it would be to do but I like the idea.

I have several jukebox themes with different rock bands... I swap them around depending on which friend is coming over. Pink Floyd fan gets Floyd, Bob Marley fan comes over I've got that theme, same for Police, Springsteen etc... One thing that would be cool would be if there was a randomization of the theme but to somehow keep the video with the theme. So the Pink Floyd video would play with the Floyd theme and the Doors video would match up with that theme etc...

Not sure if possible but it would be cool.

Link to comment
Share on other sites

I posted somthing like this a few years back but it was pooh pood because they wanted it included in the newest HS at the time

and therefore wanted nothing to do with it.

Well still no update or support for it, so this was and still would be just a temporary workaround till if\when HS ever supports it.

[RELEASE] The 'Randomizer'

by Tempest

I have been using this for years to randomize my...

-no videos

-HS start videos

-some system videos

-some default themes

-some game themes.

You could randomise Soooo much more!

Link to comment
Share on other sites

I posted somthing like this a few years back but it was pooh pood because they wanted it included in the newest HS at the time

and therefore wanted nothing to do with it.

Well still no update or support for it, so this was and still would be just a temporary workaround till if\when HS ever supports it.

[RELEASE] The 'Randomizer'

by Tempest

I have been using this for years to randomize my...

-no videos

-HS start videos

-some system videos

-some default themes

-some game themes.

You could randomise Soooo much more!

Is there another link for that "Randomizer"? I'm not a member of GameEX forums.

Link to comment
Share on other sites

  • 2 weeks later...

[/color]I have been using this for years to randomize my...

-no videos

-HS start videos

-some system videos

-some default themes

-some game themes.

You could randomise Soooo much more!

This is great, thanks, chillinwater! I was able to get it working with an initial system video. I will probably soon be rolling it out to my full system video set, each of which I have a number of options for.

So I'm curious, the way that I'm using this is that I'm having HS call Randomizer on load, passing in parameters for each of the random sets I have. That gives me a random video each time the cabinet is booted, which is close to what I wanted, but not quite. I was hoping for was a random video each time you spin to a specific item on the wheel. As it is now, if I want to see a new video, I have to exit and re-run HS.

Do you know if there is a way to use Randomizer to randomize the videos each time a specific wheel item is pointed to?

Link to comment
Share on other sites

Do you know if there is a way to use Randomizer to randomize the videos each time a specific wheel item is pointed to?

That would have to be hard-coded into HS to be possible.

One possibility is to have a program running behind HS on a timer that would swap files around at random. It would work since HS loads the media upon selecting it on the wheel, it doesn't cache it all on startup and retain it. I'd just worry about it swapping out media and causing a stutter in HS though. Ideally, this should be hard-coded to work properly though.

Link to comment
Share on other sites

Is there another link for that "Randomizer"? I'm not a member of GameEX forums.

Yes @EmuMovies

This is great, thanks, chillinwater! I was able to get it working with an initial system video. I will probably soon be rolling it out to my full system video set, each of which I have a number of options for.

So I'm curious, the way that I'm using this is that I'm having HS call Randomizer on load, passing in parameters for each of the random sets I have. That gives me a random video each time the cabinet is booted, which is close to what I wanted, but not quite. I was hoping for was a random video each time you spin to a specific item on the wheel. As it is now, if I want to see a new video, I have to exit and re-run HS.

Do you know if there is a way to use Randomizer to randomize the videos each time a specific wheel item is pointed to?

It could be done with a work around using ledblinky ...maybe!

(like is being done with marquee screens and Hyperspeech?)

but this is why I added a button press function to randomize at the press as well as on start-up of HS.

There is No need to exit HS this way (the code is in the thread I posted)

Its not perfect.

I thought of different strategies for button presses...

like using the same key(s) as...

-entering a wheel

-exiting a wheel

-using the exitemulator keys

but decided on a unique combo to avoid problems.

You could try your own key strategies that may work better for you!

I even programmed a timer which synched with HS's "Attract Mode" which worked,

but when timing out, if the wheel was on the file you were randomising and not perfectly synced with "Attract Mode", windows would throw a fit and crash randomizer.

When left unattended this would leave hundreds of dialog boxes that you had to click "OK" on acknowledging randomiser had crashed.

NO THANK YOU! :D

So I abandoned it in favor of key presses.

After a couple of years now I may have to re-visit the idea, Im sure its possible for better implementation.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...