Module files can not loop correctly. #202

Open
opened 2018-07-13 06:26:26 +00:00 by Kashouryo · 5 comments
Kashouryo commented 2018-07-13 06:26:26 +00:00 (Migrated from github.com)

It looks like there's a small gap between loops in MKXP's module music player(xm, mod, etc.). This small gap of silence breaks almost all of the perfect loop modules(one of the features of module music is being able to endlessly loop a tune). Normally, Position Jump can solve this issue. However, MKXP is also ignoring Position Jump command.
I hope this issue can be solved since one of the biggest purposes to use module music is being able to endless loop a tune.

Thank you!

It looks like there's a small gap between loops in MKXP's module music player(xm, mod, etc.). This small gap of silence breaks almost all of the perfect loop modules(one of the features of module music is being able to endlessly loop a tune). Normally, Position Jump can solve this issue. However, MKXP is also ignoring Position Jump command. I hope this issue can be solved since one of the biggest purposes to use module music is being able to endless loop a tune. Thank you!
carstene1ns commented 2018-07-13 07:47:19 +00:00 (Migrated from github.com)

Hi, mkxp delegates the music playback to SDL_sound, which then uses the appropriate library to do the actual decoding (i.e. ModPlug). That being said, these libraries would likely need to be patched to provide seamless loops.

(We have a similar problem at EasyRPG/Player project, MIDI files with custom loop events, so we need to look for and respect custom loop commands there)

Can you provide some example files (or link a game)?

Hi, mkxp delegates the music playback to [SDL_sound](https://github.com/Ancurio/SDL_sound), which then uses the appropriate library to do the actual decoding (i.e. ModPlug). That being said, these libraries would likely need to be patched to provide seamless loops. (We have a similar problem at [EasyRPG/Player](https://github.com/EasyRPG/Player) project, MIDI files with custom loop events, so we need to look for and respect custom loop commands there) Can you provide some example files (or link a game)?
Kashouryo commented 2018-07-14 02:38:37 +00:00 (Migrated from github.com)
Short and good for perfectly loop testing: http://modarchive.org/index.php?request=view_by_moduleid&query=158605 Problem with position jump command: http://modarchive.org/index.php?request=view_by_moduleid&query=159847
Ancurio commented 2018-07-14 09:53:14 +00:00 (Migrated from github.com)

This may be a bit more complicated. Setting this value to -1 should loop BGMs perfectly, from what I gathered by googling. The problem is that all decoding options for modplug, including looping, appear to be global for every mod loaded.

So if one wanted to use mods for both sound effects and BGMs, this would lead to a conflict. Also I don't know if this setting belongs in SDL_sound, or if it justifies a mkxp-internal ALDataSource implementation talking directly to modplug.

This may be a bit more complicated. Setting [this value](https://github.com/Ancurio/SDL_sound/blob/master/decoders/modplug.c#L146) to `-1` should loop BGMs perfectly, from what I gathered by googling. The problem is that all decoding options for modplug, including looping, [appear to be global](https://github.com/Konstanty/libmodplug/blob/master/src/modplug.h#L111) for every mod loaded. So if one wanted to use mods for both sound effects and BGMs, this would lead to a conflict. Also I don't know if this setting belongs in SDL_sound, or if it justifies a mkxp-internal `ALDataSource` implementation talking directly to modplug.
Kashouryo commented 2018-07-14 18:48:05 +00:00 (Migrated from github.com)

can we register a custom value on the RGSS system to switch between the traditional mode and perfect looping mode? Or using mkxp.conf?

can we register a custom value on the RGSS system to switch between the traditional mode and perfect looping mode? Or using mkxp.conf?
Ancurio commented 2018-07-15 06:18:02 +00:00 (Migrated from github.com)

Ideally perfect loop should be the default and only looping mode.

Ideally perfect loop should be the default and only looping mode.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#202
No description provided.