ws-audio2: music/ptm (PolyTracker): it family, MOD letters with S3M fine slides, note slides, delta 8 / 16-bit samples; engine flags.panLaw = ft2 (square-root panning)
ops/MusicOps: accept modules of the other tracker formats by their engine family (Tracker.family), a one-line backward-compatible change.
This commit is contained in:
1 parent
48b4b4cc4e
commit
60544a3a77
9 files changed
+409
-4
No files matched your search
@@ -0,0 +1,19 @@
|
||||
-- music/ptm tests: generated PolyTracker modules (tools/fixtures/ptm.py) parsed, rendered through codecs/audio/Tracker
|
||||
-- and compared with openmpt123's render (loudness envelope, band spectrum, stereo balance, song length), the contract,
|
||||
-- and the fuzz no-throw pass.
|
||||
local T = require("@tests/T")
|
||||
local S = require("@tests/music/_similar")
|
||||
local Ptm = require("@formats/music/ptm")
|
||||
local Cases = require("@tests/gen/ptm_cases")
|
||||
|
||||
local t = T.suite("ptm")
|
||||
|
||||
t:eq(Ptm.name, "ptm", "name")
|
||||
t:eq(Ptm.category, "music", "category")
|
||||
t:check(Ptm.caps.decode and not Ptm.caps.encode, "caps")
|
||||
|
||||
local mods = S.against(t, Ptm, Cases, { gainDb = 0.5, envErr = 1.0, spectral = 0.95, balance = 0.04, duration = 0.01 }, "it")
|
||||
t:check(mods[1] and mods[1].samples[3].bits == 16 and mods[1].samples[3].loopType == 2, "16-bit ping-pong loop")
|
||||
|
||||
t:fuzz("decode", S.fuzzer(Ptm), S.samples(Cases), { mutations = 30 })
|
||||
t:done()
|
||||
Reference in new issue
Block a user