Skip to main content

pyjch

Pure-Python reader and player for JCH NewPlayer C64 SID songs (the JCH / Jens-Christian Huus tracker player used across the demoscene), with byte-exact per-frame SID register output and a register-log surface for downstream tooling.

Consumes .sid files (PSID/RSID containers) and bare .prg images through the shared pysidtracker base: the per-tune immediates and table bases are discovered by matching the surrounding player-code instruction bytes (relocation-safe), and packed/relocating tunes are detected rather than mis-parsed — container headers are not trusted.

parse returns a Song for the canonical V0x layout, a NewPlayerModel for the wider wavetable family (~2,000 HVSC tunes), and cleanly rejects the genuinely different players and packed/relocated rips. pyjch.make_player(model) returns a pysidtracker.MemPlayer that plays every recovered version byte-exactly: a JchPlayer (the V0x routine and the V20 two-column engine, the largest HVSC bucket, each stated as a playspec -- v0x.play, newplayer.play -- and run by pysidtracker.playspec.SpecPlayer), or for every other recovered family version (V1/V2/V5/V6/V8/V9/V10/V11/V12/V13/V14/V15/V17/V18) a pysidtracker.EmuPlayer running the tune's own 6502 driver on jennings. All are validated frame-for-frame against the sidtrace register oracle. See docs/versions.md for the per-version HVSC census.

Install

pip install pyjch

Usage

import pyjch

song = pyjch.read("tune.sid")            # path, bytes, or binary file object; .sid or .prg

# Per-frame SID register writes (changed registers only, after frame 0).
for writes in pyjch.iter_frames(song, max_frames=50 * 60):
    ...                                  # writes: list[(register, value)]

Installing pyjch also registers a jch format with the shared pysidtracker command (no separate pyjch binary): pysidtracker info/reglog/wav tune.sid, plus a JCH pysidtracker export.

See docs/usage.md for the register grid, register logs, and the CLI, docs/format.md for the format, players, and byte-exact validation, docs/versions.md for the HVSC census, and docs/editor-format.md for the JCH-Editor NP22-25 native song layout (the structural-export target). The whole-HVSC oracle survey is in docs/format.md.

Development

pip install -e ".[dev]"
./run_tests.sh        # black + pylint + pytest with coverage

License

Apache 2.0 — see LICENSE.

Metadata

Release files for pyjch 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyjch 0.8.0
File Size Uploaded Provenance Actions
pyjch-0.8.0.tar.gz 89.3 kB With provenance Details for pyjch-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyjch 0.8.0
File Interpreter ABI Platform Actions
pyjch-0.8.0-py3-none-any.whl Python 3 none any Details for pyjch-0.8.0-py3-none-any.whl

Total release size: 153.3 kB

Release files / pyjch-0.8.0.tar.gz

Download URL pyjch-0.8.0.tar.gz
Size 89.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3e6a13b045b7399442dcc6474e7b7cda64fdad067c33de17b421b65de3e3fe80
BLAKE2b-256 checksum
How to use checksums
1b38342928ac08564ffb3bed0c6c1016aac53e87fd338ce24a1b4cbaa72621b9
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 Nov 1, 2026.

Transparency log

Release files / pyjch-0.8.0-py3-none-any.whl

Download URL pyjch-0.8.0-py3-none-any.whl
Size 63.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fcbd30abaaeb04e99ebeac0d4a8902ce3616c835394d8c8ce0ef03ab7687816
BLAKE2b-256 checksum
How to use checksums
cdb6f37cf8ccbb02e3b38cfa523523e1435ab88ae56ff5079a517fe2608b7c94
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 Nov 1, 2026.

Transparency log

Security for pyjch 0.8.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.

Select from 2 files

Attestation for pyjch-0.8.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 Nov 1, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page