[xmp] Add option --offset-bug-emulation

Add this option from xmp 3.5.0 to handle bugs in Protracker 2.x set sample
offset command.

From: Martin Willers <y0000121@rzbcosv1.rz.tu-bs.de>
Subject: Incorrect Protrack-effect 0x09
To: xmp-bugs@helllabs.org
Date: Mon, 21 Dec 1998 05:28:48 +0100 (MET)
Reply-to: M.Willers@tu-bs.de

I've downloaded and installed the xmp-snapshot from Sun, Dec 20 today.
Don't know just how good the protrack-emulation is planned to get, but
there's a bug in the interpretation of Protracker's handling of effect 0x09
(SetSampleOffset), that causes some MODs to play incorrectly.
Original Protracker-source has some bug in handling effect 09, in that
the sample offset given in the effect byte is added +twice+ to the current
sample offset, once before playing this instrument (as is expected), and
once again after this instrument has been played! So, if on the same channel
the same instrument is played again without resetting the instrument's
parameters (eg. when just a note period is specified, but not the instrument
number again? or the other way round? :), the offset is twice as high
as one would expect.
This can be heard very easy eg. in the (very popular) song "No Mercy" by
Alf/VTL, Position #2-#3 in the sequence.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
master
Claudio Matsuoka 13 years ago
parent f3e351dc9d
commit 463a77bba7
  1. 5
      src/options.c
  2. 3
      src/xmp.1

@ -66,6 +66,7 @@ static void usage(char *s)
" -l --loop Enable module looping\n"
" -M --mute ch-list Mute the specified channels\n"
" --nocmd Disable interactive commands\n"
" --offset-bug-emulation Emulate Protracker 2.x bug in effect 9\n"
" -R --random Random order playing\n"
" -S --solo ch-list Set channels to solo mode\n"
" -s --start num Start from the specified order\n"
@ -113,6 +114,7 @@ static struct option lopt[] = {
{ "null", 0, 0, 'N' },
{ "nocmd", 0, 0, OPT_NOCMD },
{ "nofilter", 0, 0, 'F' },
{ "offset-bug-emulation",0, 0, OPT_FX9BUG },
{ "output-file", 1, 0, 'o' },
{ "pan", 1, 0, 'P' },
{ "probe-only", 0, 0, OPT_PROBEONLY },
@ -216,6 +218,9 @@ void get_options(int argc, char **argv, struct options *options)
options->driver_id = "file";
}
break;
case OPT_FX9BUG:
options->flags |= XMP_FLAGS_FX9BUG;
break;
case 'P':
options->mix = strtoul(optarg, NULL, 0);
if (options->mix < 0)

@ -24,6 +24,7 @@ xmp - Extended Module Player
[\fB-N, --null\fP]
[\fB--nocmd\fP]
[\fB-o, --output-file\fP \fIfilename\fP]
[\fB--offset-bug-emulation\fP]
[\fB-P, --pan\fP \fIpan\fP]
[\fB--probe-only\fP]
[\fB-q, --quiet\fP]
@ -94,6 +95,8 @@ Disable interactive commands\&.
.IP "\fB-o, --output-file\fP \fIfilename\fP"
Set the output file name when mixing to raw or WAV files\&. If \'-\' is
given as the file name, the output will be sent to stdout\&.
.IP "\fB--offset-bug-emulation\fP"
Emulate Protracker 2.x handling of effect 0x09 (set sample offset)\&.
.IP "\fB-P, --pan\fP \fInum\fP"
Set the percentual panning amplitude\&.
.IP "\fB--probe-only\fP"

Loading…
Cancel
Save