ws-audio2: merge ws/audio2-tracker (MTM, 669, STM, ULT, OKT, MED, PTM, FAR, UMX; Tracker engine families)

This commit is contained in:
4DBug committed 2026-10-31 15:19:31 -05:00
commit 270eccab0f
43 files changed
+4907 -65

No files matched your search

+26
View File
@@ -1211,3 +1211,29 @@ do
end
end
end
-- ws-audio2: trackers
do
-- the other tracker loaders on the shared engine: a 669 (Hz periods, auto slides) and an MMD1 (hold / decay
-- envelopes, instruments) from tools/fixtures/{669,med}.py, decoded and rendered at 44.1 kHz
local Six69 = require("@formats/music/669")
local Med = require("@formats/music/med")
local songs = { { Six69, require("@tests/gen/669_cases")[1].data }, { Med, require("@tests/gen/med_cases")[2].data } }
local best, frames = math.huge, 0
local out = buffer.create(4096 * 8)
for _ = 1, 3 do
frames = 0
local t0 = os.clock()
for _, s in songs do
local dec = (s[1].decode(Bytes.reader(buffer.fromstring(s[2]))) :: any):render()
while true do
local _, n = dec:read(4096, out)
if n == 0 then
break
end
frames += n
end
end
best = math.min(best, os.clock() - t0)
end
print(string.format("%-8s %-30s %8.2f ms %7.1f x realtime", runtime, "render 669 / med", best * 1000, frames / 44100 / best))
end