Damaris

Villager
Member
Joined
Jan 5, 2017
Messages
24
Reaction score
21
First Language
English
Primarily Uses
Ever wonder how the default RPG maker music loops? It's pretty simple, but in spite of looking I have never seen anyone explain it on the forums. RMMV (And AFAIK most other makers) are designed to read STARTLOOP and LOOPLENGTH tags in an audio files metadata. I'll be using a small piece of open source software I found on source forge called kid3 to edit the metadata and read the audio sample rate.

*Note; some audio filetypes use metadata tags differently. This tutorial may not work for every filetype - but it should work with OGG and M4A files at the very least.

Step 0 - Browse to your file in your metadata editor.
Step 1 - Note your Sample Rate (Hz).
Step 2 - Create a new Metadata Tag
Step 3 - It's important to name the frame ID "LOOPSTART" no quotations. As for the next window "text"; we will have to do some math - find the point in the song that should be the beginning of your loop. You want the exact time to make the loop seamless. Convert that time to seconds. Multiply the number of second by your sample rate (I recommend using a calculator) ;). The resulting number will be the value of the tag; aka, what you put in the "text" field.

In the example below - My sample rate is 44100 hz, and my loop starts at exactly 56 seconds. as a result - the LOOPSTART value was 2469600.

upload_2017-2-10_3-54-19.png

Step 4 - You now need to determine how long your loop will go for before starting again. Convert it to seconds, then multiply it by the sample rate. Create another tag, and call it "LOOPLENGTH", the input field should contain the result of the math done earlier in this step.

In the above example I wanted to loop the the rest of the song. The song is 2:20, so I took those 140 seconds, and deducted the 56 seconds before the loop started, leaving me with 84 seconds. 84 x my sample rate (44100) = 3704400.

Done. Don't forget to save, then throw it into RMMV as a BGM, and provided you got the times right - your music will loop seamlessly.
 
Last edited:

Ryethegret

Warper
Member
Joined
May 28, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
N/A
This was really useful to me so thanks for making this thread. I was wondering if there was a way to test if the loop worked without having to use rpg maker and also, is this metadata used in games that are not created with rpg maker?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,003
First Language
English
Primarily Uses
RMVXA
@Ryethegret This is the official site for RPG Maker and we do not give support to engines not published by Degica. It would be luke going on to a Ford site and asking for help with a car made by General Motors.
 

Ryethegret

Warper
Member
Joined
May 28, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
N/A
Yeah sorry I see that now. I was having trouble putting my music into the RPG maker so I thought maybe another programme would because kid3 wouldn't give me a playback of my loop.
 

Latest Threads

Latest Posts

Latest Profile Posts

I love it when a plan comes together, and especially when Ruby decides to work with me when I decide to code. :kaopride:
Got sick and had to take a few days off work in order to get tested and make sure it wasn't the big one. Felt a lot better today and thought to myself, "Hey now, I can't get tested until tomorrow anyway, I can get so much character art done today!"
....I watched Youtube and browsed this site for hours instead.
>.>
But at least I'm doing the art now! Yaaaaay.......
1638314262144.png
Didn't wanna spam the feed by posting Denzel's spritelayer separae, but I'm real happy with how this concept is coming along so wanted to share it, innit :D
EVXA wrote on Avery's profile.
Not sure how often you take time to play the games sent to you, but if you could give my game a shout & review on steam maybe that would be amazing, only if you like the game of course, I'd love to know which games have been your favorites over the years too.
I'm seeing my god daughter's school play next week. Being the mild agoraphobe I am this makes me nervous. Thus I had a dream that it was actually a plot by my best friend to take me clubbing at an establishment where it is customary to throw a harpoon at staff members to reward good service.

Forum statistics

Threads
117,092
Messages
1,104,505
Members
153,092
Latest member
clark70157
Top