Skip to main content

pylibresidfp

pybind11 binding of libresidfp v1.2.3 (the reSIDfp SID emulator) with chip state save/restore, a deterministic output and a GIL-free render loop.

from pylibresidfp import SID

sid = SID(model="6581", clock_hz=985248.0, sampling_hz=44100.0, method="decimate", filter=True)
sid.write(24, 15); sid.read(27); sid.peek(27); sid.reset()
sid.cycle                      # absolute cycle count, starts at 0
sid.clock(cycles)              # np.int16 samples for those cycles
sid.run(writes, until)         # writes: (N, 3) ints or [(cycle, reg, value), ...], absolute cycles
sid.serve(writes, cycle, reg)  # run to `cycle`, then read(reg): the body of a NativeSid on_read
state = sid.save_state(); sid.restore_state(state)
twin = sid.copy()              # same parameters and state; SID is also picklable

run clocks to each write's cycle, writes it, then clocks to until. Write cycles must not precede sid.cycle or each other and must not exceed until; violations raise ValueError. serve discards the samples it produces (use run to keep audio).

clock, run, serve, save_state and restore_state release the GIL. Each instance has a busy flag: use from a second thread while a call is in progress raises RuntimeError. Distinct instances run in parallel.

Fed directly from vagrant_moses: sid.run(native_sid.drain_writes(), until).

Determinism

Two instances with the same parameters and writes produce identical samples, for both models and both methods. Upstream v1.2.3 dithers the filter's float-to-int conversion from a table indexed by a counter held in the process-wide filter-model singleton; patches/0001-deterministic-rounding.patch (applied at build time) replaces the dither with plain rounding. Other process-wide state is immutable after first use (filter and waveform tables). The static setters Filter6581::setFilterRange/setCaps are not exposed. v1.2.3 has no noiseLevel, so there is no noise_level option.

State is not portable across builds. sid.cycle is part of the saved state.

Build

git clone --recurse-submodules, then pip install .. Needs CMake >= 3.20, patch and a C++17 compiler. libresidfp is the submodule extern/libresidfp (tag v1.2.3); the build copies its sources and applies patches/ to the copy. Tests: pip install -e .[dev], then pytest -n auto --cov=pylibresidfp. docker build . (build arg PYTHON_VERSION) runs the full lint and test suite.

GPL-2.0-or-later (see COPYING).

Metadata

Release files for pylibresidfp 0.1.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 pylibresidfp 0.1.0
File Size Uploaded Provenance Actions
pylibresidfp-0.1.0.tar.gz 163.9 kB With provenance Details for pylibresidfp-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pylibresidfp 0.1.0
File Actions
pylibresidfp-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for pylibresidfp-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pylibresidfp-0.1.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for pylibresidfp-0.1.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
pylibresidfp-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for pylibresidfp-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pylibresidfp-0.1.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for pylibresidfp-0.1.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
pylibresidfp-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for pylibresidfp-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pylibresidfp-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details for pylibresidfp-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Total release size: 1.0 MB

Release files / pylibresidfp-0.1.0.tar.gz

Download URL pylibresidfp-0.1.0.tar.gz
Size 163.9 kB
Tags Source
SHA-256 checksum
How to use checksums
202406d246a3f629e7e2510cb3b2c971185be289b9d315a89e6d345062b63a3e
BLAKE2b-256 checksum
How to use checksums
a24f9f7de667b90d7b40bf2c9a299054cd258ae1ff8ad20663d65e3f8fb5abc1
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 / pylibresidfp-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pylibresidfp-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 153.7 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
07948783bfae9465948ff41cfd2fbfa1907bce94179fc923b4739b63d4be3d1c
BLAKE2b-256 checksum
How to use checksums
891bf9347428d0b3d2b3b3c6363f86acd8555d1d33ca64776d990756e3451cdf
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 / pylibresidfp-0.1.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pylibresidfp-0.1.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 140.9 kB
Tags CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2c973f3e2d311a14d67b175ce9fd8382051bd6e97aa5ae57ee74baf124082294
BLAKE2b-256 checksum
How to use checksums
654b96e5af3d9db9d88db4e0573874f557ce2bb1c54efc8539cf8ff5a8d7b957
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 / pylibresidfp-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pylibresidfp-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 153.7 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
06b4d11e81b6eb9d798dcd43d61ae4cf5c7fdb13bd0735c88c006e26118f404c
BLAKE2b-256 checksum
How to use checksums
3861c050215f59a93f02cb8a006e8f76c91f8acfc868c333cb7806057b93b3a8
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 / pylibresidfp-0.1.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pylibresidfp-0.1.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 140.6 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
5f8f9d0abf0524c61211fd9ee19c031d403ac93a41893ea379aaacb248177b48
BLAKE2b-256 checksum
How to use checksums
cf86985a20b2b402c1f70c95112d5ba5a7edc744306ff8c5d45d43f287c145fc
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 / pylibresidfp-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pylibresidfp-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 153.1 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4bbf6d9ea05c1d295db2fcdf7a329c765be6e15c011b95a7b7e0bc5cd4d8d194
BLAKE2b-256 checksum
How to use checksums
eee36525a3276d633a3ef7d4aba10b301c5c2e7b5068071898663d88de4588e3
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 / pylibresidfp-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL pylibresidfp-0.1.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 139.5 kB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f155f685f8976cb69d22b1e36f902a1eb8c3080aef2c31c0190483385ac9160c
BLAKE2b-256 checksum
How to use checksums
33598da6199f4ad81b487b6d66115334ac3629ce72b7f5ecfa6255101427a941
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 pylibresidfp 0.1.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

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for pylibresidfp-0.1.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