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.11.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.11.1
File Size Uploaded Provenance Actions
pymusicassembler-0.11.1.tar.gz 89.7 kB With provenance Details for pymusicassembler-0.11.1.tar.gz

Built distribution (wheel)

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

Total release size: 143.5 kB

Release files / pymusicassembler-0.11.1.tar.gz

Download URL pymusicassembler-0.11.1.tar.gz
Size 89.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cbd771e9158a32fecd6b117b4204ab427cb3566eec6d17dc9dd481c32bfc5fdf
BLAKE2b-256 checksum
How to use checksums
6ee6dce9d845f740cb05528d17954f822a010f3bbf9fe2d5fa10aba8c8f6f095
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 30, 2026.

Transparency log

Release files / pymusicassembler-0.11.1-py3-none-any.whl

Download URL pymusicassembler-0.11.1-py3-none-any.whl
Size 53.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9810e247168dab6f2b996a170e5b1a943350a8867189b11f6da70130b238868a
BLAKE2b-256 checksum
How to use checksums
1a5567e7eb61ec2e508bbd826021b96c64b3a353eaf0a26604b163ee591f7bb6
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 30, 2026.

Transparency log

Security for pymusicassembler 0.11.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.11.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 30, 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