Skip to main content

pymusicassembler

Pure-Python reader, writer, and player for Music Assembler C64 SID songs — the Dutch USA-Team system of MC (Marco Swagerman) and OPM (V1.0, February 1989) and the Triad bug-fix releases V1.1-V1.4 (1991-1994) — with byte-exact per-frame SID register output, WAV rendering through an emulated SID, write-back, and the native editor formats of every editor version: the S. song export and the P. preset bank (read, write, and apply to a song).

Patterns, orderlists and arpeggio programs are read, checked and printed with a Music Assembler Lark grammar of what the player reads, run by pysidtracker's byte-grammar runtime (docs/format.md). The play call is a pysidtracker.playspec spec, src/pymusicassembler/specs/musicassembler.play.

Consumes .sid files (PSID/RSID containers) and bare .prg images through the shared pysidtracker base: every work cell and table of the player is located from the player code's own operands (any load address and player build), and the tune's init runs in a 6502 emulator, so subtune selection and packed/relocating rips play as on a C64.

Install

pip install pymusicassembler   # reader/writer/player/reglog, song grammar (lark), WAV (pyresidfp)

Usage

import pymusicassembler as ma

song = ma.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 ma.iter_frames(song, max_frames=50 * 60):
    ...                               # writes: list[(register, value)]

See docs/usage.md for editing/write-back, the register grid, register logs, WAV rendering, the CLI, and the full public API, and docs/format.md for the format, playroutine, and byte-exact validation, and docs/oracle-testing.md for the oracle tests and the whole-HVSC survey.

Development

pip install -e ".[dev]"
pysidtracker fixtures fetch tests/fixtures/ma_native.txt  # editor P./S. files into .tunecache/native
./run_tests.sh        # black + pylint + pytest with coverage

License

Apache 2.0 — see LICENSE.

Metadata

Release files for pymusicassembler 0.13.1

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

Source distribution (sdist)

Source distribution for pymusicassembler 0.13.1
File Size Uploaded Provenance Actions
pymusicassembler-0.13.1.tar.gz 92.5 kB With provenance Details for pymusicassembler-0.13.1.tar.gz

Built distribution (wheel)

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

Total release size: 147.1 kB

Release files / pymusicassembler-0.13.1.tar.gz

Download URL pymusicassembler-0.13.1.tar.gz
Size 92.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ebd5506c77257f3d7932cb1f57a3ed2a6c267ee3eaa16536dfc4a2b835e86a85
BLAKE2b-256 checksum
How to use checksums
8b39b6ba7440baa6d1b6ef5983f427563ad0b38867b1cf6dd61386a57176c057
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 / pymusicassembler-0.13.1-py3-none-any.whl

Download URL pymusicassembler-0.13.1-py3-none-any.whl
Size 54.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5b4b9d39cb9cb1370a5c819e5b908d71d11ad2c8cfd11432604f1302318e890
BLAKE2b-256 checksum
How to use checksums
ef8dcb1c0ee4dde8b488e5d5729a583fc52581537ae5c9ca243d58dd5c09f2a2
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 pymusicassembler 0.13.1

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 pymusicassembler-0.13.1.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