pygoattracker
Pure-Python reader, writer, and player for
GoatTracker 2 .SNG songs,
with SID register-log output and audio rendering through an emulated SID.
Consumes .sid files (PSID/RSID containers) and bare .prg images through the
shared pysidtracker base: the
packed GoatTracker playroutine (as produced by gt2reloc) is detected and
decompiled back to a Song, including crunched/relocated images whose init is
run in a 6502 emulator — container headers are not trusted.
Install
pip install pygoattracker # read/write/play/register logs, .sid decompile
pip install pygoattracker[audio] # + WAV rendering via pyresidfp
Decompiling .sid files (including crunched/relocated images, run in a 6502
emulator via jennings) works out of the box; only WAV rendering needs the extra.
Usage
Recover a song from a .sid file:
from pygoattracker import decompile_sid, write_sng
result = decompile_sid("tune.sid") # path, bytes, or binary file object
song = result.song # the parsed Song model
write_sng(song, "tune.sng") # a .SNG this library reads and plays
Read a GoatTracker .SNG song:
from pygoattracker import read_sng
song = read_sng("tune.sng")
print(song.name, song.author, song.copyright)
The player is one class deriving from pysidtracker.MemPlayer; its render is
validated byte-exactly against a sidplayfp oracle across GoatTracker
play-routine variations (see docs/oracle-testing.md).
See docs/usage.md for building songs, playback, register logs,
WAV rendering, NinjaTracker 2, and the command line,
docs/format.md for the format specification, data model, and
.sid decompilation notes, and docs/oracle-testing.md
for the byte-exact oracle tests.
Development
pip install -e ".[dev]"
./run_tests.sh # black + pylint + pytest with coverage gate
License
Apache 2.0 — see LICENSE.
Metadata
Release files for pygoattracker 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygoattracker-0.3.1.tar.gz | 92.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygoattracker-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 156.7 kB
Release files / pygoattracker-0.3.1.tar.gz
| Download URL | pygoattracker-0.3.1.tar.gz |
|---|---|
| Size | 92.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9a3792d33526d73bbe7152d059761a3ed510a33daefa5b5bdb05a7fb6a8ee77
|
|
BLAKE2b-256 checksum How to use checksums |
add8d3bae2cf3bdfae6e206db4683e766b2ac4762cae01a927ba223ad16896f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 23, 2026.
Transparency logRelease files / pygoattracker-0.3.1-py3-none-any.whl
| Download URL | pygoattracker-0.3.1-py3-none-any.whl |
|---|---|
| Size | 64.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
626ed8968166d5baf82ed622289538059f198b0ede363287a563edbdb1b4e562
|
|
BLAKE2b-256 checksum How to use checksums |
a52caace2cb71602e281ffd3413dc3adfbf32a23f4890cab7cb5a8fc982cd263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 23, 2026.
Transparency log