Basic Music Player

Basic Music Player
FEATURES
This script allows the player to bring up a list of music to play. This can be added as a menu option or called via an event call.
You can choose to add all files from a folder to this list or allow the player to collect music during the game by adding new songs with script calls in events.

The player can now set vehicle bgm and battle bgm to a song that they have learned and change it any time they wish.
Use a script call to return the battle bgm to the player’s choice after a boss fight changed it.

DOWNLOAD:
Get it here >

Advertisements

42 thoughts on “Basic Music Player

  1. Neko Hibiki says:

    It could use a stop button y’know.

  2. Devi Taylor says:

    This is a nice script. I do have a question though. I there a way to have it go back to the default BGM when the player stops their music?

  3. Cavemansome says:

    I’m getting Undefinied Method “count” error in 289. line, what should I do ;_;

    • Galv says:

      You should make sure you put the script below Materials and above main. And start a new game when testing (do not load a save file that was made before adding the script).

  4. Gamrad says:

    Hi! Back again! Love your scripts and I really want and have been using this one. So I was once again looking at the instructions and got confused again. So my main question is if there can be a way to create and event or conditional event that would only run when a certain song is played? I thought I understood it, but I am now confused. I will fiddle around while I’m waiting for a response. Thanks for any help! Oh, and I haven’t bothered to check, but can you change the background for the music player? Or any other borders and stuff?

    • Galv says:

      This script is pretty old – it doesn’t have any fancy background/border changing options and it only adds songs to the list via script calls or it can get them all from your audio folder. One day I might re-write it better to have more options like that (but not soon, I’m afraid)

  5. Gamrad says:

    Bummer…I really want to influenced my game through music. Cool idea though! I guess I’ll try to search abroad for anything similar. Keep up the great work though! I’m enjoying plenty of your scripts as upgrades for my game and as resources to study Ruby upon.

  6. Gamrad says:

    Sorry, but I am trying to figure out what the whole “know_music?” script is suppose to do. How do you properly utilize it and use it (the whole true and false stuff)? Thanks!

    • Galv says:

      Use it in a conditional branch, in the ‘script’ field. eg if you put:
      know_music?(“Town1”)

      Then in your conditional branch, if you know Town1 track, it will activate that branch, if you don’t it will activate the ‘else’ part of that branch if there is one.

  7. Gamrad says:

    I just understood that! xD Is there a way in the script so that instead of music I know, it’s music that is currently playing? It’s so close to what I need (or at least part of it).

  8. Gamrad says:

    Bummer…there’s no way within your own script to hold a variable when you chose your own song manually, then create a function within the same script that would make the situation true which could then be intergrated as a script that you call upon a conditional branch? Sorry, I’m not too familar with most of Ruby coding or any other lanuage in genral xD

    • Galv says:

      That sounds entirely possible, sure – but I am sorry I just don’t have time to tweak my scripts exactly how people want them. I hope you understand. Someone in one of the forums might help you out.

  9. Gamrad says:

    Oh! I am so sorry for bothering you. I’m just enjoying your scripts and wanting to use them to their full extent. Like you said, I’ll put this onto the forums and hopefully people would respond. Thank you once again for your patience, help, and awesome scripts!

  10. Gamrad says:

    So sorry for annoying you like this, but it seems as if I might have a correct way of getting what I want, but not sure.

    def music_on(music_name)
    $game_system._______.include?(music_name)
    end

    Similar to your “know_music” conditional branch script call, I just named it music on. I’m not sure if I’m totally off base, but I’m thinking my main struggle is to figure out what goes in the midst of the blank spot. What variable shows what the current music is? Am I on par, or completely off? Sorry once again for keeping on asking you these questions, it’s just that I tried to go onto the forums, but no one is truly understanding on what I want (in terms, giving me unrelated answers).

    • Galv says:

      As I said before, I am sorry, at this moment I don’t know how to determine what music is currently playing and I am busy doing other things and do not have time to try to work it out for you.

  11. Gamrad says:

    Ouch. I get it. I wasn’t really trying to have you work it out for me, I was just wondering if you knew the variable, defenition, or whatever for currently playing music since you made the script which allows you to chose the music you want to play. I won’t bother you with this problem anymore.

    • Galv says:

      I didn’t mean to be rude but I get so many people wanting me to do stuff for them, I have to try to say no else I would have a full time non-paid job haha.
      Knowing the variable that stores the currently playing music would mean I would know how to determine what music was currently playing and could tell you how. That’s the bit I don’t know :)

  12. Gamrad says:

    I understand your struggles! I wasn’t really offended by you. It must suck to have so many request (to be honest, I didn’t think you so much!) Well, if you don’t know the variable or what not, than I guess I have no need to bug you anymore with this situation xD I tried one more time on a forums. Normally people would just give me links to music players including yours…not really what I need at the moment. Well, thanks for your help and understanding. I now lay my faith in the trust of the VXA puplic!

  13. Gamrad says:

    Not sure if you’re interested, but my solution was resolved! It appears I didn’t even need to make any changes to your script. It could have been something as simple as doing an event as such:

    Conditional Branch: Script: RPG::BGM.last.name == “Super Horrible Song”
    Show Text: Get lost!
    Else
    Conditional Branch: Script: RPG::BGM.last.name == “Super Cool Song”
    Show Text: Hey buddy, great to see you!
    Branch End
    Branch End

    So in the end, your script just makes it so much easier to expand off of events. Thanks for tolerating me ;D

  14. Darkavid says:

    Hi!
    I get error all times when I try start the game with this script. :/ (I didn’t edited the script just plugged and played with it)
    This is the error message: ” unexpected tIDENTIFIER, expecting keyword_end
    …AUDIO_FOLDER = “Audio/Bgm/” # Adds ALL files from this… ”
    I don’t know what’s the matter:O
    Maybe this script incompatible with another one. :S

  15. haruka.sama says:

    how can i add the music player to the menu?im using your menu themes engine

    • Galv says:

      [“Music”,:cmd,:Scene_MusicPlayer, 0, 0, “Description.”,118],

      • haruka.sama says:

        help again? i use this script and the menu themes engine in my two projects.one worked and the other one didnt worked. this is the error by the way:
        Script ‘Menu Themes Engine’ line 891:NameError occured
        uninitialized constant Kernel::Scene_MusicPlayer

  16. Galv says:

    Sounds like you didn’t copy the music player script into your project. But if you did then go through the ideas in this list:
    https://galvs-scripts.com/errors-using-scripts/

  17. perserkoenig says:

    Is it possible to make the player automatically add music that is playing to the list? Like when you fight a new boss or enter a map with a BGM that hasn’t been played before?
    I remotely recall seing this option in a script in the famous mog’s animated title demo, but that player has way too much brickabrack to be usefull and I like your scripts more :-)

  18. bleachbummer says:

    Is there a way to shut off the option to set music for battle and such? and Does it work in Yanfly’s Ace Menu script?

    • Galv says:

      If there’s no setting then that option hasn’t been implemented in this script. And it works in a different scene so should work with Yanfly’s Menu

      • bleachbummer says:

        Thanks, and I think I figured out how to disable setting music for battle and such, just had to get rid of options related to that in the script. Wanted to disable that so it’s just a regular music player for my game.

      • bleachbummer says:

        Also, another question. Is there a way for the music to stop playing when you exit out of the menu? As in you play the music while your in the menu, but once you go back to the map, the default music starts playing.

      • Galv says:

        That would also require changes in the script but unfortunately I am too busy for requests – you could try asking in an rpgmaker forum for someone to do it

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s