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 (pylibresidfp)

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.16.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 pymusicassembler 0.16.0
File Size Uploaded Provenance Actions
pymusicassembler-0.16.0.tar.gz 96.6 kB With provenance Details for pymusicassembler-0.16.0.tar.gz

Built distribution (wheel)

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

Total release size: 152.5 kB

Release files / pymusicassembler-0.16.0.tar.gz

Download URL pymusicassembler-0.16.0.tar.gz
Size 96.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0bbf687bb95e3a9b3ee38ad3d05b8c6a102685fbb6a8e21468fe86d404974b38
BLAKE2b-256 checksum
How to use checksums
67de22682316222dd5d59f2eeba7bef5abe7b4da1c648feb0a4709b23a36c497
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.16.0-py3-none-any.whl

Download URL pymusicassembler-0.16.0-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d206c50b1b302bbf77db2595ccbb1dd84f08db508a9cb3ceb89a57753c97039
BLAKE2b-256 checksum
How to use checksums
b418b44e58eefc4aabb0ec5cf55e6ef71abaa7aee749ceee8439ab7b9bc63397
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.16.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 pymusicassembler-0.16.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