• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Idea for Music Looping Problem

Status
Not open for further replies.

BraviaryKnight

Fisherman
What if...

the music is composed of:
1- non loopable music
2- loopable music

we play the 1 once, then loop the 2!

All questions go to this guy -->:bag:
 

Shwynx

Starting Trainer
well what matters isn't the code, it's what you actually get in game, I think BraviaryKnight was pointing out the fact that certain musics weren't meant to be looped (such as the music in Azalea Town or when you get into a fight). In the case of the fighting music, he suggests that the "intro" part of the fight is on one music file then for the rest of the battle you'd loop another (loopable) music file. I'm not a programmer but I think you can also play a certain music file starting a certain point so you'd use one file that you'd let play all the way and when you get to the end you tell the game to play the same file again starting at 1 min and 20 secs for example and keep on looping that.

just a thought ^^
 

Jeremey

Fisherman
If it was designed in MIDI, it could work and loop perfectly without that slight "pause" between loops
 

SACooper95

Pokémon Ranger
Contributor
So I am doing some experimenting with the music coding to find a way to smoothly loop music. I have a few concepts in mind but could use some suggestions.

Here's what I have so far:

1) While I'm not sure how many consecutive WMA's the engine itself can play at the same time without slowdowns, I am certain 2 tracks can play at the same time... one can start almost immediately. (I've heard the BGM and the Item Obtained Jingle run at the same time.)

2) What I know so far is how video games usually loop music is by telling the game if the track end to go back and continue to play at that point until a certain point. Of course this is usually done either in a chip tune setting (Like the Sega Genesis) or in a MIDI file setting.


This gives me 2 concepts of how music can smoothly be looped instead of adding hours of endless track that take up memory...

Concept 1) Using my first idea, there could be two files that has the same music. The first one that plays the one with the beginning and the second one that starts where the loop starts. When the first WMA gets to the end of the track, the second WMA will continue to play indefinitely.
Pro: Perfectly smooth music play
Con: High Memory Usage

Concept 2) I'm not sure how to properly code this, but if there was a way to tell the engine when a 2 minute song hits 2:00 to go back to 0:17 of the track and create a infinite loop in the code, that would also create a loop in this song.
Pro: Save Memory Usage
Con: Choppy loop or abrupt pause if not set back precisely.

I'm actually looking into Concept 2 for my music pack since it will contain quite a few MB's
 

Saruish

Dragon Tamer
maybe make a loop option that lets you controll when and where it loops at. This way you still have the beginning but when it ends. It loops back to a mark where you wanted it to loop.
For example. Start of song.....A.................end
A being the point in time of the song where you wanted the loop to begin. I know this is probly complex coding.
 

Jeremey

Fisherman
maybe make a loop option that lets you controll when and where it loops at. This way you still have the beginning but when it ends. It loops back to a mark where you wanted it to loop.
For example. Start of song.....A.................end
A being the point in time of the song where you wanted the loop to begin. I know this is probly complex coding.
Technically the music looping is already done, its just saved as 2 different files. The first one is played, and then the second one is looped. The only real problems are that some of them aren't finished, and that there are obvious pauses between some of them. I'd say its just something that could easily be worked out, just nobody has sat down and done it yet since there's alot more important things to do first. I may give this a shot sometime in my free time ;)
 

DracoHouston

Kolben Developer
Contributor
maybe make a loop option that lets you controll when and where it loops at. This way you still have the beginning but when it ends. It loops back to a mark where you wanted it to loop.
For example. Start of song.....A.................end
A being the point in time of the song where you wanted the loop to begin. I know this is probly complex coding.
Technically the music looping is already done, its just saved as 2 different files. The first one is played, and then the second one is looped. The only real problems are that some of them aren't finished, and that there are obvious pauses between some of them. I'd say its just something that could easily be worked out, just nobody has sat down and done it yet since there's alot more important things to do first. I may give this a shot sometime in my free time ;)
the hgss pack loops pretty well, i've been using that a lot. all you have to do is make the wma start and end on a similar sound in the same part of the music
 

Daziman

Champion
Trusted Support
Retired Mod
like in my pack :D
But you or Nils or someone must improve the music system
 
Status
Not open for further replies.
Top