Proper looping of modular tracks

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Flumminator, Zomis

Post Reply
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Proper looping of modular tracks

Post by Eizzoux »

Some of MOD/IT/XM/S3M music actually have a little bit different looping principles. To be specific, some tracks are first playing few samples once and then loops only remaining ones and never plays first ones again, and you can see that in (almost) any tracker like Fast Tracker, Impulse Tracker, Scream Tracker or Schism Tracker (the one I'm using). For example, Bidrag7 by Wasp has this sample order:

Code: Select all

002
000
004
003
001
001
005
007
006
008
First it plays the entire track and then restarts from fifth sample "001", because samples 002, 000, 004 and 003 are the intro parts, while the remaining ones are parts of the main music loop. Importing tracks with scripted loop like that one into R'n'D, however, ignores that script and just loops the entire song and proper loop breaks, which is sad.
It would be awesome if this proper looping feature was implemented! Or maybe... we could even make the game do more specific loop ourselves whatever the music format is? Like, in musicinfo.conf somehow?
Just to show what I mean, here's the Schism Tracker (if needed) - [link] and Bidrag 7 attached to the topic below, you can try it, I guess.
Attachments
bidrag.zip
Yeah, archived, sorry...
(41.58 KiB) Downloaded 204 times
𒈟
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Proper looping of modular tracks

Post by Holger »

Yes, I remember that Alan Bond reported some similar misbehaviour when playing MOD style music files. :-/

Unfortunately, I did not write that part of the game by myseld, but instead used the SDL_mixer library, which itself uses either the "mikmod" or "modplug" library; not sure if they differ in behaviour regarding the reported issue.

So I'm afraid that I can't do much about this, apart from debugging or improving the code of the mikmod or modplug libraries.

The only thing I might be able to do is checking if I use the very latest version of the SDL_mixer library, which is maybe not the case, as there were some updates recently, I think.

BTW: It may be possible that you can try for yourself: Download the latest version of SDL_mixer.dll (with all related libraries, like mikmod.dll or modplug.dll) and maybe also SDL.dll, replace the DLL files and try if it helps. (If it does, I should replace the library files also in the main distribution package.)
Post Reply