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.5.1.tar.gz
(73.9 kB
view hashes)
Built Distributions
Close
Hashes for pyresidfp-0.5.1-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12ea5038b2340b907d271216d3454a79a1fa3bf2e1114be18e4525d7d49cd068 |
|
MD5 | 8e5701dc77e2279c190452f92e41c91e |
|
BLAKE2b-256 | d5b44a1fb03663423204b7b2eab6c6478a8d34720e73cd3574f43758909c734d |
Close
Hashes for pyresidfp-0.5.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dcf03a41ac3b0f1a41e7c2c74857fad4082092b88041be5c2233df3979808eb |
|
MD5 | 0fc13052e1e528603c916a555a4e598e |
|
BLAKE2b-256 | d6baa3eb4e79e26cddcbdcfcdfbc25812af351f4af2b8a9fcfe019d5643cf36e |
Close
Hashes for pyresidfp-0.5.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ee03b34349672412b8df387e981e94b7a7862bd316a12fba092905a5858a9e3 |
|
MD5 | 4131cd02ecf57aaf26275a2ab00d8af7 |
|
BLAKE2b-256 | fd5cbdc05ad252c4e0c3047f2420003295bd9ae9867978cce71b26936cca2a77 |
Close
Hashes for pyresidfp-0.5.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0825463e00847d97334b37bbf5e0cb37f238229b412826a7a3c3d01abe38a4d |
|
MD5 | f1757d874f4f23c729182dd0fa3a9391 |
|
BLAKE2b-256 | 2504b884d231c4ec05c2d80394f4dc38ab2554557f7bf991d08142345bcedae4 |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c990fd1e13459d1a00f818ec680ec8b9c14c751db4fa4ae2ed16abf7cecd9b36 |
|
MD5 | cd4a23e822f968295fbee779fa1c0f51 |
|
BLAKE2b-256 | 28c6d14200a3c489f6385e4db196e83d0b4916494839f31b88e69e038ef2bae9 |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d1d61dfcdfbcebaf730fe0cb3dac528dfe96ea0b24d046f399a00b393180a5 |
|
MD5 | 29d0d22f93436c722a314c6dc4fda534 |
|
BLAKE2b-256 | 4772041ec68754b97dbc981f42d50fd6248547367db6cc13f46cad984fc2ca8a |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f197b379bea742e791f02f1e658266a7c0c2c3b895247a57a75410aaf036630e |
|
MD5 | c6ddd933dd4300ad240785ca9c12d527 |
|
BLAKE2b-256 | 9d54ed71c7159ad2ee25573626aa8cc248f3155f3f27fd72f7a9eb29ab3a988c |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f12f3b941e8e8b5596b7fdebd9790418ffcbe2270f667c4ac7f631ffc303f36d |
|
MD5 | 9c470b372e70adfb8861f60f8d8234e5 |
|
BLAKE2b-256 | c2a366bba944d33d5ddd048245771a58ba36adbb1b8557e58a4911e90dc89ea6 |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf03708fca132e0ee5c8edcc35f488e579727f6f9e4a0f648e11a7a7a13286aa |
|
MD5 | fe21331405a224bcba937ffe0600b5bc |
|
BLAKE2b-256 | 6e4e0822dfe96b2049fc944f49ebb2bd3f6153d93ef645df098a729965f750fd |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd84cdde1882ecc96cb5fe857b717c2076766a42607d8213f4dbffa331d2b9eb |
|
MD5 | 1c15b6d5afb359c1369968e0b75c97ef |
|
BLAKE2b-256 | 6dc66adf25b76c295b08eed21c149d675e469fb21451e09cbd8a56e189163ba4 |
Close
Hashes for pyresidfp-0.5.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adb8ca3078815016505495df6b4876af73ac46b880d46678ff3fd5a9bb3c17bf |
|
MD5 | 5a1e75a3c408c96a2181c5692d8afee4 |
|
BLAKE2b-256 | b6a3534a2a59979b4926e89ef097661b80a776fee2f63effe060c0471b00ee11 |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32f10d60004e67eef00a6fc38112dd0dc3824e8a520a3bf92bfdf0b7b98ea379 |
|
MD5 | a0194609b7c3bbc8685d58f2b766b542 |
|
BLAKE2b-256 | af0b1f50a86fd0f790b3f1144bf5a4bc51023fd97d8eb3a225bbe960c1b048c4 |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d2ae747a2bc4315118bf8fc6c8ee5816e010eacd1d8bdf31543ab5d174ced5b |
|
MD5 | bc99b64d4d054fbb7cceafd4b0ba76dd |
|
BLAKE2b-256 | 8f34bebb7decfd838adf80220a0b4a47fc03bbd30b3f923c4ef6b28b223f80be |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ce6b73ebf3299ba7843039f314f90ca536116ed5baa8157823115fb85d0e72 |
|
MD5 | f83bd3e23cc10004d87be69c188f1d99 |
|
BLAKE2b-256 | 70e88253b2bc33daa15ac6fa9d3b676eda37f626b8cc2f0315a5877bd9c1e50d |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e814e4fb81b28a819169d9a46ba79ccf624eb8a3ba7750616e31bc30e011b2a |
|
MD5 | 7d646ef83a6fbd9a2b76ed440551f147 |
|
BLAKE2b-256 | bc8b135aa1933ddac2805429f5c4e1d1d19bd81489e654d1caf6905790f065b7 |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8481e2a14b3fa85104ba6fec529fad147c8a6885a17dfa86a9def697a9f3cba4 |
|
MD5 | 52f0d771ebe97ffb393645355e3f332e |
|
BLAKE2b-256 | 030bda00e3f033574acc0c917b24949782dfd1ea915f7f904c2f142d205491dc |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55503de92204b3e64387ed12aa7358b51cee9bc860e075356666a90ed2ba8c80 |
|
MD5 | 74623ff1546e3d5fd85237902b48f924 |
|
BLAKE2b-256 | 21cb65994dd1ab5ea8857add830654e6067dec5827139d07dbbb3213a744bf63 |
Close
Hashes for pyresidfp-0.5.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 507e58a706b29d575432f1fe9003db8a14f143c5ce15a1d745e995d72ccca1bc |
|
MD5 | b46bbf53cd50b113b2bcbe6e53dd5e8e |
|
BLAKE2b-256 | ce2c203c4b70361d8bf41c0b3133b175f869dba68a77c5e0bc741d1596e98c44 |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec2460d77bf1ec1efe52e5396b1ff8ac83e44aaa108e938d766e4827a8d8ed02 |
|
MD5 | 1dadc22853bb2bb5d516b414ceaace05 |
|
BLAKE2b-256 | b12ef0cf7a9862d192c2dd194d9527678609923b36b9780a63ea1d7e1e9b8fd7 |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d8d9326cc01c005823dfc6a199c3cbf0e8ac53c99c4fe5a7959b691f0dc594c |
|
MD5 | 9bfce8cf13f13f98b7548b0f57ee4139 |
|
BLAKE2b-256 | 3b643eb2b43ca074032118f52e4f895b83dfd65818a611e4a8b4b6ccff5649f7 |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e2894b52430b81caf9a1c58d7b537841972be47bd13f92a680a2f50b765729b |
|
MD5 | 867f39ef7b9fa2b9a5f9cba4e0b29b5c |
|
BLAKE2b-256 | 8d255080aca4fabfd0ceaa98dd94b14624ce69ae3fa86d587282ac7a703bf15a |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91706014b778c0d63da3ac27a4c190071a19ceef6947c3d8412a59c36e4b3c31 |
|
MD5 | 3b30ecee94a48f3e709f3f55e193c6dc |
|
BLAKE2b-256 | 3ee99135471fa9d4c3768b8b87779875272381a4824d678311f07526e4bb8e5c |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87617eef76381ce749f1335e2d09006fec4e2b0db328f46bf791f043537220f3 |
|
MD5 | 61c855feea222609d7435129fe6c4528 |
|
BLAKE2b-256 | 551fe3dffac8e456854cd0c70787e8922f27b35837f7e98fad5b06e36824e78a |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c31f607936dde07fb7e97d8661aa20c3146bcff8f7d0b7adb7f61e0055024370 |
|
MD5 | df2aba44fae93452429944cdf519c930 |
|
BLAKE2b-256 | 17e47627c786bf05ad03fab993b1ea728629b2f36788425e6c83a2988ae1f247 |
Close
Hashes for pyresidfp-0.5.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7093ea1a5924e23b1c6e4092a0fb66c3232d229ba7f5f4aa33146e572c4e4523 |
|
MD5 | 7805c0e86ec71665c68483c7e85a65ea |
|
BLAKE2b-256 | 28a16feab481cd967d2a983532df98b203b51d7263dede2ce2eadeafa6396242 |
Close
Hashes for pyresidfp-0.5.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f307165079d328dbba127ee47fbe45f21f368bb96195e8926bb75389a61e7c0 |
|
MD5 | 289c508d99c00be3d60677873b9b4307 |
|
BLAKE2b-256 | 1a8a28c98f76ff4f10045f0687c95acf4a3e806ba728c0d14b0c163fa1ca7290 |
Close
Hashes for pyresidfp-0.5.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0c4cb4519e1e3238e7f2bda9a3bc250f23e46849e589603c43364b897a9b935 |
|
MD5 | bdfe5941f05ef740c8a20dd604f08870 |
|
BLAKE2b-256 | 31780a29892601961051eb59b19dc678c484bfd19cad65918e91851747068c1f |
Close
Hashes for pyresidfp-0.5.1-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c7cc01b862195bfbab6ad4efc5724de0f33333d1b0598c7c25c6a896b37b73e |
|
MD5 | c18ec80338561748c981aae7f41685b2 |
|
BLAKE2b-256 | 45473ff47cdc8f2aabf3d2ad72e2cd2ac7ed701426ed508aa70f2e997ee8467c |
Close
Hashes for pyresidfp-0.5.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cb9899474d57b8bffaa149ee34d9b0c0a8371e517e67af8f1e8648cf799c09a |
|
MD5 | 5c6f371fd978ec77be0c1d85033f6af0 |
|
BLAKE2b-256 | c081ed29813bdfcaac0b9bef44181c97114476fa9d7b900f6ce2f159e1d1b2bb |
Close
Hashes for pyresidfp-0.5.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6c8401adf35b1c402dcc6bb40e7ec1c22ff40d71366b3bdce1405ffac844042 |
|
MD5 | 77db4c362acce24943f3dc509b864140 |
|
BLAKE2b-256 | f721a3b342130649fe893757a9acf3b8b9482068ced5774b0afb3ce2473ba55c |
Close
Hashes for pyresidfp-0.5.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7dad7600b91d7e39d50d2fef23eff79b2e89abafda5b9be7570369ee0f3d128 |
|
MD5 | 569a0f2b5c6965ef7632fa1cb495ccdd |
|
BLAKE2b-256 | ca2c3c940f408e2ee395c7e545a6b3d3fc38b49a7f108da71ab2099ace6a43fb |
Close
Hashes for pyresidfp-0.5.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4be66c55d3a2158cc3816764c686a52c34a99b2943946b781c584a2029aa5a35 |
|
MD5 | c40ee8c3f7607fa3a375a32fc36196d4 |
|
BLAKE2b-256 | c86a389f61f1311800fcf0df4e44a168f03b35cc2262d64f53c3103858499bb3 |
Close
Hashes for pyresidfp-0.5.1-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d2d20bc039b5359344a0cb584478b42cfaf99f8e1b6948a022f50bbbde4ed71 |
|
MD5 | 66fb5f567d3a114522aa6d4cfe1e522a |
|
BLAKE2b-256 | 38356945e27d560be334296ab3f23684101b4ded1c1f15b808577a1f1676ddfd |
Close
Hashes for pyresidfp-0.5.1-cp36-cp36m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a1150ad89cf298af52aa2d1bcc414c2b371e049482b043d1e11ccae8ff7f9cf |
|
MD5 | 80303a1fa0cf22b422399185374a4d1a |
|
BLAKE2b-256 | 1ee211d897e6b698b7897a6096ce0072d5f6c79654c3b33ece6563bd141f3349 |
Close
Hashes for pyresidfp-0.5.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9971e3c848d1a0a33e7e3c7eace0cab18c585b7ef5081c15defa5c516fca14e9 |
|
MD5 | f36a1e53b86c0b59f5cd624fda999269 |
|
BLAKE2b-256 | f71a690500720be51ad8b73db5515269cb25987f4a4b708141f036fc6a6e60ef |
Close
Hashes for pyresidfp-0.5.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f6ebb9aab29a919e3fb2400e2bea669ca1cfbf5fc190621bf935783bffc9101 |
|
MD5 | 8d742d55efa61ee86ca95ff79d7ec1e2 |
|
BLAKE2b-256 | d597172dccafc91b36fca45c967d52d11deacec09eb8cc1771f8a778ac9927bb |
Close
Hashes for pyresidfp-0.5.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6e3f74368a42eed1181f96fae425e8c6cf874553e2c4e11a79303574848d62f |
|
MD5 | 0d24503058c0554a37bb710dca818179 |
|
BLAKE2b-256 | 797bf4d3a45690797017d139cde73ddc41751dd09af3f61022008543d37c17df |