I was trying to verify my old knowledge about how looping works in Protracker Modules when the repeat start stored in the file is 0 and unfortunately MilkyTracker first had me completely confused.
One Shot samples have a repeat start at 0 and repeat end somewhere in the middle of the sample. The way they are supposed to be played is one time completely through from the beginning of the sample to the very end (i.e. beyond the repeat end) - which is the one shot - and after that 1 pass it should loop indefinitely between the beginning of the sample (= repeat start) and the repeat end.
Actually there are 2 failure modes. Let's start with the simpler one:
(1) When in the Sample Editor, if you click on "Play: Wav", it skips the first one-shot pass and goes directly to playing only the loop.
(2) When using the keyboard to play the sample or when playing the sample in the song pattern, it's a bit more complicated: The first pass (one shot) completely through is done correctly, but then the first loop pass doesn't start at 0 and goes to the repeat end, but instead starts at (sample_size - repeat_len) and goes to the end of the sample (as if the portion to repeat was shifted to the end of the sample instead of the beginning). After that 1 wrong repeat pass, it repeats the sample correctly, tho. Starting at 0 and going to repeat end.
My system is Debian Wheezy 64 bit. MilkyTracker version 0.90.85
My I/O config, if it matters:
* Driver: SDLAudio
* Buffer: 42.6 ms (2.0k)
* Mixer Resolution: 48000 Hz
* Frequency Table: Amiga frequencies
* Edit mode: Fasttracker II
Testing with sample st-06:3-background taken from charismofdark.mod
* One shot
* 8-bit
* Length: 0x6F4C
* Repeat: 0x0000
* Replen: 0x51C6
One can clearly hear how it is playing incorrectly, since the sample has portions with different character that are easy to differentiate. Also, the vertical bar indicating the current play position of the sample in the Sample Editor shows it playing incorrectly.
Regards,
Niels Boehm