unitracker
A lifter of GoatTracker 2 tunes to the generic C64 SID tracker document of unitracker-grammar, which names no player and which unitracker-player plays, and a generic optimiser over any such document. The lift is checked against pysidtracker's spec player; the optimiser makes a document smaller, every edit proved to keep the register grid.
Language-model learnability, tokenization and constrained decoding of the documents: unitracker-learn.
| doc | content |
|---|---|
| docs/lift/goattracker2.md | the GoatTracker 2 lift (python -m unitracker.lift.goattracker2) |
| docs/lift/defmon.md | the defMON lift (python -m unitracker.lift.defmon) |
| docs/lift/musicassembler.md | the Music Assembler lift (python -m unitracker.lift.musicassembler) |
| docs/optimiser.md | the generic optimiser: its driver, guarantee and passes (python -m unitracker.optimiser) |
| docs/optimiser.md#passes | the passes: defaults, merge, transposition folding, the legato snap, templates and their structural names, hoist (python tools/passes_eval.py) |
| docs/optimiser.md#inline | the optimiser's inline forms (--inline single, --inline all): definitions written at their uses |
| docs/optimiser.md#lossy-mode | the lossy mode: code modulators replaced by fitted expressions within a tolerance per cell (--lossy) |
Install
pip install -e ".[dev]"
Use
unitracker-lift TUNE.sid [-o OUT.yaml] [--subtune N] [--optimise [--ticks T] [--lossy] [--inline MODE]]
It detects the tune's format (pysidtracker) and writes its lifter's document, optimised with
--optimise (with --lossy, code modulators first replaced by fitted expressions). A tune that
is not GoatTracker 2 raises FormatError.
from unitracker import cli
cli.lift(raw, subtune) # raw: the .sid bytes; the generic document's text
cli.verify(raw, subtune, frames) # the cells where the document's grid differs from the reference
tools/corpus.py:render is the renderer for pysidtracker's survey: it lifts each subtune and
plays its document on unitracker-player, compared with the sidtrace oracle:
python -m pysidtracker.survey find $HVSC --out out/survey/tunes.csv --player goattracker
PYTHONPATH=tools python -m pysidtracker.survey run $HVSC out/survey/tunes.csv --work out/survey --render corpus:render
python -m pysidtracker.survey report out/survey/results.csv
Triage
Reuse these before writing a new tool; extend one rather than adding a near copy.
| question | tool |
|---|---|
| does each tune lift to a document that plays the reference player's grid, and why not (by cause) | python tools/corpus.py check [TUNE.sid|LIST.csv ...] [--out DIR] [--frames N] [--player RE] [--timeout S] [--multi-sid] (default: the reference tunes; multi-SID tunes, by header or a GoatTracker build past three voices, excluded) |
why do a check table's differing tunes diverge (standard pitch, one-tick lag, start registers, register groups) |
python tools/divergence.py out/check/results.csv [--frames N] [--jobs J] (writes classes.csv beside it) |
| where does a document differ from the reference player? | python -m unitracker.lift.goattracker2 --verify TUNE.sid ... [--frames N] [--diff RUNS] [--jobs J] |
| lift failures over HVSC, by cause | pysidtracker.survey with corpus:render (above) |
| the reference player's register grid | unitracker.lift.goattracker2.reference(raw, subtune, frames) |
| what does the lossy mode replace, save and cost per tune; how does it sound? | python tools/lossy_eval.py DOC.yaml ... [--ticks N] [--wav DIR] |
| how large is each lifted document against the tune's bytes, in bytes, tokens and xz, by section | python tools/liftsize.py CORPUS LIST.csv ... [--hvsc DIR] [--top N] [--out SIZES.json] |
| which sounds of each document are percussive (one or two pitches, over and over), and how much each part repeats where a voice interleaves them | python tools/parts.py DOC.yaml ... [--ticks N] [--out PARTS.json] |
| how each tune's voices hard-restart on its native register grid: per note onset, the lead frames' gate, test bit and AD/SR against the onset's, classified, with the envelope rate in effect against the prescaler wrap, per format | python tools/hardrestart.py LIST.csv|TUNE.sid ... [--hvsc DIR] [--player RE] [--sample N] [--frames N] [--lead K] [--out HR.json] |
what starts each program (a note, an event's or a row's run:, a restart), which starts are replaced before they play a row, what binds and zeroes each modulator's phase, and which programs do nothing |
python tools/triggers.py DOC.yaml|LIST.txt ... [--ticks N] [--out TRIGGERS.json] |
| do the docs' links resolve; which lines did coverage lose? | python tools/maint.py {links,coverage BEFORE.json AFTER.json} |
which generator (semitone offset, clock_hz, rounding) reproduces each tracker's native note table, and which entries it misses |
python tools/notetables.py [--json OUT] |
| a small synthetic tune for a test | tests/conftest.py: gt_tune, table, hvsc_tune |
Layout
src/unitracker/: lift/ (the GoatTracker 2 lift and the helpers and command line lifts
share), optimiser/ (the generic optimiser), cli.py (unitracker-lift). cli imports lift
and optimiser, which import neither each other nor
cli; lint-imports checks it ([tool.importlinter] in pyproject.toml).
Test
HVSC=/path/to/C64Music pytest -n auto # without $HVSC the tunes are fetched into .tunecache/
Metadata
Release files for unitracker 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unitracker-0.2.0.tar.gz | 169.7 kB | With provenance | Details for unitracker-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unitracker-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for unitracker-0.2.0-py3-none-any.whl |
Total release size: 301.2 kB
Release files / unitracker-0.2.0.tar.gz
| Download URL | unitracker-0.2.0.tar.gz |
|---|---|
| Size | 169.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a2fc183df7a7d2a20a395fb103a86029a287b825e533e5af04d0d1d0ca2a7cc
|
|
BLAKE2b-256 checksum How to use checksums |
1e66ae5b2c6f1492627d8f6476d3644bb5223b0a02fb33995b2abe0f41000250
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / unitracker-0.2.0-py3-none-any.whl
| Download URL | unitracker-0.2.0-py3-none-any.whl |
|---|---|
| Size | 131.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e1d928e6890b394f5dd0bfc3bb88cc72c724cd28970dda360725b5f174415b7
|
|
BLAKE2b-256 checksum How to use checksums |
274a99eed27b795551ab00f7088dd8f8cb246f0cb85a507b0d5b3552cec63133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logSecurity for unitracker 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for unitracker-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.