• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How to memorize exact moments of music when playing?

Minokun

The Rival in Space
  • 107
    Posts
    11
    Years
    • Seen Sep 18, 2019
    The title is a bit crazed, so I'll explain. You know how when your playing a Pokémon game and when you fight a trainer or run into a wild Pokémon how the background music will change during the battle, but once the battle is over the music would play exactly where it left off instead of starting the whole track over? Is there a way to do that in Essentials?
     
    The title is a bit crazed, so I'll explain. You know how when your playing a Pokémon game and when you fight a trainer or run into a wild Pokémon how the background music will change during the battle, but once the battle is over the music would play exactly where it left off instead of starting the whole track over? Is there a way to do that in Essentials?

    It already can do that...
    look in your event commands on the second page
     
    It already can do that...
    look in your event commands on the second page

    That only memorizes the background music, not the EXACT moment where the music left off. I mean like if I were to change the Background music while it was in the middle of the song, and then change it back I want it to resume playing from the middle.
     
    I was just working on Audio stuff myself (not for a Pokemon game though). There is something called FMod which allows you to manipulate music in a lot of ways. One of the coolest being able to set specific looping points for your BGM. But yeah, that thing has methods to find the exact millisecond of your BGM position. It's all just a method of implementation now, but the script itself does not clash with Essentials.
     
    Last edited:
    I was just working on that myself (not for a Pokemon game though). There is something called FMod which allows you to manipulate music in a lot of ways. One of the coolest being able to set specific looping points for your BGM. But yeah, that thing has methods to find the exact millisecond of your BGM position. It's all just a method of implementation now, but the script itself does not clash with Essentials.

    Ok cool! Thanks!! I'll give it a try. It looks like it works pretty great!
     
    Okay, How would I transfer these scripts to essentials? There are alot of things missing.
     
    Last edited:
    There is nothing missing. You simply have to copy and paste the one script. If you're having difficulties figuring out which one, it's this one
    Spoiler:
    Lol, but I question whether or not you should use this, if you couldn't get this far. Hahha. Don't forget to transfer the "fmodex.dll" to your projects folder either.
     
    There is nothing missing. You simply have to copy and paste the one script. If you're having difficulties figuring out which one, it's this one
    Spoiler:
    Lol, but I question whether or not you should use this, if you couldn't get this far. Hahha. Don't forget to transfer the "fmodex.dll" to your projects folder either.

    Yeah, I did all that. It's still not doing what I wanted it to do though. In the example it works great but not in my game.
     
    The thing is now, you have to tell your game how you want it to behave. This requires coding. FMod provides you with the tools you need to have extra Audio control. Without it, you're reduced to your regular stock options (which aren't that swell). For instance, if I wanted to play a BGM now that I have FMod, and set a loop that plays between seconds 2 and 5 of the game, I would do
    Code:
      FMod.bgm_play("Audio/BGM/some_bgm",volume,pitch)
      FMod.bgm_set_loop_points(2*1000, 5*1000) # as they need to be in milliseconds
    See, now with FMod, and a little work, I have changed the way the BGM works in this particular instance. Now if I wanted to make my life easier, I'd be thinking: "I don't want to do this crap for every single part where I load BGM." That's a good way of thinking, so I go and do some investigating. What binds most Essentials BGM plays?
    Code:
    pbBGMPlay("bgm")
    does. So I go look for the def to do some adjustments. And I change the standard .bgm_play method, to the new/fancy one from FMod. That way, I get all of the FMod perks, including the bgm resuming from the correct point, instead of the old/lame method.

    Some things will require a little work from you, to get them to work how you want.
     
    The thing is now, you have to tell your game how you want it to behave. This requires coding. FMod provides you with the tools you need to have extra Audio control. Without it, you're reduced to your regular stock options (which aren't that swell). For instance, if I wanted to play a BGM now that I have FMod, and set a loop that plays between seconds 2 and 5 of the game, I would do
    Code:
      FMod.bgm_play("Audio/BGM/some_bgm",volume,pitch)
      FMod.bgm_set_loop_points(2*1000, 5*1000) # as they need to be in milliseconds
    See, now with FMod, and a little work, I have changed the way the BGM works in this particular instance. Now if I wanted to make my life easier, I'd be thinking: "I don't want to do this crap for every single part where I load BGM." That's a good way of thinking, so I go and do some investigating. What binds most Essentials BGM plays?
    Code:
    pbBGMPlay("bgm")
    does. So I go look for the def to do some adjustments. And I change the standard .bgm_play method, to the new/fancy one from FMod. That way, I get all of the FMod perks, including the bgm resuming from the correct point, instead of the old/lame method.

    Some things will require a little work from you, to get them to work how you want.

    I see... Scripting is sometimes pretty simple, huh? Thanks for your help! You and your scripts are AWESOME! {:3}
     
    These aren't my scripts though. Just make sure to credit the creators of the FMod Script when you use it.

    FMod is awesome.
     
    Back
    Top