pydefmon
Pure-Python reader, writer, and player for
defMON C64 tracker tunes. DefmonPlayer
runs a tune's own relocatable replay on a jennings 6502 and emits the per-frame SID
register writes, verified byte-exact against the
sidtrace sidplayfp oracle over real
HVSC tunes.
Reads .sid files (PSID/RSID containers) and bare .prg editor workfiles
through the shared pysidtracker
base, reconstructing the same runtime image either way — the relocatable player
is located by signature and container headers are not trusted. The player runs
the replay embedded in a .sid.
Install
pip install pydefmon
Usage
from pydefmon import DefmonSong, DefmonPlayer
# Read / edit a tune (either container auto-dispatches on magic).
song = DefmonSong.from_file("tune.sid")
print(song.pattern_events(0)[:4])
print(song.sidtab_row(0))
# Play a .sid replay: per-frame SID register writes / grid.
player = DefmonPlayer("tune.sid") # bytes, path, or SidImage
for reg, value in player.play_frame(): # reg is a 0..24 SID register offset
...
grid = DefmonPlayer("tune.sid").render_grid(250) # 250 x 25-register frames
See docs/usage.md for editing, the register-write API, and the
shared pysidtracker command line (info / reglog / wav, which pydefmon
plugs into), and docs/format.md for the canonical file-format
and runtime-RAM reference.
Development
pip install -e ".[dev]"
pytest -n auto
Tests that need real defMON tunes fetch + cache them on demand (the copyright editor workfiles from the csdb release, the HVSC replays for the corpus) and skip when offline; nothing needs pre-populating.
License
GPL-3.0-or-later. See LICENSE.
Metadata
Release files for pydefmon 0.9.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 | |
|---|---|---|---|
| pydefmon-0.9.1.tar.gz | 52.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydefmon-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 90.6 kB
Release files / pydefmon-0.9.1.tar.gz
| Download URL | pydefmon-0.9.1.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e2ab434804f14b3d660a572533a6063f6f016262a446cb1f954708694090688
|
|
BLAKE2b-256 checksum How to use checksums |
73e15b4eff9b8c1f5869bf1b31b6a41d6996975e0c1b2e8def90416005809747
|
| 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 / pydefmon-0.9.1-py3-none-any.whl
| Download URL | pydefmon-0.9.1-py3-none-any.whl |
|---|---|
| Size | 38.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
597fcfd5ec9db056762c472b22b79c4ee3e7d5d1f44a06406aa582a4621d93a0
|
|
BLAKE2b-256 checksum How to use checksums |
27f56a5d21d32dc67b4e7aabdfe3210aa4eed59a3965a5634d0601c44e31fdb3
|
| 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