Emulates the SID sound-chip
Project description
pyresidfp
Emulates the SID sound-chip in software. The C++ emulation code was copied over from libsidplayfp.
How to install
Requirements:
- compiler for ISO C++11
- Python 3 and header files
From PyPI
Install the latest version using
python -m pip install pyresidfp
From cloned git repository
Build from source using
python -m build
and install using
python -m pip install dist/pyresidfp-*.whl
Example
For the example, NumPy and soundcard python packages are required. The example is ported from the section Sample Sound Program, Commodore 64 User's Guide, page 80:
from datetime import timedelta
import numpy as np
import soundcard as sc
from pyresidfp import SoundInterfaceDevice, Voice, ControlBits, Tone
# program SID
sid = SoundInterfaceDevice()
sid.Filter_Mode_Vol = 15 # Maximum volume
sid.attack_decay(Voice.ONE, 190) # 800 ms attack, 15 s decay
sid.sustain_release(Voice.ONE, 248) # sustain peak, 300 ms release
sid.tone(Voice.ONE, Tone.C4)
sid.control(Voice.ONE, ControlBits.TRIANGLE | ControlBits.GATE)
# sample attack phase
attack_phase = timedelta(seconds=0.32)
raw_samples = sid.clock(attack_phase)
# reprogram SID for release phase and sample
release_phase = timedelta(seconds=0.3)
sid.control(Voice.ONE, ControlBits.TRIANGLE)
raw_samples.extend(sid.clock(release_phase))
# convert audio format and play
samples = np.array(raw_samples, dtype=np.float32) / 2.0**15
spkr = sc.default_speaker()
spkr.play(data=samples, samplerate=int(sid.sampling_frequency), channels=1)
Thanks
I like to thank all contributors of libsidplayfp
, especially:
- Dag Lem: Designed and programmed complete emulation engine.
- Antti S. Lankila: Distortion simulation and calculation of combined waveforms
- Ken Händel: source code conversion to Java
- Leandro Nini: port to c++, merge with reSID 1.0
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
pyresidfp-0.4.tar.gz
(77.2 kB
view hashes)
Built Distributions
Close
Hashes for pyresidfp-0.4-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5125bf8e9b4b774023717395262e7147785542e36c48bd3d61f220eb4072ec39 |
|
MD5 | 08cd5d5e0bac1fd5523eb7925048dda9 |
|
BLAKE2b-256 | 32821a585860cebdb528e57823d7decb7fcd73a69d3b0b13824815cfb4fb04b5 |
Close
Hashes for pyresidfp-0.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c885cfa6be7651766902caa45967a1f19ca74e9dfc71a64e87a0940d22ca05 |
|
MD5 | c49725c3114eed231438a482cef0d2a3 |
|
BLAKE2b-256 | d55a71f6b0aca3f52d7ba1226c9bd764fa2d71d665d2ce994708db9c3fc971a5 |
Close
Hashes for pyresidfp-0.4-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 199e97cc9e31ed8bcd9095d6ab37fcfb08d86dcc9fcd354db229106eafd6da27 |
|
MD5 | 5800ec3d14345dfa8a128344c4d0b813 |
|
BLAKE2b-256 | 21f21a174c23d00f2f772e4df5e9ee342738bbfd77891c6d87a31eb27b225449 |
Close
Hashes for pyresidfp-0.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7df50eb62822150f5e98024b3963f3d37c27e93040801710f6bbe8d6fe8c81e2 |
|
MD5 | 6e4aa35f5c90790205e4d538403b7502 |
|
BLAKE2b-256 | 517917284dcf1bde69b8c3bb3829494bc79da2dbec53dba497867a67dcaef4e2 |
Close
Hashes for pyresidfp-0.4-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20344afdce703cf7943a56e33d58ffb4b3e55210597ed21cd121ac81a008bf85 |
|
MD5 | 5ddeefd388458cf9a550108d0d2c5b95 |
|
BLAKE2b-256 | 97e9d50d372443b621037b264180d0b14ca66310c8a7a2cb56d2d6eb825f3a7c |
Close
Hashes for pyresidfp-0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77e59e612180e4bab39967c241ffd778ee03c647b5cf81f69f0106e6f397371f |
|
MD5 | ec21082d8b46932809fa875a60c2d99c |
|
BLAKE2b-256 | 1db0b320fa6ebc219222ade149150392c233504e91d8733605c5b636517a6ee9 |
Close
Hashes for pyresidfp-0.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68287d15a83beb67d8506f4c1593221f7bba9d66d34a35ed0f6bcfeb2d0a926d |
|
MD5 | 20e4fd5e48e59e5d1c39ae0e8b418456 |
|
BLAKE2b-256 | 869770c6e1711ab6c94cd6119397318ae1a461fc551d5b430e4dad266f160296 |
Close
Hashes for pyresidfp-0.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1162c32424ce0f85d63bb0fa521ec5dcbb39a4f548b2a965af92054e6e08af37 |
|
MD5 | c2e23c2f3460fdd8c1fa34db61af7163 |
|
BLAKE2b-256 | 27d073d1c1672a12e86ff0851070042311caa2f03a9352c84b771a2240aef632 |
Close
Hashes for pyresidfp-0.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bef72d8b715e07e009778ca25eef3f77319e35ba85a42821a39840c86ee6fcd |
|
MD5 | 401e15d20d6d99e07f7e741282dce495 |
|
BLAKE2b-256 | 2b21393dd706533bf4dbe8d18a8e80f4215c5c82dd50694a8f2a798f1706a460 |
Close
Hashes for pyresidfp-0.4-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98ed9df961e0dab3b376c698794d75c46625b844ec9c3e20d1d6eb11cd53b226 |
|
MD5 | 5d1703eec2ecdd6a9ca6b14b8e8d718e |
|
BLAKE2b-256 | bb30bce8e9f20ed43a975f6e1429016147e7e38a110028ebf7aea4af322560bd |
Close
Hashes for pyresidfp-0.4-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec23720794965f986ea57285c9566b0392f2178003f34f0af00f1843f644bf3e |
|
MD5 | 1c9178cfd7c834b568da88f7f30cb7c8 |
|
BLAKE2b-256 | 67ff309a74bf653edb265e92c0b36abd3330d36e8ee7e2eca6c5f5a2d636f186 |
Close
Hashes for pyresidfp-0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc72d02b0c8e50364972da1e23542beaf76c93902123b23e2d06968cd6720cd1 |
|
MD5 | a41f251a1cdd1ee78b7027d93d13614b |
|
BLAKE2b-256 | 522baa2af233d7a0dc434f6de5d8d18d3a8dc12c2b5e1d34de2df265ed090973 |
Close
Hashes for pyresidfp-0.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c2cd6fc396bad829090b3403df888a4af96f2fb4e32a19d3c2eae2ca3a61e36 |
|
MD5 | ec7d65ed4bcf8b09ab0160efc4cb6a28 |
|
BLAKE2b-256 | 66c93b524d75bee20f6a7f59eac3f131e563429a4ab37a69498467d7ae95b844 |
Close
Hashes for pyresidfp-0.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d6210fc27b6f4acc335b576cebc2ec58ddfffc8f61454d44a860f63135f1c67 |
|
MD5 | 8cf9deb0daa7bc8eb6125be2851f3fba |
|
BLAKE2b-256 | 5055bef0502c039338f4c9d7fe8a6cf5967479c39278d53f99a759820e8d98ce |
Close
Hashes for pyresidfp-0.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf888d2613055fe9d9b4b192de26e574ee3f39fe4b5d5d2104f428e706a0f00 |
|
MD5 | 244a86ff718fadf0ae1552e5c896045b |
|
BLAKE2b-256 | f706b7d0c2ec4921112569db261f713080d1dc9da92d22ddf1768475cb52c316 |
Close
Hashes for pyresidfp-0.4-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8076a46b69931fc209c2d0271f0a5b1c6988e96d5d9a09e91d6b240c11d75a2d |
|
MD5 | 2781584d5fb98a0b75cf63e39e3f29a5 |
|
BLAKE2b-256 | 4af8d44636b795b727a0fae70ac7c2c560773da11c6fa68da7484eb14d0aaf3e |
Close
Hashes for pyresidfp-0.4-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e0c67d8ef2a8c17730c5d383bab2816edefca52d66a38b1269c7cab7caf1ea3 |
|
MD5 | 5c2ca9b11f1202c2c9b4089c51b8056b |
|
BLAKE2b-256 | 187dc380359bb9dc755835fe2210f0eabd10e3594167d2f5cea2d9f2f656ebd4 |
Close
Hashes for pyresidfp-0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b44fadd46dab10713d485ad03a1df1deb9ef06a36310426a0a377729281c4b0b |
|
MD5 | deb5f9382678871363d1bcf908786ecd |
|
BLAKE2b-256 | 6ee7f9d17aab88b84dafaade4fe9d33085af048fd0b45b010cb1e19433980348 |
Close
Hashes for pyresidfp-0.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52d65a3c481989b17f942c0374952b6e9760111b3b07aecc7260030b815a532c |
|
MD5 | dedba3e1729d79e62fd14a6655f6d921 |
|
BLAKE2b-256 | 703d665ce16541f87eca83eeb5275b99e27c714cd1579adc421ebdf990905129 |
Close
Hashes for pyresidfp-0.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f17714981174db5b7c228183cacebbb93f0f073131d5f45739c7d233b473c168 |
|
MD5 | 4ebda60a83b855176e2432623ce26033 |
|
BLAKE2b-256 | cf70c2c21f4f3ac4fb6405179b216a39f3b5bdf99b8496e1a112215497c923f6 |
Close
Hashes for pyresidfp-0.4-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eba6e7491faf279b1695a4adfbec963fde5dc5a7128822eea923b0fb70cb5607 |
|
MD5 | c699666f42971447d0df21cc672bf885 |
|
BLAKE2b-256 | 1c1aabc7d0691342760189febf0ae97c98a03b56f436c83b1c92643224e863d9 |
Close
Hashes for pyresidfp-0.4-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1c6cdf5cd1060a4a250e5827cebefabca5da1c5b1a6ad57bf431988479bb597 |
|
MD5 | 2760ba9dcddb98dca88557c5138b6abc |
|
BLAKE2b-256 | 880c4008c41f78aed1eb83f239c64b88f38e104129dc1457f0fe2b376003f508 |
Close
Hashes for pyresidfp-0.4-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eaf42aed2907bc2d34e11687ea3377b380d0031da2419684c2ea224fd5eb264 |
|
MD5 | 9e5e0c6ec1b1bf6861ca8f10cae146f6 |
|
BLAKE2b-256 | 61aed6917994e4ecbf1e2eff530d4c3f91278013f21880180ba1daa1f0b7b3f8 |
Close
Hashes for pyresidfp-0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bac8a5ff37381e4eee4e43e621b011efac9d308147e41519a977d982bb640563 |
|
MD5 | 906cec08afe057b7fe488da48c246c98 |
|
BLAKE2b-256 | bacbf96a6684cf27ad42f1d34e0d5a2aa9ce825b77f1b4b0fa7f96ad21bbd381 |
Close
Hashes for pyresidfp-0.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc7c8f390a99f197c9538bb8a9070613dd12a3638d67b1eacca11f1d652c0032 |
|
MD5 | 757cc85c3b6b38a853536c24d26e6c60 |
|
BLAKE2b-256 | b3ba9c97ae7a2c54cf8bddc71dec145fd26faeea4d7e90a465f9e81132d33f08 |
Close
Hashes for pyresidfp-0.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a58b04b216e5347791644f92c51f5823855232fc41d1be96dd92e6be0428e10 |
|
MD5 | 2f012ac3da3e6f2a6c59bfecd728445e |
|
BLAKE2b-256 | de5e0b4d7c89097ef788ad929cddff9873213d8ae6b2c9fb36ddbad2ece01049 |
Close
Hashes for pyresidfp-0.4-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3263815f2de79b86090ca2dc419f22ae1e1b20213d3fc1e4201a3205afd58de |
|
MD5 | 8eabd96b2847bd2bec9fd1fce554019b |
|
BLAKE2b-256 | 2b6e6f16939a9181071541952318d82fffaea3bab58d552080876b297d3eea80 |
Close
Hashes for pyresidfp-0.4-cp36-cp36m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aeb2f2ea92da2f8829a6089e2bc3d2fa8ea27b22ac434208292e29e60ecea89 |
|
MD5 | 63926441ea419f9af167d7a861e03d6c |
|
BLAKE2b-256 | 48fbbb26aa3d7847eaa7adeeeea6b163dd926c4b35c7f541b011b8629348a521 |
Close
Hashes for pyresidfp-0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af91c8ad9074fd5edbec777d4f6dfd21f3a7a1e45754f0560c304c26db9f41d2 |
|
MD5 | ba6183901d1c844c5ce87afe9944decf |
|
BLAKE2b-256 | 81ac2175a41fffc48e2c0c842466a49b56cc3c1963c58b8026cffb6057ec34f0 |
Close
Hashes for pyresidfp-0.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e733c912a812af548eb8366646af01556e3a2f3ad060313cc01e18c15407835e |
|
MD5 | 310bb72e3280edaa0eee83fa87f7c4c0 |
|
BLAKE2b-256 | eede60f76bfcb7c9db5ad93239e686a28bb589f5c5c85c8e565f139cfbc7fdd0 |
Close
Hashes for pyresidfp-0.4-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee7d1888b40bf4abb748b73b6303bb841cd297ec882dfe20c5d5ac2910001183 |
|
MD5 | 98dac023d14948ff00af8d2cc7852fac |
|
BLAKE2b-256 | 77cb7157ac0370a91487564ef8c84b9df505f8bbe2d9a44999e1604ca0a37056 |