POP BOLL

6.0 · DRAFT

XMLX 6.0: the Pop Snip MIDI stem pack

Version6.0, draft 3 (2026-11-13). The canonical home of the format, P32-52 of Pop Boll 0.3.3 "Rocking Roll". It replaces the handover draft docs/handover/0.3.2/xmlx/XMLX_6_SPEC_DRAFT.md (draft 0, B! 0.3.2, 2026-11-11)
FilesXMLX.md (this text), xmlx-6.xsd (the grammar), xmlx-6.sch (the rules between fields), fixtures/ (good packs, bad manifests, and the script that builds them)
Owner's briefRewrite XMLX "from the ground up so we bundle it in our MIDI stem packs, and be able to export THAT, which encodes all the cool sidecar data from pxs AND the MIDI stems/sync details/local paths … a purely midi output format … mainly, it should be a way to intelligently transform lanes of MIDI-only sniplets into the right number of perfectly synced MIDI stems, and all that information in XML." Then: "the sidecar file for pxs should probably ALSO be XMLX format."
RulingsAll ten are ruled (§11): XQ1 and XQ3 on 2026-11-11; XQ2 and XQ4–XQ10 on 2026-11-13. XQ5 put the namespace and the spec's home on xmlx.app, and the rest are at their recommended defaults
Companionsdocs/PXS.md (.pxs 1.1: the chunk registry, privacy, the station profile), docs/handover/0.3.2/PS32_PLAN_DRAFT.md §10.8 and P32-52–P32-60
Homexmlx.app/ns/6, which redirects to popboll.com/xmlx (XQ5)
LicenceThis text CC BY 4.0; the reference validator and writer Apache-2.0 (XQ9)

Words. Must, never and only are normative. A pack is a manifest plus its files. A manifest is the XML file. A writer makes packs and a reader uses them. A validator decides whether a pack is valid. A tick is a MIDI tick at the pack's PPQ.

1. What XMLX 6.0 is#

An XMLX pack is a folder of perfectly synced Standard MIDI Files, one per stem, plus one XML manifest that says everything else:

  • the tempo map and the song's parts;
  • which sound each stem wants: a SoundFont by hash and local path, with a bank and a program;
  • where every stem came from: sniplets on Sniplane lanes, a band's musicians, or a transcription;
  • how it was made: tools, libraries and models, disclosed (§7a);
  • everything .pxs's Pop Boll block carries: credits, licences, provenance, judging, cues, talk, sniplets and the rest.

It contains no audio and refers to none.

Three uses, one format:

UseShapeNote
Stem pack from the station (Pompas / Pop Snip) or a band songA folder, or the same tree zipped (XQ2): song.xmlx + stems/*.mid + full.midThe main use
Sidecar of a .pxs or .it ("Pop XMLX Snip")<module filename>.xmlx beside the module, bound by the module's sha256 (<Bind>). Stems are optionalRuled (XQ3, A12): the only .pxs sidecar. There is no .pxsx
Morpus companion (later; XQ8)<slug>.xmlx beside a morpus track's <slug>.mid and <slug>.mdP32-58, a placeholder

2. The pack#

Worst Mouse Trap - PILL.xmlx/            a folder, or the same tree zipped as <title>.xmlx.zip (XQ2)
  song.xmlx                              the manifest
  stems/
    01-lead.mid                          one SMF per stem: stems/<stem id>.mid
    03-bass.mid
    10-drums.mid
  full.mid                               every stem in one SMF (type 1); included by default (XQ4)
  art.png                                optional cover still (<Art>)

Paths (normative):

  • A stem path is stems/<stem id>.mid: relative to the manifest, with /, inside the pack, ASCII, and at most 120 bytes. The grammar fixes its shape, and XS04 ties it to the stem's id.
  • Font paths (§6) may point outside the pack (../soundfonts/…), because SoundFonts live in a person's own library. A font is found by sha256 first and by path second.
  • Privacy. A manifest that leaves the device (download, locker, share) has <Head scope="share"> and carries no absolute path (XS19): /Users/<name>/… would leak an account name. Absolute paths appear only in a manifest marked scope="local", which a writer never sends anywhere. This follows .pxs §6.
  • A sidecar is named <module filename>.xmlx (for example Worst Mouse Trap - PILL.it.xmlx), sits beside the module, and names it in <Bind module>, without a folder.
  • Zip form (XQ2: both forms). The pack's tree at the zip root, song.xmlx first and stored (not deflated), then every other entry in byte order of its path. Every entry is dated 1980-01-01 00:00:00, with no extra fields and no comments. A zipped pack downloads as <title>.xmlx.zip.
  • Only named files. A pack holds the files its manifest names (stems, full.mid, art.png, bundled fonts) and an optional lyrics.lrc, and nothing else: no audio, no stray files, no links, no nested archives.
  • Caps: manifest ≤ 2 MiB (what the Amorphus Worker parses with room inside its isolate); ≤ 64 stems; each .mid ≤ 4 MiB; the whole pack ≤ 32 MiB (Amorphus's module cap, so lockers can take it).

3. Sync: the guarantees every stem file keeps (normative)#

These make N separate .mid files line up exactly when they're dropped into any DAW or player:

  1. Format. Every stem file is SMF type 1 with the same PPQ (<Time ppq>, 480 by default; a metrical division, never SMPTE).
  2. Conductor. Track 0 is the conductor. It holds:
    • the sequence name (FF 03, the song's title);
    • tempo (FF 51), time signature (FF 58) and key signature (FF 59);
    • one part marker (FF 06) per <Part>, at that part's tick;
    • no channel events.

It is byte-identical in every stem file and in full.mid. <Time conductorSha256> is the sha256 of the conductor's whole MTrk chunk: the 8 bytes of chunk id and length, then the events.

  1. Notes. Track 1 holds the stem's events on its declared channel. Its track name (FF 03) is the stem's name, and its instrument name (FF 04) is its sound's preset. Drums are on channel 10.
  2. Start. Everything starts at tick 0. Leading silence is kept, never trimmed. There is no SMPTE offset (FF 54).
  3. End. Every file's End of Track (FF 2F) sits at exactly <Time lengthTicks>: the song's length rounded up to a whole bar (XS14), so release tails don't leave files of different lengths.
  4. Bank and program. Bank select (CC0 then CC32) and the program change sit at tick 0, before the first note, and match <Stem bank program>.
  5. Pairing. Notes pair FIFO, and a velocity-0 note-on is a note-off. Writers put note-offs before note-ons at the same tick, and no note is open at End of Track. These are dj/stems.py's pairing rules, written out.

A pack plays as a song when every stem file plays at once from tick 0, or when full.mid plays.

full.mid is the conductor followed by every stem's track 1, in stem order, byte for byte. Each stem's events are on its own channel. Past 16 channels, stems spread across MIDI ports: Stem@port, with an FF 21 port prefix (port − 1) in that stem's track 1, in its own file and in full.mid alike. A stem with port 1 carries no FF 21. A pack whose stems are all on port 1 has FullMidi@ports 1. No two stems share a channel on one port (XS38).

4. From Sniplane lanes to stems ("the right number of perfectly synced MIDI stems")#

The station's arrangement is lanes of MIDI-only sniplets (PS32_PLAN_DRAFT.md §10.5). A writer runs five steps:

  1. Flatten. Every placed sniplet becomes absolute notes. The flattening applies:
    • its fit (loop, one-shot or cut) and its repeats;
    • transposition and the owning default velocity;
    • p-locks, rendered to CC where MIDI can say them.

Off-grid hold-release launches keep their exact tick.

  1. Group by sound. Lanes playing the same instrument (the same synth patch, or the same font + bank + program) merge into one stem. If a merge would put two notes of the same pitch on top of each other, the stem splits into …-a and …-b instead of losing notes.
  2. Choose the policy (<Stems policy>; the default is ruled by XQ7):
    • by-instrument (default): one stem per sound, as above;
    • by-role: one stem per band role, or per audio-stem category of a transcription (the Role vocabulary, §5);
    • by-lane: one stem per Sniplane lane, untouched;
    • by-channel: at most 16, a GM-ready split;
    • drums: one stem per kit by default (drumSplit="kit"). drumSplit="classes" splits by snipdrum's 16 classes (kick, snare, hats, …).
  3. Assign channels and ports. Each stem keeps a channel, with drums on 10, and a port (§3). A station stem is drums (role drums, channel 10, XS06) exactly when its sound is a kit by .pxs §13.3.7's one definition: its instrument's kit flag, else a drum patch, else every sample its key map names from a bank-128 preset or snipdrum (reference tools/pxs_station.py is_kit). So the pack's drums, the station's pads, Roll and the derived MIDI's channel 10 always agree.
  4. Report. Empty stems are dropped (XS10). The counts, merges and splits are written into <Stems report>, so "the right number" is visible and repeatable.

Round trip (normative for Pop Snip). Each stem lists its source placements (<Sources>): sniplet id, lane, position, repeats, fit and transpose. The station can rebuild the Sniplane from the pack alone. The reference reader (xmlx.read, P32-57) gives back one lane per stem. A pack written with no merges and no splits (every by-lane pack, and any pack whose stems are one lane each) is then rebuilt byte for byte. A stem that merged lanes comes back as one lane with exactly its notes, and the station rebuilds the lanes behind it from the placements' sniplets. Byte for byte holds for packs xmlx.write wrote. A pack from another writer keeps its stem ids and indexes (so Lyrics@stem still names its stem), its stem files and full.mid. A pack written without lyrics.lrc (lrc=False) reads back with lrc false, and writes back without it. Two things in song.xmlx are the writer's own: Stems@report is rewritten, and the derived forms the pack left out (§7c) are filled in: a placement's bar, beat and ms, and a lyrics line or syllable's, with the tick of a line placed by its bar alone. Ids are kept only when every stem is still one lane, unsplit, with well-formed, unique ids in stem order. Otherwise every stem is numbered afresh, from 01.

5. The manifest#

One namespace per major version: https://xmlx.app/ns/6 (XQ5). The URI resolves: xmlx.app redirects to popboll.com/xmlx, which serves this spec, and /ns/6 serves a short namespace document that links it, the XSD and the Schematron. The root is <XMLX version="6.0">. Elements appear in the order below (the grammar fixes it), each at most once unless it says otherwise.

#ElementRequiredWhat it holds
1HeadyesThe song's identity and the manifest's scope
2BindsidecarsThe bound module's file name and sha256
3TimeyesPPQ, length, duration, the conductor's hash; Tempo+, Meter+, Key*
4PartsnoPart+: the song's sections
5FontsnoFont+: SoundFonts by hash, path and licence (§6)
6StemspacksStem+, 1–64 (§4)
7FullMidinofull.mid by hash (XQ4: a writer includes it by default)
8 onwardthe Pop Boll blockDisclosure yesOne element per .pxs chunk, in .pxs 1.1 order (§7)

Example (the band fixture, shortened; fixtures/good/band-pack/song.xmlx is the full file):

<?xml version="1.0" encoding="UTF-8"?>
<XMLX xmlns="https://xmlx.app/ns/6" version="6.0">
  <Head ref="K7QF4ZR2MXW6PJ3N5TBY2HCA7D" title="Worst Mouse Trap" created="2026-11-11" generator="bollawax/0.3.3" engine="ralph-factory/0.3.3" scope="share"/>
  <Time ppq="480" lengthTicks="15360" lengthBeats="32" durationMs="17832" conductorSha256="b753…052f">
    <Tempo tick="0" usPerBeat="557259" bpm="107.67"/>
    <Meter tick="0" num="4" den="4"/>
    <Key tick="0" tonic="C" mode="harmonic-minor"/>
  </Time>
  <Parts>
    <Part index="1" label="Verse 1" category="verse" tick="0" bar="1" beat="1" ms="0" bars="4"/>
    <Part index="2" label="Chorus" category="chorus" tick="7680" bar="5" beat="1" ms="8916" bars="4" leitmotif="true"/>
  </Parts>
  <Fonts>
    <Font id="f1" name="GeneralUser GS" format="sf2" sha256="ad1d…ccce" path="../soundfonts/GeneralUser-GS.sf2" licence="generaluser-gs" redistributable="true"/>
  </Fonts>
  <Stems policy="by-instrument" count="3" report="3 stems: 3 instruments; merged 0; split 0">
    <Stem index="3" id="03-bass" name="BASS" role="bass" colour="#ffa05c" file="stems/03-bass.mid" sha256="7342…fbb6" channel="3" program="33" notes="16" firstTick="0" lastTick="15300">
      <Sound font="f1" bank="0" program="33" preset="Fingered Bass"/>
      <From kind="band"/>
    </Stem>
  </Stems>
  <FullMidi file="full.mid" sha256="a92f…7bb0"/>
  <Disclosure known="full" ml="false" genai="false">
    <Tool name="ralph_factory" kind="software" version="0.3.3" licence="LicenseRef-PopBoll" role="composition" ml="false" genai="false" ran="device"/>
    <Short>Composed by rules, without a model. No machine learning was used.</Short>
  </Disclosure>
  <Licences>
    <Work id="w1" scope="composition" holder="Pop Boll band" licence="CC-BY-4.0" extent="to the extent rights exist"/>
  </Licences>
</XMLX>

5.1 Head#

AttributeRule
refThe opaque song reference of .pxs §6 / §13.2: 26 lower-case base32 characters (a–z, 2–7), whatever the song's origin, copied from the .pxs byte for byte. An HMAC for band songs; random per project (and per fork) for a person's songs
titleThe song's title
createdThe song's date or date-time, never the export's
generator, enginename/semver technical ids: the program that wrote the pack, and the engine that made or played the song
originband (default) or person, as .pxs HEAD.origin
truthmidi (default) or patterns, as .pxs HEAD.truth (§13.2). In a pack, the stems are always MIDI. truth says what the song's source of truth is
scopeRequired. share (may leave the device: no absolute paths) or local (never sent anywhere)
publicfalse by default. songId appears only when it is true and the song is a band's (XS22)
songIdThe band song's id, only for a public device (.pxs §6)
droppedThe names of elements dropped under the size budget (§7), never a P0 element (XS36)

5.2 Bind (sidecars only)#

module is the module's file name beside the manifest (.it or .pxs). moduleSha256 is the sha256 of the module file's bytes as they lie beside the manifest. A sidecar whose moduleSha256 doesn't match the module beside it is ignored (the old .pxsx rule). A reader treats it as absent, and a validator reports bind_mismatch. A manifest without Bind is a pack and has at least one stem (XS17).

Sidecars in practice (P32-56).

  • The download. A tracker download is a zip of the song as a classic .it (the .pxs without its block) and its sidecar, <name>.it.xmlx. A .pxs may also travel with a sidecar beside it.
    • The zip is deterministic: the module first, then the sidecar, both stored and dated 1980-01-01.
    • It is a download bundle, not an XMLX pack zip: check_zip refuses it, since it has no song.xmlx. Check its sidecar with check_path or load_sidecar.
  • What the sidecar carries. Its Time comes from the song, and its Head@ref, public and songId are the .pxs HEAD's. HEAD's engine, the bare Bollawax version the tracker writes (0.3.2), becomes Head@engine="bollawax/0.3.2"; a value that isn't a version is left out and reported. It carries the chunks of the block that a shared file may carry (xmlx.block.SHAREABLE), exactly as §7 maps them: DSCL, LICN, SRCE, CRED, PTCH, PALT, CUES, LINE, LYRC, PROJ, SYNT, SMPL, AUTO, KMAP, SNIP, STRY, INVT and LOOP. A reader that stores shared files (a locker) refuses a manifest whose block carries any other chunk: xmlx.block.unshareable(root) lists them, and fixtures/shareable/ holds its vectors.
  • The module's name. In a download, the module (and so Bind@module) is named by the song's title only, as the tracker names a title-only file (ASCII, at most 76 characters, no leading dot), never by the PILL name or band the tracker's file name ends with; a title the deny-list refuses becomes song. The zip keeps the tracker's file name.
  • What a module plus its sidecar does not carry. The writer's report lists each of these:
    • the .pxs §5.3 telemetry (JUDG, SEED, ENGA, VOTE, FACT, STUD) and TALK, whatever the caller passes, so per-person data stays in the .pxs;
    • any chunk XMLX doesn't know (unregistered or private), and any chunk §7 refuses (binary, duplicated, a key twice);
    • MIDI: the module holds the music, and a sidecar has no stems;
    • ART_: a sidecar has no art.png;
    • SIGN: it signs the .pxs bytes;
    • HEAD's fields <Head> has no place for (bpm, rows_per_beat, speed, duration_s, form, module_sha256, chunks_dropped and the like).

Keep the .pxs for those.

  • Reading one. A reader loads a sidecar only when it is valid and binds the module beside it by name and by sha256. xmlx.load_sidecar reads it once, parses it with the guarded parser, never lists the folder (a sidecar's folder is a person's library), and returns nothing otherwise. An edited module, or a renamed pair, leaves the sidecar ignored.

5.3 Time#

Time repeats in XML exactly what every conductor says, so a reader can sync without opening a .mid, and a validator checks that the two agree.

  • ppq, lengthTicks (a whole number of bars: XS14 for one meter, the validator for meter changes), lengthBeats (derived: lengthTicks / ppq, so counted in quarter notes whatever the meter), durationMs (from the tempo map, rounded half up).
  • conductorSha256: required whenever there are stems (XS15).
  • Tempo tick usPerBeat bpm: usPerBeat is the truth. bpm is 60,000,000 / usPerBeat, rounded half up to exactly 2 places (XS13).
  • Meter tick num den (den a power of two) and Key tick tonic mode.
  • The first Tempo and Meter (and Key, when present) sit at tick 0, and the ticks of each kind strictly increase (XS12).

5.4 Parts#

Part index label category tick bar beat ms bars leitmotif, plus an optional <Fabula>/<Short> note (§7b).

  • Indexes count 1, 2, 3 … (XS18).
  • Each part starts at a strictly increasing tick before the song's end, or gives at least a bar (XS18).
  • The conductor carries one FF 06 marker per part (§3.2).

5.5 Stems and Stem#

Stems policy drumSplit count report (XS01: count = the number of Stem elements).

Stem attributeRule
index1–99. Strictly increasing (XS02)
idNN-name: the two-digit index, then lower-case words (XS05). Ids are therefore unique
nameThe stem's display name, also its track name (FF 03)
roleA fixed vocabulary: the band roles lead bass chords pad arp drums fx plus the audio-stem categories vocals guitar piano other (5.17's category)
colourA literal lower-case #rrggbb, as in .pxs PALT. Never a palette index
file, sha256stems/<id>.mid (XS04) and that file's sha256. A pack whose file doesn't match is refused, with the stem named
channel, port1–16, drums on 10 (XS06). Port 1 by default (§3)
bank, programAs written at tick 0 (§3.6). program is 0-based (0–127). Bank is 14-bit (CC0 × 128 + CC32)
notes, firstTick, lastTickThe note count (> 0, XS10); the first note-on and the last note-off, both ≤ lengthTicks

Children, in order:

  • Sound: font or patch (never both, XS08), with bank, program and preset. The font must be declared (XS07), and a patch needs <Patches> (XS09).
  • From kind: sniplets, band, transcription, performance or import. Optionally audioStem (the six categories), separator and transcriber (model ids). From says how a stem was made, never what audio it was made from. The grammar gives it no file, path or hash attribute (X67: MIDI only).
  • Sources: Placement sniplet lane tick bar beat ms repeats fit transpose, the round trip of §4.

5.6 Readers, writers and unknown things#

  • Writers emit only what this version names, in the canonical form (§8).
  • Readers fail open. A reader ignores elements and attributes it doesn't know (a later 6.x adds optional ones), and unknown values in open vocabularies (Lineage/Parent@kind reads as "related").
  • Validators are strict for the version they implement. A 6.1 manifest is validated with the 6.1 grammar.

6. SoundFont references#

  • A <Font> names a SoundFont (sf2, sf3 or sfz) by sha256 (its identity), path (relative to the manifest, and absolute only under scope="local"), name, and licence. The licence is a fontsmith/licences.py id: generaluser-gs, mit-fluidr3, user-original, ….
  • Font ids are unique (XS33). A stem's <Sound> points to one, with bank, program and preset name.
  • A missing font falls back to the stem's GM program (the fontsmith rule: a font's program is its GM fallback).
  • Bundling. A font goes inside the pack (fonts/…) only when it is redistributable="true" (XS20) and its licence allows it. That covers the stock-font rows of TXQ4/TXQ5 and the owner's PQ12 ruling for snipdrum kits in station exports. Otherwise the font is referenced by hash (and path) only, and the person's own library supplies it.
  • A personal font's sha256 could link two exports of one band (.pxs TXQ25). Under scope="share" the writer replaces a personal font's hash with an HMAC of it, in the same way as ref.
  • Built-in synth patches (station instruments, PQ18) are not SoundFonts. <Patches> carries them as the .pxs SYNT data, and <Sound patch="…"/> points to one. A reader without the engine uses the stem's GM program.

7. The Pop Boll block, in XML#

Every chunk of a .pxs block (docs/PXS.md §5, §13) has a place in XMLX, in .pxs 1.1's order (§10, §13.13). The size budget follows .pxs §7: the same priorities and the same drop order, recorded in Head@dropped. A chunk is carried in one of three ways (the reference mapping is xmlx/block.py, both directions):

  1. A typed element, for what people read and what other elements point at: DSCL → <Disclosure>, LICN → <Licences>, LINE → <Lineage>, PALT → <Palette>, CUES → <Cues>. A typed element is used only when it gives the chunk back exactly. A chunk with a field the element can't hold goes, whole, into <Extra> (way 3), so nothing is ever lost.
  2. The chunk's JSON, losslessly, inside the chunk's own element. The form is the XPath 3.1 json-to-xml vocabulary, in XMLX's namespace:
    • <Map>, <Array>, <String>, <Number>, <Boolean> and <Null>;
    • inside a Map every member carries key, and inside an Array none does;
    • members are written in key order, and keys are unique (XS44);
    • numbers are written as the chunk's canonical JSON writes them.

So .pxs → XMLX → .pxs gives back the same canonical JSON, and a chunk can grow fields without a grammar change. A string XML can't carry exactly (a control character, a carriage return) keeps the chunk out of the block, and the writer says so.

  1. <Extra id="…">, the same JSON form, for every other JSON chunk: PTCH, a LYRC that <Lyrics> can't hold exactly (§7c), registered chunks XMLX doesn't name yet, and private ones. Extra ids are unique (XS45); a second private chunk with the same id is left out and reported.

The canonical form is .pxs's own. A chunk's JSON is what bollardeck.pxs.canonical_json writes:

  • keys sorted, no whitespace, UTF-8 (not \u escapes), no NaN or infinity;
  • numbers exactly as Python's json.dumps writes them: integers in full (2^60 stays 1152921504606846976, never a float), floats in their shortest round-trip form (0.1, 1.0, -0.0, 1e+21, 1e-07).

XMLX copies those number texts. A <Number> must read exactly as that writer prints its value (1E21, 0.10 or 1.00 is not_canonical), and is at most 400 characters. So .pxs → XMLX → .pxs gives back the same bytes, for canonical input. Some cases differ:

  • A chunk whose JSON isn't canonical (another writer's spacing, 1e2, an escaped U+2028) is carried as its value, and the writer's report says its bytes will differ.
  • A JSON object with a key twice is refused and reported, since carrying it would keep one value silently.
  • A second chunk with the same id is left out and reported.
  • A reader refuses a <Number> that isn't finite (1e999) or that it can't read back.
  • DSCL without known comes back with "known": "full", since XMLX requires the field, and the report says it was added. Strings carry every character XML can hold (U+2028 included). A string or key holding a control character, a carriage return or a lone surrogate can't be carried exactly, so its chunk stays out of the block and is reported, never bent.

Binary chunks. XMLX carries no base64. CUES is the one binary chunk with an element of its own. MIDI and ART_ become files (stems, art.png), and SIGN is never copied. Any other chunk that isn't UTF-8 JSON whose top level is an object or an array is left out of the block and listed in the writer's report (tests/test_xmlx_block.py pins this with a vector).

Per-person data. The block adds no chunk. A file made from a .pxs carries only the chunks xmlx.block.SHAREABLE names (§5.2): telemetry (JUDG SEED ENGA VOTE FACT STUD), Talkback's TALK and every chunk XMLX doesn't know are left out and reported. SHAREABLE is to_xml's default; carrying every chunk takes allow=EVERY_CHUNK by name, for a file that never leaves its maker, and allow=None is refused. Whatever is carried is carried exactly as the .pxs carries it, under .pxs §6 (choices, not press times; aggregates, not who rated what). A pack written without a .pxs has no block chunks beyond its disclosure and licences. Every string and key inside the JSON form and <Extra>, a private chunk's included, is scanned by the same privacy deny-list as all other text (§9.3).

.pxs chunkXMLXPHow
HEAD<Head> (+ <Time>)0§5.1; not part of the block
DSCL<Disclosure>0Required, typed, §7a
LICN<Licences>0Typed: Work id scope holder source licence url version extent aiTraining note (+ Text, the licence's full text where it must travel), then Substitution channel wanted used why. A substitution's channel is the module's channel as LICN names it (ModuleChannel, 1–64; a station track sits on 1–63), not a stem's MIDI channel: it says where the substitution sounds in the module the block rides on, in a sidecar and in a pack alike (a band pack's substitutions name the tracker's channels). Scopes: composition, metadata, lyrics, chip-voices, samples:<which> (the tracker writes samples:channels 1,10), font:<id>. Work ids are unique (XS32). aiTraining is LICN's licence.ai_training (LQ13): allowed, reserved or unspecified; absent means unspecified, and it has no grammar default, so a .pxs that says unspecified keeps saying it. It is a signal for text-and-data mining and AI training; the licence term is what binds
SRCE<Provenance>0JSON. No audio hashes (X67)
PROJ SYNT SMPL AUTO<Project> <Patches> <Samples> <Automation>0JSON (station songs). Sound@patch names a SYNT instrument. A pack carries no samples (MIDI only); <Samples> says where they came from, never the audio
LINE<Lineage>1Typed: Parent ref kind moduleSha256?, at most 64. Names refs, never people
LYRC<Lyrics> (up to 16)1§7c and .pxs §13.15 (pxs/lyrc/1). Typed only when exact: truth "midi", no channel or note (a sidecar has no stems), no unknown field; otherwise <Extra id="LYRC">, reported. A refused chunk (L1–L6) is left out, and the report names its code
MIDI<Stems>, <FullMidi>1Files, not a blob; not part of the block
CRED<Credits>1JSON
—<Release>—XMLX only: 5.17's release fields, isrc iswc upc releaseDate explicit language
PART<Parts>1§5.4, by tick (PART counts rows); not part of the block. Labels, categories and leitmotifs agree
PTCH<Extra id="PTCH">, and each <Stem><Sound>2JSON, plus §5.5 per stem
JUDG SEED<Judgement> <Seed>2JSON
PALT<Palette>3Typed: id name + exactly 16 <Colour>#rrggbb</Colour>
CUES<Cues>3Typed: one <Cue row tick kind key colour/> per 8-byte record (kind: on, off, flash, pulse)
TALK<Talk>3JSON. Popsniplish fabula and short nodes (§7b) attach once Talkback writes TALK
ENGA VOTE FACT STUD<Engagement> <Votes> <Factory> <Study>4JSON. STUD's rules carry over: never any morpus fragment
SNIP STRY INVT LOOP<Sniplets> <Story> <Invitation> <Loops>5JSON
ART_<Art file="art.png" sha256>5The PNG is a file in the pack. No base64 in the XML; not part of the block
KMAP<Keymap>3JSON
any other<Extra id="…">—JSON
SIGN<Signature alg kid sig>0Optional and last. A .pxs signature signs the module's bytes, so it is never copied. No 6.0 writer signs yet; the signed bytes are defined with the first one that does. Verification never affects validity

Privacy. The rules of .pxs §6 apply word for word. Never in any element, attribute or text:

  • an account, email or user id;
  • the pbNNNN device prefix, a soul or band fingerprint, band keys, or HAMS ids;
  • locker, wallet or device-key ids;
  • session ids, IPs or user agents;
  • payment records, raw input timings, or who rated what;
  • a PILL name, handle or device URL for a private device.

The Schematron checks the cheap parts: absolute paths (XS19), e-mail addresses (XS43) and songId (XS22). The reference validator runs the full deny-list of .pxs §6 over every attribute and text node (§9.3).

7a. Disclosure: tools, libraries and machine learning#

The owner: "provenance/disclosure about libraries used. ML/GenAI stuff. if we know it". Every pack says plainly how it was made. This is the same disclosure as .pxs DSCL (A13), and it is required.

<Disclosure known="full" ml="true" genai="false">
  <Tool name="htdemucs_6s" kind="model" version="4.1.0" library="demucs" licence="MIT" role="separation" ml="true" genai="false" ran="cloud"/>
  <Tool name="basic-pitch" kind="model" version="0.4.0" licence="Apache-2.0" role="transcription" ml="true" genai="false" ran="browser"/>
  <Tool name="popsnip-engine" kind="software" version="1.0.0" licence="Apache-2.0" role="render" ml="false" genai="false"/>
  <Short>Stems separated by htdemucs_6s and notes transcribed by basic-pitch: machine learning, used for analysis only.</Short>
</Disclosure>
  • role is one of: separation, transcription, pitch, beat, analysis, composition, arrangement, performance (a person playing), render or export.
  • kind is one of: model, software, library, asset (a font or a sample set), person or unknown.
  • ml says whether a trained model did the work. genai says whether a model generated musical content. Under the owner's rule, generation is always logic or human, so a Pop Boll export says genai="false" everywhere. The field exists so that imported material can say otherwise when that is known. The element's ml and genai are the OR of its tools' (XS23).
  • known is full, partial (some sources are undisclosed, e.g. a person's own imported MIDI) or none. An unknown step is listed as <Tool kind="unknown" role="…"/>, never omitted. known="full" lists no unknown tool (XS23), and every other tool has a name (XS24).
  • ran (cloud, device or browser) is optional. Under PQ8, a person's own audio never runs in the cloud.
  • Versions and licences come from the image's pins (transcode/requirements.txt, fetch_models.sh) and from the engine's build. They are never typed by hand.
  • Agreement with .pxs DSCL. DSCL.items[] and <Tool> have the same fields since .pxs aligned with XMLX: name, kind, version, library, licence, role, ml, genai, ran, note, plus the top-level known. A pack made from a .pxs lists every DSCL item, in order, and then the XMLX writer itself (tests/test_xmlx_block.py compares them). The <Short> is written by one deterministic rule (xmlx.block.disclosure_short), from the items, known and the top-level ml/genai flags, so the same disclosure always gives the same words. A partial or unknown account says so.

7b. Popsniplish inside the nodes#

The owner: "we can use Popsniplish to structure stuff inside the XML nodes too". Popsniplish (docs/POPSNIPLISH.md) is the band's language. Every entry is a constructed fabula (fabula/1): items built by rules, plus a short, the plain-English telling.

  • A human-readable node (Part and Disclosure today; Talk, Story, Judgement reasons and Invitation once their writers produce Popsniplish entries, when they gain typed forms) may carry both a <Fabula schema="fabula/1"> with the structured items and a <Short> with the telling. Tools read the items. People and plain readers read the short.
  • XMLX defines only the container. The item vocabulary is Popsniplish's. Open with Popsniplish's owner of record (ask P1): whether fabula/1 has a canonical XML form. If it doesn't, its edition 0.2 adds one, and XMLX references it rather than inventing its own. Until then, the grammar accepts any content inside <Fabula>.
  • Shorts come from the popsniplish package's telling, so they are deterministic: the same song gives the same words, byte for byte.

7c. Lyrics, and how anything is placed in time#

The owner: "we need to add lyrics and a concept of time (or at least start bar) sync … lyrics are next for the wider system".

One timeline rule for the whole manifest. Anything placed in time (a part, a lyric, a sniplet placement; a cue or a talk line once they gain typed forms) says where it is with tick, which is the truth, counted on <Time ppq> from the song's start. It may also carry the derived, human forms:

  • bar and beat: a 1-based bar, and a 1-based beat inside it in the meter's beat unit (den), cut (not rounded) to 3 decimals, from the meter map. Meter changes sit on bar lines. Before the first Meter there is no bar or beat: XS12 puts it at tick 0, and a manifest that breaks XS12 is refused for that, never read as 4/4 until its first meter;
  • ms: milliseconds from the start, from the tempo map, rounded half up.

A writer emits all three where it knows them. A reader trusts tick. The validator checks that bar/beat and ms agree with it. A source that only knows bars (the owner's "at least start bar") writes bar alone, and the next writer fills in the rest from the maps.

<Lyrics id="en" language="en" sync="syllable" stem="01-lead" rights="r1">
  <Line index="1" tick="7680" bar="5" beat="1" ms="8916" part="2">
    <Syllable tick="7680" bar="5" beat="1" ms="8916" note="0">Wor</Syllable>
    <Syllable tick="8160" bar="5" beat="2" ms="9473" note="1" join="true">st</Syllable>
    <Syllable tick="8640" bar="5" beat="3" ms="10031" note="2">mouse</Syllable>
    <Syllable tick="9120" bar="5" beat="4" ms="10588" note="3">trap</Syllable>
    <Short>Worst mouse trap</Short>
  </Line>
  <Line index="2" bar="7">
    <Short>(a line placed by its start bar only)</Short>
  </Line>
</Lyrics>
  • sync is the finest timing level used: none (plain text, no times anywhere: XS29), line, word or syllable. A pack may mix levels line by line.
    • Timed lyrics place every line, by tick or at least by bar (XS28).
    • Timed syllables need word or syllable (XS29).
  • stem names the stem the words are sung on (XS25). note is the 0-based index of that stem's note a syllable belongs to, so karaoke and note-to-word tools can pair them exactly; it needs stem (XS30). join glues a syllable to the one before it, so the line reads as words.
  • <Short> holds the line's plain text, which is all a plain reader needs. Line indexes count 1, 2, 3 … (XS31), and part names a Part (XS34).
  • More than one <Lyrics> may appear: other languages, a translation (translationOf names another set's id, XS27), or backing vocals on another stem.
  • In the MIDI files (P32-59): lyrics are also written as standard FF 05 lyric events at their ticks, in the named stem's track and in full.mid, so players that show karaoke from SMF lyrics work without the XML. Ruled (XQ10): a lyric event that starts a new line begins with /, and one that starts a new paragraph begins with \ (the common karaoke-file convention). The events are derived from the XML, exactly (xmlx/lyrics.py; the validator derives them again and compares, lyrics_mismatch):
    • A stem's events come from the first <Lyrics>, in document order, whose stem names it, that is timed (sync not none) and that is not a translation. Other sets stay in the XML. No other track carries FF 05, the conductor included.
    • Each line with a time gives events: its tick, or else the first tick of its bar. Each syllable starts an event at its time, read the same way (a syllable placed by its bar alone is timed at that bar's first tick, like a line); a syllable with neither joins the event before it (the line's first starts at the line's time). A line without syllables is one event: its <Short>.
    • Times never go back within a set, in document order: lines and syllables by tick and by bar (XS46), and, where one is placed by its bar alone and the other by its tick, by the bar's first tick (the validator's timeline check, timeline_mismatch). A set out of time order would give events no SMF can hold.
    • A syllable not joined to the one before it starts with a space, unless it is the line's first. The line's first event starts with \ when the line begins a paragraph (the set's first timed line, or a line whose part differs from the timed line before it) and with / otherwise.
    • Text is UTF-8, never cut, and written as it is: a / or \ inside the words goes into FF 05 too, where a karaoke player may break the line at it. At a tick, the events sit after the note-offs and before the note-ons.
    • P32-59 is still to check this against two karaoke players.
  • Privacy (review of PR 386, B1). Every <Lyrics> set, timed or not, fed or not, is also read with its words joined: each line's syllables as written (a space before an unjoined one), a line without syllables as its <Short>, and the lines run together with nothing between. So a deny word or an e-mail address split across syllables or across lines is found wherever it sits. The joined FF 05 read drops the / and \ marks, and lyrics.lrc is also read with its time stamps and line ends removed. Running lines together can join the end of one line and the start of the next into a word that wasn't sung; the check then refuses an innocent pack. That is accepted: it fails closed.
  • Optional lyrics.lrc in the pack, for media players, derived from the XML too, and checked byte for byte when present (lyrics_mismatch). It comes from the first timed, non-translation <Lyrics> (stem or not): one row per timed line, [mm:ss.xx] from the line's ms, then, for a line with syllables, enhanced LRC: <mm:ss.xx> before each event's text (the same events, without / or \). Times are centiseconds, rounded half up from milliseconds. There are no header tags, and every row ends with a newline. The XML stays the truth.
  • Rights. Lyrics are a separate work from the music.
    • rights names a Licences/Work with scope="lyrics" (XS26).
    • A band song's lyrics follow the owner's generation rule (logic or human, never a model), and <Disclosure> says which.
    • A transcription of someone else's recording carries no lyrics unless that corpus's licence says the words may be kept.
    • Words from a person's own song stay theirs, under X67's privacy rules when unshared.
  • .pxs: the matching chunk is LYRC, defined in .pxs 1.1 (§13.15, 0.3.3): P1, 32 KiB, pxs/lyrc/1, the JSON form of <Lyrics>, with places in the song's truth unit (MIDI ticks, or µrows for truth: "patterns"). A set's channel stands for stem: a stem pack places it on that channel's lane (xmlx_band). The vectors are fixtures/lyrc/ (§9.4).

8. Determinism and canonical form#

Same inputs, same bytes. A writer emits the manifest in one canonical form:

  • UTF-8 without a BOM; LF line endings; the XML declaration <?xml version="1.0" encoding="UTF-8"?> on the first line; a final newline;
  • two-space indentation, one element per line;
  • an element with only text sits on one line (<Short>…</Short>), and an empty element is self-closed (<Tempo …/>);
  • elements in grammar order; the root's xmlns first; attributes in grammar order (the order of xmlx-6.xsd);
  • an attribute equal to its grammar default is omitted (origin="band", truth="midi", public="false", drumSplit="kit", port="1", ports="1", bank="0", repeats="1", transpose="0", leitmotif="false", join="false", redistributable="false");
  • escapes only &amp;, &lt;, &gt;, and &quot; inside attributes;
  • no comments and no processing instructions beyond the XML declaration;
  • numbers in fixed forms: integers plain; bpm with exactly 2 decimals; beat with up to 3 and no trailing zeros; booleans as true/false; hashes in lower-case hex.

So the bytes can be hashed without a C14N library (C14N doesn't fix element order or number formats; XQ6). A validator compares them after rewriting. The reference writer is xmlx.write (Apache-2.0, standard library only; P32-53). It turns lanes into stems under the policies of §4 and writes the conductor, the stems, full.mid, the canonical manifest and the canonical zip. It stores every zip entry, so no zlib version can change a byte, and it checks its own pack with the reference validator before returning it. A band song reaches it through xmlx_band.py, which reads the song's MIDI and JSON and takes its disclosure and licences in the .pxs DSCL and LICN shapes.

9. Validation#

Three layers, each refusing with a named reason:

LayerChecksEngine
1. GrammarShape, order, required parts, value types and ranges, vocabularies, path shapesxmlx-6.xsd (XSD 1.0; XQ6)
2. FieldsThe rules between fields of one manifest: XS01–XS43 belowxmlx-6.sch (ISO Schematron, XPath 1.0)
3. FilesThe rules between the manifest and the pack's files, and the full privacy deny-listThe reference validator (P32-54)

9.1 The grammar#

xmlx-6.xsd uses only XSD 1.0. Grammar errors are reported as the engine words them, with the element and attribute named.

Limits beyond the XSD. Every conforming validator applies these three, so ports agree on purpose rather than by a runtime's accident:

  • Integers have at most 64 digits after the sign, leading zeros included. A longer one is a grammar error, whatever its value.
  • Decimals are compared, checked against fractionDigits and written in canonical form exactly, at any length, with no rounding to a fixed precision. Their canonical form drops the +, leading zeros, trailing fraction zeros and a bare point, and writes zero as 0. lengthBeats is compared with lengthTicks / ppq exactly.
  • Dates (xs:date, xs:dateTime) have a four-digit year from 0001 to 9999. Negative years, year 0000, and years of five or more digits are grammar errors, never a crash.

fixtures/limits/ holds a vector for each of these limits.

9.2 The field rules (Schematron)#

Each assertion's message starts with its id. Ids are permanent and never reused; gaps are numbers not used.

IdRule
XS01Stems@count equals the number of Stem elements
XS02Stem indexes strictly increase
XS04A stem's file is stems/<id>.mid
XS05A stem's id starts with its two-digit index (so ids are unique)
XS06Drums are on channel 10
XS07Sound@font names a declared Font
XS08A sound names a font or a patch, never both
XS09Sound@patch needs <Patches>
XS10A stem has notes; firstTick ≤ lastTick ≤ lengthTicks
XS12The first Tempo, Meter and Key sit at tick 0; their ticks strictly increase; tempo changes sit before the end
XS13bpm = 60,000,000 / usPerBeat, rounded half up to 2 places
XS14lengthTicks is a whole number of bars (single meter; the validator handles meter changes)
XS15A pack with stems records Time@conductorSha256
XS16FullMidi appears only with Stems
XS17A manifest that is not a sidecar (no Bind) has at least one stem
XS18Part indexes count 1, 2, 3 …; each part is placed (tick or bar); ticks strictly increase and sit before the end
XS19scope="share": no absolute path in any attribute (one starting /, C:\, file:, ~/; URLs in Work@url aside), nor anywhere in any element's text. In text it finds a machine's path root in any case (/Users/, /users/, /USR/, the rest of xmlx.rules.PATH_ROOTS) with something right after it, ~/, ~user/, \\server, file:/ and a drive letter. Each must sit at the start or after white space (no-break spaces included) or punctuation; after a letter, digit, . or / it is part of a word or a URL (https://x/home/a passes). It also finds $HOME/, ${HOME}/, $env:USERPROFILE, %USERPROFILE%, %HOMEPATH%, %APPDATA% and %LOCALAPPDATA% anywhere. One list of checks is both the Python rule and the Schematron's XPath (generated by sch_path_text), so the engines answer alike. Known limits: a root is read in its first two places only (/home/ is … passes); ~ten/twenty is a rare false positive
XS20A font bundled under fonts/ is redistributable="true"
XS22songId only for a band song on a public device
XS23Disclosure@ml and @genai are the OR of their tools'; known="full" lists no unknown tool
XS24A tool that isn't kind="unknown" has a name
XS25Lyrics@stem names a stem
XS26Lyrics@rights names a licence Work
XS27Lyrics@translationOf names another lyrics set; lyrics ids are unique
XS28Timed lyrics place every line (tick, or bar at least)
XS29sync="none" lyrics carry no times; timed syllables need sync word or syllable
XS30Syllable@note needs Lyrics@stem
XS31Lyric line indexes count 1, 2, 3 …
XS32Licence work ids are unique
XS33Font ids are unique
XS34Line@part names a part
XS36Head@dropped never names a P0 element
XS38No two stems share a channel on one port; when there is a full.mid, every stem's port exists in it
XS43No e-mail address anywhere (a cheap slice of the privacy deny-list)
XS44A Map's keys are unique (the block's JSON form, §7)
XS45Extra ids are unique
XS46In a Lyrics set, in document order, the ticks of its lines and syllables never go back, nor do their bars (§7c)

9.3 The file rules (the reference validator)#

The reference validator is the xmlx package (Apache-2.0, standard library only; P32-54). It reads the grammar file itself (xmlx/xmlx-6.xsd, kept byte-identical to this folder's), runs the field rules in Python with the same ids as the Schematron, and adds the rules below. It checks a pack folder, a song.xmlx, a sidecar <module>.xmlx, or a .xmlx.zip, and never raises on bad input:

python3 -m xmlx "Worst Mouse Trap - PILL.xmlx/"

When the manifest can't be read (malformed: not UTF-8 XML starting with <, an XML declaration whose version isn't 1. followed by digits (XML 1.0's VersionNum; checked by the validator itself, so every expat agrees), a DOCTYPE or entity declaration anywhere, a NUL, elements nested more than 64 deep, a character reference with more than 32 digits; too_big) or the grammar refuses it (grammar), nothing else runs. Otherwise every problem is reported, each with its named reason:

ReasonRule
missing_fileA file the manifest names (a stem, full.mid, art.png, a bundled font, a sidecar's module) is not there
stem_hash_mismatch, full_hash_mismatch, art_hash_mismatch, font_hash_mismatchA file's sha256 is not the one the manifest gives
smf_malformedA stem file is not a readable Standard MIDI File (truncated, bytes after the last track or after End of Track, a cut-off event)
smf_formatA stem file is not SMF type 1 at <Time ppq>, with the conductor and exactly one track
conductor_mismatchA stem file's track 0 is not the conductor whose hash is conductorSha256 (§3.2)
time_mismatchThe conductor doesn't say what <Time>, <Head title> and <Parts> say: the title at tick 0, tempos, meters, keys (where FF 59 can express the mode), one marker per part, no channel events, no FF 54
length_mismatchA track's End of Track isn't at lengthTicks (§3.5)
channel_mismatchA stem's events aren't all on its channel; bank select and the program change aren't at tick 0 before the first note; the FF 21 port prefix doesn't match port (§3.3, §3.6)
name_mismatchThe track name (FF 03) isn't Stem@name, or the instrument name (FF 04) isn't Sound@preset
notes_mismatchThe note count, first note-on or last note-off isn't what the stem says, or a note is open at End of Track (§3.7)
full_mismatchfull.mid isn't the conductor plus every stem's track 1, in stem order, byte for byte
lyrics_mismatchA stem's FF 05 lyric events aren't exactly the ones its <Lyrics> give (§7c), the conductor carries any, or lyrics.lrc isn't exactly the one they give
lyrc_invalidAn <Extra id="LYRC"> that .pxs §13.15's rules refuse, its L code in the message: over 32 KiB of text in UTF-8 bytes (L1), a Map key twice (L2), or a value xmlx.lyrc.check refuses (a lone surrogate, the schema, the shape, the limits, the lyric rules: L2–L6). It fails closed: the file is refused, and its words aren't read
timeline_mismatchA bar, beat or ms disagrees with its tick; durationMs or lengthBeats disagrees with the maps; lengthTicks isn't a whole bar; a meter change isn't on a bar line; a bar-only position is outside the song. A tick before the first Meter (already XS12) has no bar or beat, so nothing is checked against one there
privacyThe deny-list of .pxs §6 (tracker/privacy.py's, linear) matches an element or attribute name, an attribute value, a text node, a MIDI text event (meta 0x01–0x0F, 0x7F, read as UTF-8, UTF-16 and Latin-1, with the lyric events also read joined), a SysEx payload, lyrics.lrc, or a file or folder name in the pack. Text is folded first: combining marks and format characters dropped, NFKC. The fold reads Unicode 15.0's character database (Python 3.12's unicodedata, the server image's; every image that carries the check runs it), so a character a later version assigns is unassigned here and dropped; a port folds with 15.0's tables, not its own. The repository's test venv stays on Python 3.11 (basic-pitch needs tensorflow-macos, which has no cp312 wheel, and a local 3.12 ships expat 2.6.3, not the image's 2.9.0), so the version-sensitive tests run inside the server image whenever the suite's Unicode or expat differs from it (tests/test_server_python.py; tools/test_in_server_image.py runs the whole xmlx suite there). Without docker they fail, unless POPBOLLARD_NO_IMAGE_CHECKS=1 is set on purpose. Then it is entity- and percent-decoded and folded again, up to four times; on decoded text an @ counts only as part of an e-mail address. Text still changing after the fourth round is refused. The deny words are also matched with lookalike letters (Cyrillic, Greek, Latin variants, small capitals, Cherokee) folded to Latin, with blank fillers dropped, and with the same separator between every letter (w.a.l.l.e.t). Lyric events are read joined as written (karaoke syllables build words), without §7c's / and \ marks; text and marker events are read joined with a newline. Every <Lyrics> set is also read with its words joined, and so is a .pxs LYRC carried whole in <Extra id="LYRC">, once xmlx.lyrc.check accepts it (otherwise it is lyrc_invalid), and lyrics.lrc without its time stamps (§7c). Only the hash, ref and signature attributes whose grammar types them (Stem@sha256, Head@ref, Signature@sig, …) are not searched. On a public device, Head@songId and the values of pill, handle, device_url and edition directly in <Credits> (the fields .pxs §6 lets a public CRED carry) may name the device; nothing else may. Those values are still read for everything but the device label and the handle: a deny word, a spaced one or an e-mail address in them is refused. Known limits: the deny-list doesn't decode base64 or hex, doesn't catch a word split by anything but one repeated separator, and has no rule for other identifier names (userid, device_id, session_id) or for IP addresses. Lyrics are read joined set by set, so a word split across two <Lyrics> sets isn't found, nor one split across two lines with a single separator (a space, a no-break space or a hyphen) between them; and text in a syllable that looks like an LRC time stamp is read as written in the XML, though lyrics.lrc's stamp-free read would drop it. Those belong to the writers' own §6 filters
audio_in_packThe pack holds an audio file (§1: no audio)
unnamed_fileThe pack holds a file its manifest doesn't name (§2), a folder no named file needs, or something that isn't a regular file (a FIFO, a device, a broken link), or a pack's manifest isn't called song.xmlx. Nothing unnamed is read. The rule holds for every pack, every zip, and every manifest with stems, Bind or not; only a sidecar without stems, beside its module in a person's own folder, is exempt
path_escapesA zip entry's name leaves the pack's tree, a zip entry is a link, or a link in a pack folder points outside the pack
zip_encryptedA zip entry is encrypted. It is never opened
zip_not_canonicalThe zip form breaks §2: song.xmlx first and stored, the rest in byte order, dated 1980-01-01, no extra fields, no comments, no data descriptors, no directories, no duplicates (also not by case), entries one after another from the first byte, local headers that agree with the directory, nothing hidden inside an entry (a stored entry's compressed size is its size; a deflate stream ends exactly where the entry does), nothing after the end record
not_canonicalThe manifest isn't byte-identical to its canonical rewrite (§8), or a <Number> isn't written as .pxs's canonical JSON writes it (§7)
too_bigA cap of §2 is passed: manifest 2 MiB, each .mid 4 MiB, the pack 32 MiB. Checked before reading
bind_mismatchAs a sidecar: Bind@moduleSha256 isn't the module beside it. A reader ignores such a sidecar

9.4 Fixtures#

fixtures/ is built by fixtures/build_fixtures.py (stdlib only, deterministic). tests/test_xmlx_spec.py rebuilds it and requires the committed bytes.

  • good/: complete packs with real SMF stems and true hashes:
    • band-pack: a band song, by instrument, with syllable lyrics, their FF 05 events in the lead stem and full.mid, and lyrics.lrc;
    • station-pack: a person's Sniplane song, by lane, with placements, a patch and a fork lineage;
    • sidecar: a module plus its bound .xmlx, without stems;
    • local-scope: an absolute font path under scope="local".
  • good/band-pack.xmlx.zip: band-pack in the canonical zip form.
  • bad/: manifests that each break exactly one rule, in one layer. EXPECTED.json names the rule. Every Schematron rule has at least one.
  • bad-packs/: whole packs (folders and zips) that each break exactly one file rule. EXPECTED.json names the reason the reference validator gives.
  • shareable/: valid sidecar manifests whose blocks carry shareable and unshareable chunks. EXPECTED.json gives xmlx.block.unshareable for each.
  • lyrc/: .pxs LYRC chunks, each valid or refused with one code (L1–L6), with the six privacy cases of §7c. EXPECTED.json gives parse (ok or the code), and for valid ones typed (whether <Lyrics> hold it exactly) and leaks (the .pxs writer's gate, tracker.privacy.chunk_leaks). Built by fixtures/build_verdicts.py.
  • limits/: band-pack manifests with one value changed, probing §9.1's limits beyond the XSD, and Substitution@channel's range (40 valid, 65 refused). EXPECTED.json gives each one's reason and verdict.
  • VERDICTS.json: the reference validator's verdict on every vector above, for ports that must agree with it. alone is check_manifest(data, None, None) on the manifest (no files read); path is check_path on a good or bad pack, files and all. A verdict is valid, kind and the sorted set of reason codes; messages and how many problems share a code are not part of it. shareable/, limits/ and VERDICTS.json are built by fixtures/build_verdicts.py, which runs the xmlx package; the spec test requires them fresh.

10. Names, media types, versions#

  • Name: XMLX (ruled, XQ1, 2026-11-11: "nobody really uses it and it's funny"). Files get distinctive names, because .xmlx is listed elsewhere as a mistyped .xlsx:
    • inside a pack, the manifest is always song.xmlx;
    • a sidecar is <module filename>.xmlx;
    • a zipped pack downloads as <title>.xmlx.zip;
    • the UI says "XMLX stem pack".
  • Media types: application/vnd.popboll.xmlx+xml for the manifest and application/vnd.popboll.xmlx+zip for a zipped pack (+xml/+zip let generic tools open them). The provisional application/x-xmlx+xml is used until they are registered.
  • Versioning: version="6.0". A minor version adds optional elements or attributes in the same namespace. A major version changes the namespace. "6.0" is the first time the number means the format, and it never tracks an app release (5.17 was the xmlx.app web app's version). 5.x files are not 6.0. The converter (xmlx.convert517, P32-57; python3 -m xmlx convert517) does three things:
    • It lifts a 5.17 file's metadata: title, BPM, key, duration, credits, and its release fields normalised into <Release>.
    • It turns each stem's MIDI link, found beside the file, into a stem. It never fetches a URL.
    • It drops all audio, every URL and every $$placeholder$$, and reports what it dropped. A lifted value (an element's text or an attribute) that holds $$ or :// anywhere is dropped whole, never trimmed. A stem's category must be one of 5.17's six (VOCALS DRUMS BASS GUITAR PIANO OTHER), or it is read as OTHER.
    • It refuses rather than guesses: a file over 4 MiB, one with a DOCTYPE, unreadable XML. A BPM that isn't a number from 4 to 1000 becomes 120 and is reported. A MIDI file over its 4 MiB cap, or one it can't read (a division of 0 among them), drops its stem with a report. At most 64 stems are read.

Its disclosure says that xmlx.app's models separated and transcribed the stems (known="partial", the models unnamed, since 5.17 never named them).

11. Rulings (XQ)#

All ten questions are ruled. On 2026-11-13 the owner put the namespace on xmlx.app ("i still have xmlx.app! it kinda makes more sense to use that, right?") and took every other default ("all the other defaults look good").

#QuestionRuling
XQ1Keep the name XMLX?Keep XMLX (owner, 2026-11-11: "nobody really uses it and it's funny"), with distinctive file names (§10)
XQ2Folder, zip, or both?Both: a folder on devices, and a deterministic .xmlx.zip for downloads and lockers (§2). Owner, 2026-11-13
XQ3Does XMLX replace the binary .pxsx sidecar?Yes (owner, via O! 0.3.0, 2026-11-11). XMLX is the only .pxs sidecar
XQ4Include full.mid by default?Yes. Owner, 2026-11-13
XQ5Namespace and home: popboll.com or xmlx.app?xmlx.app: the namespace is https://xmlx.app/ns/6, and xmlx.app redirects to popboll.com/xmlx. Owner, 2026-11-13: "i still have xmlx.app! it kinda makes more sense to use that, right?"
XQ6Schema languageAn XSD 1.0 grammar, ISO Schematron field rules, and this canonical form (§8, §9). Owner, 2026-11-13
XQ7Default stem policyby-instrument, with drums as one kit stem. Owner, 2026-11-13
XQ8Morpus companions: when?Not in 0.3.3. They come later, as a corpus-build step (P32-58). Owner, 2026-11-13
XQ9Open spec licenceThis text is CC BY 4.0; the validator and writer are Apache-2.0. Owner, 2026-11-13
XQ10How lyric lines end inside the SMF/ starts a new line and \ a new paragraph. P32-59 checks this against two players before it closes. Owner, 2026-11-13

12. History: what XMLX was#

From a read-only survey of p2mix/, the code of the retired xmlx.app (2025-12-19 to 2026-01-02, app v4.71 to v5.17).

  • "5.17" was never a format version. update_version.py rewrote the example's <XMLX version> to the web app's release number, and the generator always wrote version="1.0".
  • Two dialects existed: a rich one (AudioMaster, Stems by category, a DerivedFile full-score MIDI) and a simple <header>/<assets> one. There was no schema, and ingestion parsed with regular expressions. No SoundFont was ever named in the XML.
  • The sync faults 6.0 is designed against (§3 fixes each):
Fault in 5.x6.0 rule
Padding assumed 120 BPMOne tempo map in a byte-identical conductor track (§3.2)
The first note was moved to tick 0, breaking absolute alignmentStart at tick 0 and keep the silence (§3.4)
No PPQ, offset or tempo in the XML<Time> repeats the conductor, and a validator checks they agree
Drums as program 116 (Taiko) instead of channel 10Drums on channel 10 (XS06)
Different channel maps per pipelineChannels declared per stem, and checked
URLs on one website, no hashes, no zipRelative paths, sha256 for every file, a deterministic zip
  • Kept: the name and the root element; stems as the unit (5.x's audio categories survive as roles); a full-score MIDI (full.mid); the release metadata, as optional <Release>.
  • Dropped: audio of every kind, URLs, $$placeholders$$, InLine, and regex-friendly CDATA.

The draft's full survey is in docs/handover/0.3.2/xmlx/XMLX_6_SPEC_DRAFT.md §12.

13. Prior art#

Raw notes: docs/handover/0.3.2/xmlx/XMLX_PRIOR_ART_NOTES.md (2026-11-11).

Prior artWhat XMLX does with it
DAWproject (Bitwig + PreSonus, MIT, XSD)Borrows the zip-plus-root-XML layout, relative paths, explicit time units, #rrggbb colours, a tempo block and a version attribute. Adds what it lacks: hashes, SMF stems, a byte-identical conductor. The export to .dawproject (xmlx.dawproject, P32-57) writes one notes track per stem, with the tempo, meter, tempo automation and part markers. It validates against DAWproject's own Project.xsd and MetaData.xsd. The output is one element per note, so it is capped at 250,000 notes (at most about 32 MB). A pack with more is refused. The command line checks a pack before reading it, so a zip is never inflated past the validator's caps
MIDI Association "MIDI Project Container File" (NAMM 2026; no published spec found)Watch it. If it publishes, XMLX maps onto it or offers an export
XMF / Mobile XMF (RFC 4723)The precedent for "MIDI plus its sounds". XMLX references SoundFonts by hash instead of embedding them
MusicXML 4.0 / MEI 5.1Notation-first. Not a base; a later optional score.musicxml per pack
NI STEMS, Ableton .alsLiteral colours and a fixed role vocabulary, never palette indexes
SMF conventionsNo published standard syncs separate SMFs. §3 is the recipe, and the manifest records the conductor's hash. A MIDI 2.0 Clip File per stem is an optional extra later
SFZ / SF2No standard binds "this channel uses this font, bank and program". <Font>/<Sound> define it (§6)
DDEX ERN 4.3Identifier fields (ISRC, ISWC, UPC) as plain typed values in <Release>, not the namespace (its Implementation Licence)
C14N 1.1Not enough for deterministic bytes; §8's own canonical form instead

14. Changelog#

VersionDateChange
6.0 draft 02026-11-11B! 0.3.2's handover draft
6.0 draft 12026-11-13The canonical home (P32-52); XQ2 and XQ4–XQ10 ruled, with the namespace on xmlx.app (XQ5): the grammar and Schematron; .pxs 1.1's chunk set (Project, Patches, Samples, Automation, Lineage, Keymap) and order; Disclosure required, aligned with DSCL; the canonical form's defaults rule; the conductor-hash definition; the full.mid layout; lower-case colours; Work@aiTraining (LQ13); fixtures
6.0 draft 22026-11-13The reference validator and writer, the xmlx package (P32-54, P32-53), and the validator's named reasons (§9.3); XS38's port check applies only with a full.mid; refs in lower case only (as .pxs since TX's PR 309); lengthBeats counted in quarter notes; beats cut to 3 decimals; FF 21 in the stem file too; pack-level bad fixtures and a canonical zip
6.0 draft 32026-11-13The reader, the 5.17 converter and the DAWproject export (P32-57; §4, §10, §13). Sidecars in practice (P32-56, §5.2): the classic .it + sidecar download, load_sidecar. The Pop Boll block (P32-55, §7): the JSON form (Map/Array/String/Number/Boolean/Null) in every chunk element, <Extra id> for every other chunk, typed <Cues>, the exact-or-<Extra> rule; Work@source, the work-level Text, free-form samples:/font: scopes, no grammar default on aiTraining; XS44, XS45
6.0, amended2026-11-14Substitution@channel is the module's channel (ModuleChannel, 1–64; O!'s ruling): LICN names the IT channel of the track that plays the instrument, and a station track sits on 1–63. It had borrowed the stem's MIDI Channel (1–16), so a station substitution on 17–63 couldn't be written. Widening breaks no file. Vectors limits/substitution-channel-40 (valid) and -65 (grammar)
6.0, amended2026-11-14The manifest cap is 2 MiB (O!'s ruling): a station sidecar carries its project as JSON in XML, about 7× the JSON, so 1 MiB refused songs of about 60 busy phrases. AP measured the Worker's parse: about 51 MB at 2 MiB (61 MB for a hostile shape), 93 MB at 4 MiB. An older reader refuses a manifest between 1 and 2 MiB as too_big; it never misreads one
6.0, amended2026-11-16A station stem is drums exactly when its sound is a kit by .pxs 1.2 §13.3.7's definition (O! 0.3.4): a kit flag, else a drum patch, else every key-map sample from a bank-128 preset or snipdrum (§4 step 4). No rule or vector changes: the station has no XMLX stem export yet, and the writer that makes one takes is_kit

CONTACT THE TEAM

ASK FOR A MAKER CODE

Making devices? Ask for your maker code here, no sign-in needed. Tell us the code you'd like and a second choice, your name or your company's, and in a sentence what you are building.

A person reads each request and replies by e-mail; a code is registered only after you answer that reply. We use this address only to reply about your maker code, and keep it with your message (and the IP address and browser it came from) for the team. It is not published: the public registry on the makers page shows a contact address only if you ask us to.

We reply to this address (see the note above).

20 to 5000 characters.