xm-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: 21 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

XM archive verification

The corpus manifest pins the ten highest-ranked XM files from The Mod Archive's Most Downloaded chart on 2026-11-28. The suite manifest pins all 81 published OpenMPT XM fixtures. Both manifests record source URLs and file checksums. The modules and their renders stay local.

Native FastTracker 2 results

Each of the ten chart modules reaches EOF at 44.1 and 48 kHz. The 81 OpenMPT fixtures run to EOF or to the eight-second limit. Every case produces an identical trace and PCM with 113- and 1024-frame reads. In FastTracker 2 WAV mode, all 182 file/rate pairs match the pinned clone on tick positions, frames, instrument, sample slot, native period and pre-envelope volume. The PCM matches in length and stays within two signed 16-bit counts of the reference.

DEADLOCK.XM is the chart's number one track. It renders to 11,427,240 frames at 44.1 kHz and 12,443,640 frames at 48 kHz across 14,520 ticks. OpenMPT matches all 4,704 row anchors at both rates.

OpenMPT is a separate cross-check. Its row positions and frames agree in 17 of 20 chart comparisons and 141 of 162 suite comparisons. Its PCM passes the shared window bounds in 24 suite comparisons. The chart comparisons all exceed those bounds. OpenMPT picks replay behavior from the file's tracker metadata and uses its own mixer. See the reference settings.

Playback profile

The native scope is FastTracker 2 XM 1.04 with mono 8- and 16-bit PCM, linear or Amiga periods, note maps, sample finetune and relative notes, forward and bidirectional loops, and volume and pan envelopes with sustain, loop, key-off and fadeout. Instruments also support automatic vibrato. Replay supports per-song restart, finite additional plays, and the native WAV clock and pitch quantization through xm.NewReplayWithOptions.

Control Native XM commands or fixtures
Pitch and modulation 0-7, E1-E5, E7, X1 and X2. ArpeggioClamp, Glissando, VibratoDouble, TremoloVibrato
Volume and pan 8, A, C, EA, EB, G, H, P, and T. GlobalVolume, PanSlideMem, TremorRecover
Sample and note timing 9, E9, EC, ED, K, and R. OffsetRange, E90, delaycut, OffDelay, RetrigTick0
Song flow B, D, E6, EE, and F. PatLoop-Break, PatLoop-Overflow, PatternDelays, offline restart and F00 tests
Instrument and sample behavior L, note-off, sample selection and loops. SetEnvPos, PanSustainRelease, FadeoutPickup, AutoVibratoSweepKeyOff, BidiPrecision
Volume column Volume, regular and fine volume slides, vibrato speed and depth, pan and pan slides, tone portamento. VolColDelay, PanSlideZero, TonePortamentoMemory

Reserved effect letters retain FastTracker 2's no-op behavior. The compatibility measurements use linear interpolation, no volume ramping, no dither, and the clone's WAV clock. BeatGlow's usual tracker clock remains available through xm.NewReplay. OpenMPT extensions and playback profiles for other XM versions are outside this profile.

Phase 7 baseline results

These measurements capture the scope at the end of Phase 7, before the end-to-end playback checkpoint.

All ten files parsed as XM 1.04. At both rates, 113- and 1024-frame reads produced identical PCM and trace data. The 7,810 comparable ticks per rate match the FastTracker 2 clone in order, row, tick, normalized output frame, instrument, sample slot, native period and pre-envelope volume. Libxmp agrees on all comparable tick positions and normalized output frames. OpenMPT visits the same rows. The captured PCM retains each reference's actual clock and mixer output.

The first quarter-second window outside the PCM bounds is shown in seconds at 44.1 / 48 kHz. The fixed bounds are 0.025 RMS, 0.30 absolute peak and 0.94 correlation for audible windows. Command locations give zero-based order, pattern and row followed by one-based channel.

Rank and title Ticks per rate FastTracker 2 PCM First deferred command and location
1. DEADLOCK.XM 0 No playable PCM 830 panning, 0/58/0/12
2. BUTTERFL.XM 95 0.250 / 0.500 ED3 note delay, 0/0/19/3
3. external.xm 12 Within bounds 850 panning, 0/2/2/2
4. sweetdre.xm 3 0.000 / 0.000 Volume column 92 fine slide up, 0/6/1/2
5. squired.xm 0 No playable PCM Volume column CC panning, 0/4/0/9
6. dreams.xm 0 No playable PCM 810 panning, 0/5/0/3
7. sr_sergio_-_trance_e9.xm 768 0.000 / 0.000 850 panning, 2/3/0/10
8. jwph_dxfl_decade-spacesynth.xm 780 0.000 / 0.000 E93 retrigger, 2/2/2/6
9. radix_-_yuki_satellites.xm 6152 0.750 / 0.750 EC2 delayed note cut, 24/33/2/1
10. age.xm 0 No playable PCM G40 global volume, 0/0/0/1

All six audible prefixes exceeded the bounds against libxmp and OpenMPT. The first OpenMPT failure is at 4.000 seconds for rank 8 and 0.000 seconds for the other audible titles at both rates. The largest recorded-frame drift against the clone was 727 frames at 44.1 kHz and 687 at 48 kHz. Differences can include mixer behavior, timing and deferred instrument behavior such as pan envelopes and automatic vibrato. Every song reaches a deferred command. Full-song and sample-exact compatibility remain open.

Validation suite and offline fixtures

The following results are from the original Phase 7 checkpoint and cover the first seven entries in the suite manifest. Every comparable FastTracker 2 tick and instrument, sample slot, period and volume register matched at both rates.

Validation fixture Ticks per rate Outcome
NoteOffFadeNoEnv 54 Plain note-off matches. The prefix ends at deferred note delay.
OffsetRange 18 Register trace and EOF match. The first PCM window exceeds peak tolerance.
OffsetWithoutNote 84 Both OpenMPT renders pass. FastTracker 2 exceeds the bounds in one 48 kHz window.
Porta-Pickup 84 Target memory survives instrument selection. PCM exceeds bounds.
TonePortamentoMemory 84 The volume and effect columns share memory. The prefix ends at deferred combined effect 500.
pathead 96 The nonstandard pattern-header length loads and reaches EOF. PCM exceeds bounds.
porta-offset 192 Portamento ignores the offset command. FastTracker 2 PCM passes at 48 kHz. Both independent renders finish 96 frames earlier at 44.1 kHz.

The original offline fixtures check 8- and 16-bit delta PCM, keymap selection, malformed input, loop rendering, sample panning, sustained release and EOF. The FastTracker 2 calibration at both rates uses RMS, peak and correlation bounds of 0.002, 0.006 and 0.9999. With native WAV timing enabled, the same fixture permits a peak error of one signed 16-bit PCM count. The Phase 6A effect matrix lists the supported controls. The focused trace covers speed and tempo changes, pitch slides, tone portamento and shared memory, volume set and slide, sample offset memory, and a combined jump and pattern break.

The warmed two-voice benchmark on Apple Silicon measured 31 B/op and 1 allocation per 256-frame block, and 118 B/op and 3 allocations per 960-frame block. It still exceeds the zero-allocation target.

Reproduce and listen

Capture instructions pin the three replay engines and their mixer settings. Use the archive ID as the input filename.

CGO_ENABLED=0 go run ./internal/test/tracker/xm-verification \
    -corpus "$corpus" -ft2 "$ft2" -openmpt "$mpt" \
    -ft2-wav-timing -require-ft2-parity
CGO_ENABLED=0 go run ./internal/test/tracker/xm-verification \
    -suite "$suite" -ft2 "$suite_ft2" -openmpt "$suite_mpt" \
    -ft2-wav-timing -require-ft2-parity
CGO_ENABLED=0 go test ./internal/test/tracker/xm-verification
CGO_ENABLED=0 go test ./internal/test/tracker/xm-verification -run '^$' -bench BenchmarkWarmedXM -benchmem
CGO_ENABLED=0 go run ./internal/test/tracker/xm-verification -demo-out "$out"

The demo renders an original six-second XM arrangement of the traditional melody Korobeiniki with overlapping keymapped 8- and 16-bit PCM voices, sustained volume envelopes and release, and the baseline XM effects. It saves each WAV after comparing the two read sizes byte for byte.

Documentation

Overview

Command xm-verification audits the pinned Mod Archive XM corpus.

Jump to

Keyboard shortcuts

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