Development: Test Cases/S3M

From OpenMPT Wiki
Jump to navigation Jump to search

This test suite is a collection of S3M modules that were created while discovering playback bugs in OpenMPT. It is meant to be an easy way to check for regressions when code is changed, or to verify your own player’s routines if you are concerned about playback compatibility. The tests are designed in a way so that it is easy to figure out if your player is working correctly. In most test cases, your own player’s output can be heard on the left channel, while Scream Tracker 3’s output is heard on the right channel. This way, it is easy to find out whether everything works as intended or if there are any discrepancies without having to read any long test descriptions. When it is impossible to do such a cross-verification, a more detailed description of the test can usually be found in the sample, instrument or comment text.

Some test cases mention that they should stay quiet when played correctly. This does not take different ramping algorithms into account (so there might me a small “pop” at the start of samples or when changing the volume), and it is generally expected that the test cases are rendered at a mix rate of 44100 Hz, as otherwise different calculations of channel playback speed and interpolation settings may cause small but noticable differences in playback.

Bit-exact output is not the goal of this test suite, correct playback is, so slight deviations from Scream Tracker 3’s output (e.g. different resampling algorithms, pop reduction, etc.) are acceptable. Some tests will only sound correct on the first run. Unless stated otherwise, it is not important that the test output sounds identical when looping the module.

Most test cases are documented (more or less) in OpenMPT’s source code with a reference to the filename of the test case. I am sorry that many tests do not have proper descriptions − I have started this documentation years after I have fixed some of these issues and can thus not remember all the details anymore. If you are stuck with one of the tests, you may have a look at specific source code revisions that are provided with most tests to see what was changed in the code to make it work correctly.

Last but not least, please keep in mind that some descriptions might be wrong or too general. Sometimes, the description might be correct in the given test case, but changing the test case slightly might completely invalidate the description of how an effect is supposed to work, for example. If you know better than me, please correct the texts, and please ask me if you need more information one of the test cases. The documentation is not always optimal because the test cases have been written long before I have created this site.

AdlibZeroVolumeNote.s3m

Current status: OpenMPT passes this test since revision 14612.
Download: AdlibZeroVolumeNote.s3m
Description: A peculiar edge case where a note played at volume 0 causes a following note playing at volume 64 to not be heard. This was caused by the note-on bit not being reset before triggering the new note.

FreqLimits.s3m

Current status: OpenMPT passes this test since revision 1134.
Download: FreqLimits.s3m
Description: Scream Tracker 3 stops playback if the period is too low (the frequency is too high). The upper period limit is tested in PeriodLimitUpper.s3m.

LoopReset.s3m

Current status: OpenMPT passes this test since revision 6127.
Download: LoopReset.s3m
Description: Scream Tracker 3 resets the start position of the last pattern loop on every pattern transition. Each time pattern 1 is played, seven notes should be heard.

NOP.s3m

Current status: OpenMPT passes this test since revision 11602.
Download: NOP.s3m
Description: Related to ParamMemory.s3m, even empty effect cells with a non-zero parameter contribute to the effect memory. In this example, a major arpeggio should be heard, as there is a 37 no-op effect on the first row.

NoCombinedSlidesOnFirstTick-Fast.s3m

Current status: OpenMPT passes this test since revision 21826.
Download: NoCombinedSlidesOnFirstTick-Fast.s3m
Description: Combined slide commands Kxy and Lxy do not run on the first tick in Scream Tracker, effectively rendering fine slides with such commands inefficient. This test is with Fast Slides enabled. As most other software supports fine slides with these commands, OpenMPT will only emulate this quirk when opening a file saved with Scream Tracker 3.

NoCombinedSlidesOnFirstTick-Normal.s3m

Current status: OpenMPT passes this test since revision 21826.
Download: NoCombinedSlidesOnFirstTick-Normal.s3m
Description: Combined slide commands Kxy and Lxy do not run on the first tick in Scream Tracker, effectively rendering fine slides with such commands inefficient. This test is with Fast Slides disabled. As most other software supports fine slides with these commands, OpenMPT will only emulate this quirk when opening a file saved with Scream Tracker 3.

OffsetLoopWraparound.s3m

Current status: OpenMPT passes this test since revision 12507.
Download: OffsetLoopWraparound.s3m
Description: Offset commands beyond the loop end do two things in Scream Tracker 3: With a GUS, the playback wraps around to the loop start, but with a SB sample playback is stopped. This test case is for the more useful GUS behaviour. It is possible to identify the sound card last used in Scream Tracker, so this check can be applied conditionally.

OffsetPastSampleEnd.s3m

Current status: OpenMPT passes this test since revision 12761.
Download: OffsetPastSampleEnd.s3m
Description: Offset commands beyond the sample end of non-looped samples should stop sample playback.

OxxMemory.s3m

Current status: OpenMPT passes this test since revision 10915.
Download: OxxMemory.s3m
Description: When Scream Tracker 3 encounters a note without instrument number, it recalls the previous note′s offset. But unlike ProTracker, it does not add up offset values. When played correctly, this module should stay silent.

OxxMemoryWithRetrig.s3m

Current status: OpenMPT passes this test since revision 12762.
Download: OxxMemoryWithRetrig.s3m
Description: Refined version of OxxMemory.s3m which tests the interaction between Oxx and Qxx with and without instrument numbers. The numbers should be heard in the same order as specified in the module title.

ParamMemory.s3m

Current status: OpenMPT passes this test since revision 1053.
Download: ParamMemory.s3m
Description: Scream Tracker 3 uses the last non-zero effect parameter as a memory for most effects: Dxy, Kxy, Lxy, Exx, Fxx, Ixy, Jxy, Qxy, Rxy, Sxy. Other effects may have their own memory or share it with another command (such as Hxy / Uxy).

PatternDelays.s3m

Current status: OpenMPT passes this test since revision 1221.
Download: PatternDelays.s3m
Description: When there are multiple row delays (SEx), only the first one is considered. The tricky part here is that the “first one” might not always be the “leftmost” one, because Scream Tracker 3 first evaluates all “left” channels (whose name starts with L in the pan table), and then all “right” channels (whose name starts with R in the pan table). This test case does not exploit this behaviour, the first row delay is always found on a left channel or there are only row delays on a right channel. I do not really know if it is worth emulating this idiosynchrasy. Note: Scream Tracker 3 does not have tick delay (S6x) commands, but they are tested here for completeness (Impulse Tracker supports them as well, so its playback behaviour is used as a reference).

PatternDelaysRetrig.s3m

Current status: OpenMPT passes this test since revision 1221.
Download: PatternDelaysRetrig.s3m
Description: Rows on which a row delay (SEx) effect is placed have multiple “first ticks”, i.e. you should set your “first tick flag” on every tick that is a multiple of the song speed (or speed + tick delay if you support tick delays in your S3M player). In this test module, the note pitch is changed multiple times per row, depending on the row delay values.
Note: This test case broke in r3520 and was fixed again in r4895.

PeriodLimit.s3m

Current status: OpenMPT passes this test since revision 4796.
Download: PeriodLimit.s3m
Description: Scream Tracker 3 limits the final output period to be at least 64, i.e. when playing a note that is too high or when sliding the period lower than 64, the output period will simply be clamped to 64. However, when reaching a period of 0 through slides, the output on the channel should be stopped. When played correctly, both channels in this module should play identically.

PeriodLimitUpper.s3m

Current status: OpenMPT passes this test since revision 15258.
Download: PeriodLimitUpper.s3m
Description: Scream Tracker 3 limits the channel period to be at most 32767, but when using the GUS driver, the frequency resolution is too low so the test module will sound very different.

PortaAfterArp.s3m

Current status: OpenMPT passes this test since revision 7525.
Download: PortaAfterArp.s3m
Description: A portamento up or portamento down effect immediately following an arpeggio effect should slide from the last arpeggiated note, and not from the channel frequency as it was before the arpeggio. Tone portamento is not affected. When played correctly, both channels in this module should play identically.

PortaSmpChange.s3m

Current status: OpenMPT passes this test since revision 3578.
Download: PortaSmpChange.s3m
Description: If the sample number next to a portamento effect differs from the previous number, the old sample should be kept, but the new sample's default volume should still be applied.

RetrigAfterNoteCut.s3m

Current status: OpenMPT passes this test since revision 12760.
Download: RetrigAfterNoteCut.s3m
Description: Qxy should not retrigger notes after they have been cut with ^^^ or SCx.

RetrigSlide.s3m

Current status: OpenMPT passes this test since revision 16646.
Download: RetrigSlide.s3m
Description: Qxy should not reset the note frequency after a pitch slide.

TonePortamentoWithAdlibNote.s3m

Current status: OpenMPT passes this test since revision 17731.
Download: TonePortamentoWithAdlibNote.s3m
Description: If there is a tone portamento next to an Adlib note, the tone portamento is not executed. If there is no note on the next row, the target note of the tone portamento is instantly heard on the first tick of the next row instead. Note that tone portamento without a note is not affected by this.

In Scream Tracker 3.01, this feature still works as intended. Only Scream Tracker 3.03 and later expose this weird behaviour.

VibratoTypeChange.s3m

Current status: OpenMPT passes this test since revision 6316.
Download: VibratoTypeChange.s3m
Description: Hxx and Uxx use the same effect memory for the vibrato depth. For example, U1F followed by H00 causes the second effect to be played as H1F and vice versa. This also effectively means that Kxx will always plays “normal” vibratos, even if a fine vibrato has previously been used. When played correctly, this module should remain silent.

weirdloop.s3m

Current status: OpenMPT currently fails this test.
Download: weirdloop.s3m
Description: A “broken” pattern loop. The voice should say “1” and then repeat “4 2 1 2”. Interestingly, the playback differs between various versions of Scream Tracker 3.

In total, OpenMPT passes 21 out of 22 tests.