Skip to main content

pysoundmonitor

Pure-Python player, reader and detector for Soundmonitor (64'er / Chris Hulsbeck) C64 SID tunes (HVSC tracker #6).

Consumes .sid files (PSID/RSID containers) and bare .prg images through the shared pysidtracker base: the Soundmonitor player is relocatable, so it is located by a relocation-invariant hardware-register fingerprint and packed/relocating builds are detected by running the tune's init in a 6502 emulator — container headers are not trusted. SoundMonitorPlayer reproduces the replay byte-exact (validated against the sidtrace oracle) by running the playroutine as a pysidtracker.playspec spec (specs/soundmonitor.play) on the memory the tune's own init leaves.

Install

pip install pysoundmonitor

Usage

import pysoundmonitor as psm

song = psm.read("tune.sid")            # path; or psm.parse(raw_bytes)
print(song.cia_latch, len(song.sections), len(song.instruments))
for section in song.sections:
    print(section.cadence, section.tempo, section.pattern_length)

# Byte-exact playback (a playspec SpecPlayer over the tune's post-init memory):
player = psm.SoundMonitorPlayer(open("tune.sid", "rb").read())
grid = player.render_grid(250)         # 25-reg, forward-filled per-frame grid
writes = list(player.register_writes(250))   # pysidtracker RegWrite log
player.render_wav("tune.wav", 250)     # emulated SID (pylibresidfp)

# Relocation-tolerant detection (untrustworthy header):
det = psm.SoundMonitorSidParser().detect("tune.sid")
print(det.kind)                        # DIRECT / RELOCATED / PACKED / UNKNOWN

Development

pip install -e ".[dev]"
pysid-tune-fetch --tests tests     # pre-cache the suite's HVSC tunes (never committed)
pytest                             # offline synthetic fixtures + HVSC corpus
pytest -m oracle -n auto           # byte-exact vs the sidtrace Docker oracle

Test tunes are HVSC copyright works: fetched and cached on demand (gitignored), never committed. The oracle job needs Docker (anarkiwi/sidtrace) and renders each covered tune with SoundMonitorPlayer, asserting a frame-exact match — see docs/format.md.

See docs/format.md for the container, detection, song-data model and song grammar, and its HVSC oracle survey section for the whole-song comparison over every HVSC Soundmonitor tune.

License

Apache 2.0 — see LICENSE.

Metadata

Release files for pysoundmonitor 0.9.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 pysoundmonitor 0.9.0
File Size Uploaded Provenance Actions
pysoundmonitor-0.9.0.tar.gz 51.9 kB With provenance Details for pysoundmonitor-0.9.0.tar.gz

Built distribution (wheel)

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

Total release size: 91.5 kB

Release files / pysoundmonitor-0.9.0.tar.gz

Download URL pysoundmonitor-0.9.0.tar.gz
Size 51.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c82e5ab40b82321925b9c9d6fd2cdb21a0c35b5182d77e9eabd5dd88a6e07a4a
BLAKE2b-256 checksum
How to use checksums
3114cef234529d4174b529604e7d61547bd90d1813623e7e6c4b2ada8482a4bc
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 log

Release files / pysoundmonitor-0.9.0-py3-none-any.whl

Download URL pysoundmonitor-0.9.0-py3-none-any.whl
Size 39.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93adb42852cc8c7bdb84ebde9b1ff53458ff12f0242dfc4de828948814c6e46a
BLAKE2b-256 checksum
How to use checksums
8943c2399609042089a44136f6a7afffe89a4a688de8b1c4b63aac5159fad621
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 log

Security for pysoundmonitor 0.9.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 pysoundmonitor-0.9.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 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