Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Seemless Music and Another Thing

Okay, I have this song I want to use as a character theme but I have one problem: It has a distinctive intro. I thought "No problem. I'll just cut the intro, get the song to loop almost seamlessly, and have them play one after the other in the game." Well, I did just that while making sure the game waited exactly as long as the intro (the fact that said bit ended with five milliseconds made it easy).

You might be able to see both of the problems.

The first is the awkward pause between the songs since RMXP doesn't seem to like to do that. The second is that, for exactly 561 frames, nothing is going on while the game waits for the intro to play out.

I get the feeling that I'm going to have to remove the intro (no problem seeing as how there's a better place to loop it that'll not only make it seamless, it won't require the intro) but I wanted to make sure there isn't anything else I can do first.
 
why is there nothing going on in your game during the intro? just set the wait effent to 'parallel process' and you should be fine. also, what audio format are you using?
 
mp3's should be able to play seamlessly (they have the feature of streaming while playing); unlike .oggs which may take a few seconds to load. That said if you have a large enough file there still might be a gap.

A last resort might be setting one song to BGM, and one song to BGS. Then start the second one 1-2 seconds before the first one ends. This should fix your gap problem.
 
Setting the intro as BGS and the loop as BGM seemed liked it was going to work but it still has that awkward gap. In case you're wondering, there is no silence in the loop and I lowered how long the game waited before playing the BGM in case it was that.

Stranger still, the length of time the game is waiting is shorter than the intro of the song yet sometimes, depending on how long I tell the game to wait, the game will loop the BGS before ending it and playing the BGM. And this is happening when I decrease the amount of time the game is waiting.

Want me to post a picture of how I'm trying to get it to work?
 
I'm play the intro as an ME and the rest of it as a BGM. I can't remember if BGM still plays silently while MEs are going, so if that's a problem then use the remember BGM before the ME, then continue BGM after.
 
Isn't there a file format which allows you to have an intro and then a looping section?

Anyway, just remember frames and seconds are not interchangeable. 561 frames to you is different to 561 frames on a slow PC, one with lots running, etc. Framerate is constantly changing and only the upper limit is a set number.
 
Amy Pond":h6tviewi said:
Isn't there a file format which allows you to have an intro and then a looping section?

Anyway, just remember frames and seconds are not interchangeable. 561 frames to you is different to 561 frames on a slow PC, one with lots running, etc. Framerate is constantly changing and only the upper limit is a set number.
There probably is. At least, that'd make sense. The real question here would be if RMXP could play such a file type properly.

So, if I have a song that's about 28.5 seconds long, how can I be sure about the timing with music?
 
Tomas":1t75xc1l said:
ShadowMainZERO":1t75xc1l said:
So, if I have a song that's about 28.5 seconds long, how can :shock: I be sure about the timing with music?
you cant.
Well isn't that a bitch.

Tomas":1t75xc1l said:
Amy Pond":1t75xc1l said:
Isn't there a file format which allows you to have an intro and then a looping section?
thatd be .ogg
I'll look into it more. If not, I found a script for XP that lets you loop songs at a specific point. If I can't get it to work, I'll use that.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top