Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Looping music

hbn

Towns Guard
Xy$
0.00
So I had an MP3 from a while back. I'm aware that MV only supports OGG files (or mine only shows them up in the editor anyway) so I've converted the track to OGG using Audacity.

Now I've found a tutorial for looping OGG files, but I've followed it closely and the track doesn't seem to be looping properly. I've found the point in the file where the loop should begin and created a label called 'loopstart'. I found where I want the loop to end and I typed in 'looplength' because apparently MV looks for looplength rather than loopend (though I've tried it with both). I then highlighted the selection and took the sample volume from where the labels are and added that to the metadata but for some reason, the game is ignoring it completely and playing from the absolute beginning of the track, to the absolute end of the track.

I'm sure I've done it properly but for some reason it just isn't working. Do any of you who have composed have a tutorial on how to loop in case it just is one or am I doing something wrong? Because if I have entered something wrong somewhere, I can't see it.

This is what I've entered to the track.



Also when entering the sample values into the metadata, do I need the leading zeroes or can I omit them? Doing either, the loop still doesn't work.
 

Dad3353

Praised Adventurer
Your LOOPSTART and LOOPLENGTH appear to have the same value; that won't work. It's simple enough, in fact; here's what's needed...

Place a marker at the place where the Loop is to Start. Note this number (be sure that the unit is 'Samples', and the Rate is 44100, of course...). This is the number that will be entered into LOOPSTART.
Now place a marker at the point where the Loop is to return to Loop Start. Note this number.
Subtract the LOOPSTART number; this will give the LOOPLENGTH number to enter. The System will then know to return to the LOOPSTART point once LOOPLENGTH samples have gone by from that point.
That's all there is to it, but I would add that, using Reaper for composing my stuff, I render a version up to the Loop Start, and another version of just the interior of the Loop, from Start to the end of Loop. With these two incomplete components, I use Audacity to then measure each of these two pieces, by simply going to the end, and reading off the number given. This avoids me having to mess about in Audacity finding the exact spot, as my bars are easily 'locked' to in Reaper, and so my joining is spot on. Just asyin'; Audacity does a fine job, but relies on manually identifying the precise musical moment to loop. No big deal, but as I have Reaper anyway, I make things easier for myself..! ;-) (Lazy..? Me..? Who said that..? ;-) ).
Hope this helps; ask away if more is needed.

Edit: Be aware, too, that the current version of Audacity (2.1.2...) will not retain the Loop information for M4a files. The developers are aware of this, and have announced that it should be fixed in the next release (no time-line for that as yet...), so M4a files created with Audacity will not loop in MV. Just sayin'.
 
Last edited:

hbn

Towns Guard
Xy$
0.00
I was just going by what Audacity gave me. The start sample according to that is 2673131. If I go to the loop length, the value is 5345402. If I subtract start from length, then that is 2672231, which is also what shows up in the screenshot in the length section, which is what is entered in that metadata.

Either way I seem to have the track looped properly now. Redid the loopstart and loopend labels, calculated the length and cleared out old metadata and the track is now working great.

Thanks for the help @Dad3353
 

Dad3353

Praised Adventurer
I was just going by what Audacity gave me. The start sample according to that is 2673131. If I go to the loop length, the value is 5345402. If I subtract start from length, then that is 2672231, which is also what shows up in the screenshot in the length section, which is what is entered in that metadata...
My aged eyes are failing me; yes, those figures are fine, upon closer inspection. Just coincidence that they looked so similar at first glance. Well done for getting it sorted out.
 
Top