Pure-Python reader and player for Future Composer (MoN/Deenen) SID songs
Project description
pyfuturecomposer
A standalone, pure-Python reader and player for Future Composer (MoN / Deenen) C64 SID songs. It parses a Future Composer tune into a typed song model and runs the playroutine to produce byte-exact per-frame SID register output, with an optional WAV render through an emulated SID.
The player is a faithful integer transcription of Future Composer's entry_1806
6502 play routine (the tempo divider, the per-voice DEC-duration row advance, the
opcode-stream SEQUENCE + PATTERN walks, and the dense per-frame modulation engine:
slide-target vibrato / portamento, the $E0 glide, a 16-bit pulse-width sweep, the
filter-cutoff program and the wave / arp tables). It reproduces the
preframr-sidtrace register oracle of the reverse-engineering reference tune
We R Da Best (tune 2) (Warren Pilbrough / Jade Tiger) byte-exact.
Read/play/register-log is pure stdlib; only WAV rendering needs the optional
audio extra (pyresidfp).
pip install pyfuturecomposer # reader/player/reglog
pip install pyfuturecomposer[audio] # + WAV rendering via pyresidfp
Quick start
import pyfuturecomposer as fc
song = fc.read("tune.sid") # PSID/.sid or bare .prg
# Per-frame SID register writes (the writes the playroutine emits each frame).
for writes in fc.iter_frames(song, max_frames=50 * 60):
... # writes: list[(register, value)]
# Forward-filled 25-register-per-frame snapshot grid (the oracle form).
grid = fc.render_grid(song, nframes=400)
# Register log (clock reg val triples), and WAV via an emulated SID.
fc.write_reglog(fc.iter_register_writes(song, max_frames=2500), "tune.reglog")
fc.render_wav(song, "tune.wav", seconds=30) # needs the audio extra
Command line
pyfuturecomposer info tune.sid
pyfuturecomposer reglog tune.sid tune.reglog --seconds 30
pyfuturecomposer wav tune.sid tune.wav --seconds 30 --model 8580
Register-surface convention
iter_register_writes(song, max_frames=..) -> (clock, reg, val) is the shared
py* register-log surface (matching pymusicassembler / pygoattracker), so the
output cross-validates byte-exact against the deplayroutine generic interpreter
and the preframr-sidtrace oracle.
Tests
Test tunes are HVSC copyright works and are never committed; they are fetched
on demand into a gitignored cache (scripts/fetch_tunes.py), and the byte-exact
player test validates against a committed frozen oracle grid when the
preframr-sidtrace binary ($SIDTRACE_BIN) is unavailable.
./run_tests.sh # black + pylint + pytest with coverage
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfuturecomposer-0.1.0.tar.gz.
File metadata
- Download URL: pyfuturecomposer-0.1.0.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3f4c085d07536bacc5ca32b3e6ffac763cb52248f3b7169230966f93964d323
|
|
| MD5 |
a17961227d799df33c702f2645b7036e
|
|
| BLAKE2b-256 |
3a2921b1b90ecd5d83f0ff3e9abcbce78da579cedabf072e70bee522c8890163
|
Provenance
The following attestation bundles were made for pyfuturecomposer-0.1.0.tar.gz:
Publisher:
release.yml on anarkiwi/pyfuturecomposer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfuturecomposer-0.1.0.tar.gz -
Subject digest:
b3f4c085d07536bacc5ca32b3e6ffac763cb52248f3b7169230966f93964d323 - Sigstore transparency entry: 1964702304
- Sigstore integration time:
-
Permalink:
anarkiwi/pyfuturecomposer@71c08e90ff71aa30b4c297e3756d67a510ba1edf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/anarkiwi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@71c08e90ff71aa30b4c297e3756d67a510ba1edf -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyfuturecomposer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyfuturecomposer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ac24fb91d9c2a72d8b4b77801a7566749dc70d8522808bfa159e624ef0ab10f
|
|
| MD5 |
ae46b8531fa3d270bb1153130de96754
|
|
| BLAKE2b-256 |
e779fe0aae2203ddd18af5149dcf3d6f29f26baa864add047fa987080ac4227f
|
Provenance
The following attestation bundles were made for pyfuturecomposer-0.1.0-py3-none-any.whl:
Publisher:
release.yml on anarkiwi/pyfuturecomposer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfuturecomposer-0.1.0-py3-none-any.whl -
Subject digest:
3ac24fb91d9c2a72d8b4b77801a7566749dc70d8522808bfa159e624ef0ab10f - Sigstore transparency entry: 1964702376
- Sigstore integration time:
-
Permalink:
anarkiwi/pyfuturecomposer@71c08e90ff71aa30b4c297e3756d67a510ba1edf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/anarkiwi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@71c08e90ff71aa30b4c297e3756d67a510ba1edf -
Trigger Event:
release
-
Statement type: