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.0.tar.gz
(73.9 kB
view hashes)
Built Distributions
Close
Hashes for pyresidfp-0.5.0-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d06b1b30d4b5214140be3c9c489eb0f7741c1ce434597efcfbc8652e4772b56a |
|
MD5 | 62939dadca0695376be43e2cc0e84260 |
|
BLAKE2b-256 | 798dd50a5e7e9bb191df859244c09fda3f370da66677e13f44dd74c52ce7576b |
Close
Hashes for pyresidfp-0.5.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd46162e67577536c344d74e671a273ff118a52de1f9a3f15329005bbd5b6dfe |
|
MD5 | 6b4e5710eb14a9ad0d6c10cd3bd44c0d |
|
BLAKE2b-256 | 841233388958c9d38fba292ddf9cadc117b55167e14c4aa51dba9eeccbc06224 |
Close
Hashes for pyresidfp-0.5.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b40ac9ee61340bc9ef0721c14b216086f0bf31d6280eb5737f325feb660da16e |
|
MD5 | 890edc9269cf75f98eecc54966f0cac4 |
|
BLAKE2b-256 | 3adf4be4a31edbd578bf52a310ef8f8a0e7e9d9e6256268ff526a5ddc51b48d7 |
Close
Hashes for pyresidfp-0.5.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 250af98531783b5e3e7ba86795029b3c735f0aae5faa5968f9363e206df5e85b |
|
MD5 | 864ddfa7fd6edf1d1bf9cdbc05d7c85e |
|
BLAKE2b-256 | 64b6061247f4d6bc57ea7a26e8994f8bdf9153e9c88295fb7b1bcae78cff2851 |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8501a3a5fe939fdaf969c5cd12ee907e7c5d1d6c514ed0586acadded3a81ebd6 |
|
MD5 | 2d5c61dbef18e909961f63f7edc99aca |
|
BLAKE2b-256 | 6f1ea053825b1f593fe478a54e28a657eadd02cd4ec6d7b978bff47728dfd791 |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2761d912268f6dd290200c041a7b4c9e01ba11da7622c5948181bd306d8f13d2 |
|
MD5 | ad97343daabb4cb81444f2b2c8900450 |
|
BLAKE2b-256 | 86b5f0f00a27fea3c4358796d23a61d5ab4d7ef95fb8974592385b310231090f |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a10aabadd768dd67eff96ad9b692fc9fe2d6ffb079844e6cfa54ad8a61feeb65 |
|
MD5 | 85fd74bf73d3cf194beb4c7b53d51c16 |
|
BLAKE2b-256 | 8f92e93ec67f55fbd560e43b1d8318e44be95c22eafab4e56838b9c274d32e15 |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 134ab69fa30addb25eabc7597ffbb06199059619c169891b2e76c8392d4c242d |
|
MD5 | bfcfd3b4240cfd99f053a8d7a7c36d5e |
|
BLAKE2b-256 | d4c09cd0d627f5394b986a82e67aad531f9e83d3282e142dee3c083bef825f0d |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe41a4a7459e488d510ca8df75a6386337dc37a69456bdefc1794364c3023350 |
|
MD5 | 1e417092fd96ca40fdb34246d546d63e |
|
BLAKE2b-256 | 18bbf6f21aee63be16d83b59b3f52917daad9cf668991dc0a8fcf439065e61d4 |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d43de597916ed9716c6b352a2770f9f04d6858a9409959b3273d7afca0940ae |
|
MD5 | 25adfc08ac3f567bd08cbade2779de14 |
|
BLAKE2b-256 | 76915d8c11c0eebe6ed0532910823e925939cde3f3b01d60de43b4b8f1b109a9 |
Close
Hashes for pyresidfp-0.5.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 609460b7b220a462b1c836c310dc22b1602701b16fbb9300bad27527b9f17df5 |
|
MD5 | 0b3e3580e05285864b2e3eca59761167 |
|
BLAKE2b-256 | 9cb502bd0bde83dab5e245c6552052d4d564d1b081fdf0eb9f3b66a9a851f919 |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5a47e7e66c3e40a01486402dba44b0eee5bfe84d13f516d7cee85fa2f56b727 |
|
MD5 | 6426670f6aaa31f8aa4d62b54b6477eb |
|
BLAKE2b-256 | c35e1a181f094864e31d9c9fad9546c8537f746f175c42a43cb45e508d402e99 |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6be859317f31a81cd7112b10819ffaa5f9f93b82313d6fde48a77e9d478a1006 |
|
MD5 | 2bf0fc12eb241794d4a73bcc10e8c7a5 |
|
BLAKE2b-256 | c11c123b766943c8b56441094d80f456471d5696c717326f865892c9e00ada9c |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae232fb3fd422f75b703522346d2deecae35ec77f905d1174fb63394d8ae0846 |
|
MD5 | 151886885a8acda56b2643727234c175 |
|
BLAKE2b-256 | 2c138bfdeb06f6a56a9007506a421d691767c521553bf1e094fb23e797a85cf9 |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ade5765d8cfa346d1b6b324f40a2ec5869eccb9ac4b594c75b0c061eb93437f3 |
|
MD5 | c9bcf56cf2cde55ea188720ad61bd4cb |
|
BLAKE2b-256 | 0673be380bba48510466322f889131b928f97af1c4155afe702ac5894b5ebbc8 |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c9aece4fa27387ba20ab11b0b32965b8ef8b21747904d24d3f4aaaf20cf4c4 |
|
MD5 | 368da7f03a80ebcc55c30eab399da03b |
|
BLAKE2b-256 | 8f393c02ec92664a3223fad5bb8dd6e2128be8aaa595bf3f21bbf00fa942fc55 |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 812426057213cce5401006512c09cb538f1504ded9d2fbe0efb268dd9c31a542 |
|
MD5 | 715548ad427d21cdd98803fd37c4bcce |
|
BLAKE2b-256 | 5387e30b580863afee9f267911067fb87d3517d9cf047bf5374114fe84227eaa |
Close
Hashes for pyresidfp-0.5.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f035bacccc10c0db4bf521a643206d6d2989b1ebd6db00d267a6f1c61e62283a |
|
MD5 | 40f96730f6e66959dde11a3dd06ee4e1 |
|
BLAKE2b-256 | c28bf1b509dcb31edfd82ee9de332f921045376c8d70a74894a47d0404bcd254 |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d383f2f7c269fa2194120562bc636ee4089bd862e9936241f6a770b22c58a16 |
|
MD5 | c48d201214a1b2a3e2358f290880e50b |
|
BLAKE2b-256 | 9739fb925303e0d47d24fc398bd02568104452651b40c3a21ef05ebc37c2bd63 |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b92e17dc82201dc76f1c4d344892dc54a4fd1601f8f61e12670c501621f5341 |
|
MD5 | ea1cf0625d2f0198fd58a8b5f92a9b3c |
|
BLAKE2b-256 | f8fbc1794f5a4711208a531409f0cfc6e7c7fbac7b190d4544a11d7fea008616 |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdfc2f6a02a15a8ea29a65646dea76e44424353ac5a3180e135438750bbdfeeb |
|
MD5 | fe85da9177eb32999817118e19293af1 |
|
BLAKE2b-256 | d7a92dcd77e52751ba94777de6a0e541ad2cc918683af88e0e2fed586ce9641d |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2ecfeddd395b1438b4f24220abe29991bf869a4fb5131c262239f40eba36994 |
|
MD5 | 46043821058d2d8e6ad94c6f0d416300 |
|
BLAKE2b-256 | 76baef3f754e88a89c2932056270e2d7c8fcfee53c02ccfc551904ade2e08abc |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e838a198d591641b29691780d6cf3e1e17915f6d6fc36fea87ff6ab7e3ed5428 |
|
MD5 | 5528ba3c2323bbac6c52b285bcce7672 |
|
BLAKE2b-256 | 2d92bc69dcfee46a8598042d3616ffb1c1028c22d609cda2801aff3e82467ae6 |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e850ad0e95416e2eecbd2589e23572972f9b329a16aee54029fc15aca71ce76 |
|
MD5 | 0aa929712f3c4c8e76adf61394323e30 |
|
BLAKE2b-256 | 1401f5d79e8d89435678bd33d5f7298d7443b740956b3a88267f4a0ba7b36ace |
Close
Hashes for pyresidfp-0.5.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d2119dc2837e42adca7a4e44cbe0096122ce6f5d9465416a88b6315c7fa89fb |
|
MD5 | 3c0d58738a10b957e257ce6170eeb401 |
|
BLAKE2b-256 | 01b9b7fe9cdec4613b4ccb8599221eef4b40df06bf3b80de3516e857012a323e |
Close
Hashes for pyresidfp-0.5.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0860d4cdd5cce42a6212d37f14daefc65292b768a356be0d4390fe879e06007 |
|
MD5 | 6957f920ca87e18809abf42199ca925c |
|
BLAKE2b-256 | 98065e176cf362ac9d7f56c54bdf8bdf61e089f5c8107bc5af1477a2dcc0dcbd |
Close
Hashes for pyresidfp-0.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c784fbcb7d6295089a2b14a494c5585f4e947ed38ee0455d8b78a38d4f9d988f |
|
MD5 | 3b1df42e2e8fd72385f75cb03e49d52a |
|
BLAKE2b-256 | b0e857549dfce986ad9321cf4c551ed16df37a3441d75b38b9d63f4b4e0b13b9 |
Close
Hashes for pyresidfp-0.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcfb28e4a7b42bc964fbe37f7dc2af34bd55954af2a2a28d249788a8c776ba5f |
|
MD5 | 1bd619f33bd7a8a3ef5dc5c0b83f1826 |
|
BLAKE2b-256 | 864ce512c20d8d891a4984076fe2b2e38814d838a504f6f4739e0f7f4b910346 |
Close
Hashes for pyresidfp-0.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 692751ceaa6c733878678266ed68484cff4371b54c44a77ce91be47f1e638289 |
|
MD5 | c0df132ea3d1b449f31f0fb8010f2987 |
|
BLAKE2b-256 | 2770d8843fd7b28576bddbcd64834d3a1afd412f41ee5c68dbe918a401d53412 |
Close
Hashes for pyresidfp-0.5.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ffc2ca13dfa4763fcb9257aea317dfa9193f8a62e6c2419ec08722d9ac42f0a |
|
MD5 | c7f5d9b2c9512e99f0bd757dc693e334 |
|
BLAKE2b-256 | 56964fb6586f1952e082ab1c35e03c7bbf794f49eff69bdc094143e1783d1fb2 |
Close
Hashes for pyresidfp-0.5.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fd29e62fbe35930c853e8eb75753415152a0088cf974f3ac982266672b66da8 |
|
MD5 | 98a1fe06f5e71c9b42083f3b5569b1d5 |
|
BLAKE2b-256 | 6b662406ccd74e7124377a91a38d1f136295ea2a217cb129ae0d8284cafefba0 |
Close
Hashes for pyresidfp-0.5.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c31188b6a4cfa8972cecc0347ab54fc53b56f231c12d6e6ce014dc1edb848ef5 |
|
MD5 | 0e9e4bed31db9885f6fbe2d3324df5a6 |
|
BLAKE2b-256 | 34dc45dd2512cc09a6c6f9ac5987f4908e0c49ab8e035026937a253224d9eb6e |
Close
Hashes for pyresidfp-0.5.0-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9276ca420b8302e52391b0df683911bbd9de8a126a9589b59795d186cfa0c217 |
|
MD5 | f03ef24e8a277dc076cf6b71a25c1a6b |
|
BLAKE2b-256 | 668b1a7a37a61a98595ba520725bff322058a79d4c4b88f1380e874b093c8267 |
Close
Hashes for pyresidfp-0.5.0-cp36-cp36m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6e77228083a457b848a201823eb5cf91962e94def0901b35a4d954e51b38dff |
|
MD5 | 3ee0c15ea1c51da50c862a2fb1b07bd0 |
|
BLAKE2b-256 | 75997028c86ddba33ac03c8433e8b2a70c9bbc293345b4d327b2ab1c346041ca |
Close
Hashes for pyresidfp-0.5.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e447a2e522c2c05e94c8f1b81b85c7d5aead60ba901dc2b497db96907b939c88 |
|
MD5 | 96c8beaeff0bd2cdbbc5524ae7cd4d2a |
|
BLAKE2b-256 | ba3171803587b976e6a290f0d8c998d61970e18d085ea42a84aabc62cce52cc5 |
Close
Hashes for pyresidfp-0.5.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99bd6b068f9f61c07263b2e59b5c39dfa70c9b0d6165f175bf5aeb10409976a0 |
|
MD5 | 49566bfb9bbf3b0ba1a66c3ae24f12f2 |
|
BLAKE2b-256 | e1cb6203b9a8deb5365e6b89da1751ba78dfd4fd61e678174edea9bd6953c2da |
Close
Hashes for pyresidfp-0.5.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea87c568ba461822af60df74c310e9e701765c6516932d18d040333238d54a57 |
|
MD5 | 86b1757c21e97b33a3b275d8efc5717a |
|
BLAKE2b-256 | cd55ada0a174d8eb7297f93040726f8d1110d6d7c1ec52183d6a24a8a855ee49 |