ws-audio2: docs/guide/music.md: the other tracker formats (table rows, Module.engine, More tracker formats with tested snippets; docs_av inputs mtm / med / umx); bench: render 669 / med

This commit is contained in:
4DBug committed 2026-10-31 14:58:37 -05:00
1 parent 26fa887370
commit 0a7b74ec49
3 files changed
+87 -5

No files matched your search

+12 -3
View File
@@ -1,12 +1,13 @@
# Docs inputs for the audio / music / video / subtitle guide pages (tools/fixtures.py; tools/docs_check.py reads them):
# tiny ffmpeg test clips (testsrc 64x48, 10 frames at 10 fps, with a sine track): MP4 (H.264 + AAC), AVI (MJPEG +
# PCM), WebM (VP8 + Vorbis); a MIDI file written here (SMF 1: a tempo track and a melody), the SoundFont of
# tools/fixtures/sf2.py (build_sf2), a ProTracker module from tools/fixtures/mod.py (song_basic), and SRT / WebVTT /
# ASS subtitles.
# tools/fixtures/sf2.py (build_sf2), a ProTracker module from tools/fixtures/mod.py (song_basic), MultiTracker / MED
# modules and an Unreal package (tools/fixtures/mtm.py, med.py, s3m.py), and SRT / WebVTT / ASS subtitles.
# tests/gen/docs_av.luau { files = { [name] = bytes }, vars = { mp4Bytes = "clip.mp4", ... } }
import importlib.util, os, struct, tempfile
INPUTS = ["tools/docs_check.py", "tools/fixtures/sf2.py", "tools/fixtures/mod.py"]
INPUTS = ["tools/docs_check.py", "tools/fixtures/sf2.py", "tools/fixtures/mod.py", "tools/fixtures/mtm.py",
"tools/fixtures/med.py", "tools/fixtures/s3m.py", "tools/fixtures/_tracker.py"]
def load(ctx, name):
@@ -100,6 +101,11 @@ def generate(ctx):
files["bank.sf2"] = sf2.build_sf2(False)[0]
mod = load(ctx, "fixtures/mod")
files["song.mod"] = mod.song_basic()
# ws-audio2: more tracker formats (tools/fixtures/mtm.py, med.py; an Unreal package around an S3M)
files["song.mtm"] = load(ctx, "fixtures/mtm").song_effects()
files["song.med"] = load(ctx, "fixtures/med").song_basic(version=1)
tracker = load(ctx, "fixtures/_tracker")
files["music.umx"] = tracker.write_umx([("Theme", load(ctx, "fixtures/s3m").song_mono())])
files["subs.srt"] = SRT
files["subs.vtt"] = VTT
files["subs.ass"] = ASS
@@ -110,6 +116,9 @@ def generate(ctx):
"midiBytes": "tune.mid",
"sf2Bytes": "bank.sf2",
"modBytes": "song.mod",
"mtmBytes": "song.mtm",
"medBytes": "song.med",
"umxBytes": "music.umx",
"srtText": "subs.srt",
"vttText": "subs.vtt",
"assText": "subs.ass",