Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Tutorial: Music looping for mmf2


Blue Frenzy

Recommended Posts

Click HERE to download

I just made that tutorial because someone requested. It seems it is quite hard to find the right positions. I just reccomend one thing: skip sound is better than double. I mean, if you put it right but, because of slowdown sometimes the sound overlaps and the same note plays twice in half of a second, it is better to substract seconds since on one will notice that one note is 1/100 times shorter but it is very noticeable if the note plays twice.

Any rep is welcome :P

EDIT: fixing links.

  • Like 3
Link to comment
Share on other sites

I tried lowering the fps and your subtract and add method instead of simply setting the music position to the restart time actually prevented any noticable delays.

Very nice tutorial. =)

Rep up.

Edit: I tried playing a short mod that was designed to loop from the end straight to the beginning with this and it didn't loop correctly. Just telling it to loop and disabling your events caused the same results. ( yes, I did set the repeat times correctly ) It loops the way it's supposed to in winamp, so I'm wondering if it's possible to get it to work in MMF2 as well.

http://larkss.supersanctuary.net/PublicFiles/no_noizz.mod

9KB link for those interested in what mod I'm using.

Link to comment
Share on other sites

Well, the tutorial is made to play wav or ogg files, never tryed with mods.

But, if you convert it to ogg, you have to make it skip about 5 milliseconds to twenty, depending of the music, between the end part and the loop part. So, if you use time 50000 and loop to position 2000, try doing it with 49990. It usually fixes everything and no one notices the difference. But, if you keep it on 50000 and, because of slowdowns and the time required to process the event, the note plays twice, it sounds wrong.

and a final note:

This example does NOT work with wavs if you compress sound on stand alone apps. Due to the compression method, it seems the time position is not well detected. It will work when running the application but, after the stand alone build, it stop working.

PD: attached the file.

looping music.rar

Link to comment
Share on other sites

Well, the tutorial is made to play wav or ogg files, never tryed with mods.

...XD I forgot you used ogg and not mod. That explains a lot. =P Still though, it would be nice to find some kind of way to get mods to loop correctly ( not in your tutorial precisely since it's for ogg goodness ) so you won't have to convert it and make it take up more space than need be.

Link to comment
Share on other sites

AS far as I can remember, ogg have an option to loop on a certain position. If not mod, it or any symilar format i am sure you can convert. But, if not possible, you can always convert it to ogg since it's size is lower than mp3. I converted a 1:13 seconds music, enough for a game music, in 400kb with a decent qualit. And I think it is possible to do it even lower.

EDIT: 332kb and already sounding good.

Link to comment
Share on other sites

You can make the size low yes, but that would mean doing something like turning my 9kb mod up to around a 100-200kb ogg. I know it's not much and I'm probably definately being picky, but for some reason I'm bent at saving as much space as possible. Meh, I guess this is a win some, lose some situation. =P

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...