s3m-verification

command
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

S3M playback verification

The chart manifest records the first ten S3M entries in The Mod Archive's Most Downloaded chart on 2026-11-28. The fixture manifest pins the S3M cases published by OpenMPT. Download the inputs to a scratch directory and check their SHA-256 hashes against the manifests. Save chart modules as <archive_id>.s3m and fixtures under their original filenames.

Reference captures

Use st3play at commit c29e95de164a089e62b7c74c0214e302c7a5c1e7. The headless runner uses the port's SB Pro and GUS mixers, their hardware clocks and the stock CLI's default mixing gain of 256. It writes interleaved signed 16-bit little-endian PCM and a CSV of tick starts with order, pattern, row and speed. Chart captures allow up to 600 seconds and fixture captures allow up to 45 seconds. The native runner stops on the first order terminator or repeated order entry after allowing internal pattern loops.

clang -O2 -DNDEBUG -DAUDIODRIVER_SDL -include stddef.h -I"$st3play" \
  internal/test/tracker/s3m-verification/reference/render-st3play.c \
  "$st3play"/*.c "$st3play"/mixer/*.c "$st3play"/opl2/*.c \
  -lm -o "$scratch/render-st3play"
"$scratch/render-st3play" 48000 600 gus "$corpus/212083.s3m" \
  "$scratch/212083-48000.csv" "$scratch/212083-48000.raw"

OpenMPT 0.8.10+r25841.pkg provides an independent PCM and row trace. Use the OpenMPT runner in the MOD verification directory. The batch command uses linear interpolation and 0 mB gain with that runner.

clang -O2 internal/test/tracker/mod-verification/reference/render-openmpt.c \
  $(pkg-config --cflags --libs libopenmpt) -o "$scratch/render-openmpt"
python3 internal/test/tracker/s3m-verification/reference/capture.py \
  --corpus "$corpus" --fixtures "$fixtures" --output "$captures" \
  --st3play "$scratch/render-st3play" --openmpt "$scratch/render-openmpt"

Rank-one preview

The demo renders a 20-second excerpt of UnreaL ][ / PM from 55.614 seconds. It uses the GUS mixer and clock, a mix gain of 0.65 and 10 ms fades at the excerpt boundaries. The command checks that read sizes of 113 and 1024 frames produce byte-identical WAVs for each rate.

CGO_ENABLED=0 go run ./internal/test/tracker/s3m-verification \
  -corpus "$corpus" -demo "$scratch/preview" -fixtures "$fixtures" \
  -opl-fixture "$fixtures/AdlibZeroVolumeNote.s3m"

The replay matched all 21,052 tick positions of this track at 44.1 and 48 kHz under both native clocks. The preview has zero clipped samples at either rate. The native GUS capture hit full scale on 446 samples in the same 48 kHz excerpt at the stock gain.

The companion excerpt uses OpenMPT's AdlibZeroVolumeNote.s3m fixture. Its 4-second WAV differs from the native GUS capture by 0.59 signed 16-bit counts RMS at each rate. Both read sizes produce the same WAV. The offline mixed PCM and AdLib test checks sample playback alongside AdLib key-on, zero volume, a pitch change and key-off.

The two additional companion WAVs play the instrument changes and key-off in TonePortamentoWithAdlibNote, and the AdLib and PCM combination in RetrigSlide. All four excerpts render at both rates through the same replay.

Full corpus audit

Save native and OpenMPT captures in separate sbpro, gus and openmpt directories. Use <archive_id>-<rate>.csv and .raw for songs, and add 1000 to the fixture manifest ID for fixture captures. Run the following command.

CGO_ENABLED=0 go run ./internal/test/tracker/s3m-verification \
  -corpus "$corpus" -fixtures "$fixtures" -references "$captures"

The audit checks first-pass duration, exact native ticks, and identical PCM and ticks across read sizes of 113 and 1024 frames. It reports waveform error and correlation against both references, plus OpenMPT row and frame drift. The native PCM gate uses the established Phase 6A limits in each quarter- second window. It allows RMS error up to 0.025, peak error up to 0.30 and correlation down to 0.94 when the reference RMS is at least 0.01. OpenMPT uses a different clock, interpolation and mixer. Its absolute PCM and row drift are reported independently of the native pass criteria. The comparison results cover all ranked tracks and fixtures.

Native effect matrix

NewReplayWithClock selects the Scream Tracker 3.21 Sound Blaster Pro or Gravis Ultrasound clock and mixer. NewReplay preserves the continuous tempo and the existing PCM interpretation for authored and extended modules. The native mixers use the 8-bit mono sample representation, even when an extension advertises stereo or 16-bit samples. The pinned tracker supports nine melodic AdLib channels and leaves the reserved AdLib percussion types inactive.

Commands and behavior Replay evidence
A, T, B, C. Speed, tempo, skips, breaks and first-pass restart Ranked corpus under both clocks. Deep in her Eyes and Satellite one exercise order restart.
D, E, F. Regular, fine and extra-fine slides, minimum and maximum periods ParamMemory, PeriodLimit, PeriodLimitUpper and FreqLimits.
G, K, L. Tone portamento and combined volume slides with tick-zero rules PortaAfterArp, PortaSmpChange and the two NoCombinedSlidesOnFirstTick cases.
H, U, R. Vibrato, fine vibrato and tremolo VibratoTypeChange, ParamMemory and the ranked corpus.
I, J, V. Tremor, arpeggio and global volume ParamMemory, PortaAfterArp, Catch that goblin!! and Celestial Fantasia.
O, Q. Sample offsets, offset memory, retrigger gain and loop rollover OffsetLoopWraparound, OffsetPastSampleEnd, OxxMemory, OxxMemoryWithRetrig and RetrigSlide.
S1, S2, S3, S4. Glissando, finetune and modulation waveform S1 follows the pinned pitch quantizer. The offline finetune test checks that S2 affects the next note. VibratoTypeChange covers waveform changes.
S8, SA. GUS balance and SB Pro stereo output selection Point of Departure and the native driver pan test.
SB, SC, SD, SE. Pattern loop, cut, delayed note and row delay LoopReset, PatternDelays, PatternDelaysRetrig, RetrigAfterNoteCut and UnreaL ][ / PM.
Shared effect parameters and reserved commands ParamMemory and NOP. The pinned port ignores its legacy S0 filter and the reserved M, N, P, W, X and Y commands. Z updates a tracker variable without changing playback.
AdLib patch, register gain, key and pitch state AdlibZeroVolumeNote, TonePortamentoWithAdlibNote and the offline mixed PCM and AdLib test.
Sample layout, one-shot and loops, including malformed input Offline native module parser tests, weirdloop and the offset suite.

The shared tracker.Player provides PCM reads, seeking, restart and buffer size advice for both hardware modes. The native bus is mixed alongside the register-driven synth.OPL2 voice. The SB Pro, GUS and OPL2 signal paths share the same resampling kernel from the pinned port.

The earlier synthesis, PCM instruments, envelopes, FM, tracker authoring and effects demos remain runnable under internal/test/synth/ and internal/test/tracker/. The offline module-replay command includes the four native-format passages and the recognisable Korobeiniki score with its FM lead and PCM percussion. The S3M previews use the same public replay entry points as that command.

Documentation

Overview

Command s3m-verification renders playback from the pinned S3M corpus.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL