Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Chiptune (XM, MOD) music looping
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Tue Sep 11, 2012 6:18 pm    Post subject: Chiptune (XM, MOD) music looping Reply with quote

Okay, hope this hasn't already been answered.. I saw a bunch of music looping topics but they all seemed to be MIDI-related.

My question is specifically about the "chiptune" formats that OHRRPGCE can play (e.g. XM and MOD). It's been a while since I've looked at my custom.exe so I decided to get the latest (July 31, 2012 Alectormancy+2). What I noticed was that the chiptune music that I had imported no longer loops correctly. What I mean is, the songs loop from their intros every time, rather than from the point right after the intro (the FAQ uses victory fanfare which is a good example).

I thought I might have been remembering wrong, so I loaded up the older installer I still had saved (from Jan 24, 2010 Ypsiliform+1). The chiptune looping in this version works fine...

Is this a known bug? Is there something I need to do on my end to get it working?
Back to top
View user's profile Send private message Send e-mail
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Sep 12, 2012 6:17 am    Post subject: Reply with quote

I was not aware of this bug, thank you for mentioning it!

I think we updated to a newer version of SDL_mixer.dll in that time, so my guess is that the looping bug might be there.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Sep 12, 2012 6:27 am    Post subject: Reply with quote

Wow!

I know immediately what's going on. The Windows build of Ypsiliform shipped with SDL_mixer.dll version 1.2.8, while Zenzizenzic switched to SDL_mixer 1.2.12 for some bugfixes. In between, SDL_mixer switched to a different default tracker playing library (from modplug to libmikmod?)

You might be able to take the SDL_mixer.dll file from a Ypsiliform or older release and use it with Zenzizenzic or newer. But I will attempt to fix this properly by recompiling SDL_mixer.dll however needed to get the loop points working.

Could you provide an example of a tracker file with a loop point?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Wed Sep 12, 2012 10:17 am    Post subject: Reply with quote

I sure can, though not from my work computer (where I am currently). As soon as I get home tonight I will get you a few. I have MOD, XM and IT examples, would you like one of each?

And I'm assuming email would be the best way to get these to you?

e: Files have been sent.
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Sep 12, 2012 11:21 pm    Post subject: Reply with quote

Thanks, got them.

Hmm, the loop points don't work with the copy of SDL_mixer 1.2.8 provided with Ubuntu 10.04. I also notice another bug: after the loop, the volume increases!
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Tue Sep 25, 2012 5:05 pm    Post subject: Reply with quote

Hey, just checking in. Any news?
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Sep 26, 2012 8:37 am    Post subject: Reply with quote

OK, I admit it, I was too busy to look into it immediately, and then forgot. Thanks for reminding me. I've started looking into it. I hope to have a solution soon.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Oct 03, 2012 12:05 pm    Post subject: Reply with quote

By "soon" I actually meant "tomorrow I hope", but bear with me; my Windows (or msys?) install seems to be screwed up making any kind of programming or compiling extremely frustrating and time consuming.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Wed Oct 03, 2012 4:30 pm    Post subject: Reply with quote

Oh, no rush. Thanks again for looking into it.
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Oct 11, 2012 1:59 pm    Post subject: Reply with quote

OK, it's fixed. It turned out that SDL_mixer purposefully disabled loop points so that it can control the number of loops if desired (which we don't use). You can download a 'nightly' build to get the fix. You can copy SDL_mixer.dll from a nightly build and use it to replace SDL_mixer.dll from the Alectormancy release if you don't want to use a nightly build.

What I found is that module looping works correctly in the music_native and music_native2 backends. In music_sdl, it used to work back in 2006 (when we included SDL_mixer version 1.2.6) and stopped working in 2007 (when we switched to SDL_mixer 1.2.8). So you must have been using a music_native[2] build previously.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Thu Oct 11, 2012 9:08 pm    Post subject: Reply with quote

Awesome, that worked like a charm. Thanks once again!
Back to top
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Sun Mar 17, 2013 6:04 pm    Post subject: Reply with quote

Okay, another possible tracker format bug. This one might be just me not understanding the nuances of tracker song manipulation but here goes anyway:

I have a song file that I downloaded which did not initially loop, though it was sequenced in a way that looping would be possible. So, I opened the song in MilkyTracker and added a loop-back "command" to the last unique pattern, deleted the patterns after that and then saved the file.

The song sounds perfect in MilkyTracker itself but when I listen to it in the OHRRPGCE, it gets quieter after the loop-point. It does not get progressively quieter after each loop, just after the first one. I remembered that you (TMC) had said something about how the tracks got louder after a loop, so I though this might be a related problem.

I have the song file (it's an xm) if you would like to look into this. Again, it could very much just be me not understanding something.
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Mar 17, 2013 7:52 pm    Post subject: Reply with quote

Sure, send it over. I think it's probably that it's due to a bug in the version of libmikmod linked into SDL_mixer, or an incompatibility between different .xm editors/players.

I just tried the three files you sent me previously with SDL_mixer 1.2.11 on Slackware, and didn't notice any volume change, so there's that. Unfortunately I've completely forgotten which libraries and library versions are used on each platform, so I don't know what's gonig on.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
sotrain515




Joined: 17 May 2010
Posts: 39
Location: Connecticut

PostPosted: Sun Mar 17, 2013 8:15 pm    Post subject: Reply with quote

Sent to your email.

Yes, I haven't ever heard it before in any other music files, maybe it's a problem with MilkyTracker's output.

Thanks again.
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Mar 17, 2013 8:36 pm    Post subject: Reply with quote

Strange, at first I didn't hear any change in volume, but after 3 or 4 loops it got quieter on the loop. Actually it sort of seems like actually it failed to get louder after the end of the quiet beginning segment. Does it always seem to go quieter for you the first time?

I would say that this random behaviour indicates a bug in mikmod.

edit: This looks like a likely cause and fix:
http://sourceforge.net/tracker/index.php?func=detail&aid=3596776&group_id=40531&atid=428227

I have no idea what version of mikmod the copy of SDL_mixer.dll that I built is linked to. I don't know where I got the libmikmod.a file that I linked to. I didn't notice the volume problem when using the previous version of SDL_mixer.dll that we used, though I had thought that I had linked to the same libraries.

edit2: Yes, with the previous SDLmixer.dll the volume doesn't drop even after a long time on loop.

I'm going to put off fixing this until later, though.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group