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.1.tar.gz
(77.3 kB
view hashes)
Built Distributions
Close
Hashes for pyresidfp-0.4.1-pp37-pypy37_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abc7a1486a728cbe0324be15c84c819624f98088d4f311a25a91fb5ee463a0d3 |
|
MD5 | eee0eed5bcb34d67f19e57dad9ec4b22 |
|
BLAKE2b-256 | d5d433bb3004acd0e5272affe997b4f542b0503a5dfb9f49c34f364b91c7f91a |
Close
Hashes for pyresidfp-0.4.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e672e7835d6a9aa5d7b8b80a472c74531801a8324a1b4b13f5c5610b1025ed1 |
|
MD5 | 5053ea5e6ccf09521da01299dbf0c0d0 |
|
BLAKE2b-256 | 442756faaf6532c2416fb5e7c770f59abf970478c2bdcbe41bd7815bfa2805f9 |
Close
Hashes for pyresidfp-0.4.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a098befa97ba4d7417cd2a85ddd2c8502cc7606ceb8e5a1cfd67170b5797023 |
|
MD5 | 17c91fbd4e93bfdcae26d294a8854d0d |
|
BLAKE2b-256 | ab9b9e109c2369e836be9099efd574d41cb531004c94e8cf1a4c90f190a07e9f |
Close
Hashes for pyresidfp-0.4.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb77360dc0fd0b64c843253b837ea1af3f5d755b8f1f56f9586f8cfaad29e4e1 |
|
MD5 | 74e898c03269044cb2e46c978779f6d9 |
|
BLAKE2b-256 | c40d8f08414b61b2ddc1799f1950eae74cabb73ebe8a1b76f163c1b0c1f59ad3 |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33feb050ab48dd184056471477f719ffbf9a0df6c160442eb6390a78ede8b602 |
|
MD5 | d521991d2cc4fc2b6f7dcccbdc43b075 |
|
BLAKE2b-256 | e2108caa9ae932e4f685dd5bceed4c55283bfdb74c38130ee67907aee0e0b698 |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0abedc89fc5532239f4da86517ae4dbb5a825eb2236a4cdd4c32ec76009c741 |
|
MD5 | b26cacbe1bacf1474cc58a48139dc50b |
|
BLAKE2b-256 | 04cf725f87f0332304a76f376dd5c211a56720715062e7bd88bbf5b8cd999d81 |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bb5865b703b05b0446d8edf9be42d53c9638f1e3402b785ae3e46e5700a8038 |
|
MD5 | a0e65dfad1a5cb6b9279a0a174f35e12 |
|
BLAKE2b-256 | 4721870bfd9cc31595639ec218ebdf5be7a91b041748d47113f57bd9f56c1e5a |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c27d160227c085522feb3a3325872e1cdff813f9d355c2ed76c628daa86d4f83 |
|
MD5 | 4645c882cf71f6557e175094516b1387 |
|
BLAKE2b-256 | 71cce03032dd9a9f4e148ea9b5fe9a978e23920a43b8f7ffa562c07aec6722bb |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 672f6af8b019b09bcb923b061365014f29b2e54c1aecf6ef0e0171a1859179cf |
|
MD5 | fbf41febbea6d8d5fe7e5295c4310702 |
|
BLAKE2b-256 | 5e79a58a686d87ef1ac1a435382c4fb23799f3f77ba6145e8d49453a2c4a073d |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed38581d11169fd8deeb0583763301684268c97c3bfff228c128090c38eb2b56 |
|
MD5 | cd5fb5f373701ccd9f2642ab09d811bd |
|
BLAKE2b-256 | 936b15885f20d477e88387a9c422ae654a3a50da2b116365da76dac19820a027 |
Close
Hashes for pyresidfp-0.4.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b54374ce25ab0a9b673c39eb662de7f3530ab49aa523e847ef524d9efc2707c |
|
MD5 | 607b95be43da0858a9d997473c9725c5 |
|
BLAKE2b-256 | 1d0bd60b940d64b7eaca6172e765ae5db526d28dcb822fd5aea07ad3829575b6 |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdf1782d8b913a236d801a95003899532c95054066d8ab8fe93b3b117478cf87 |
|
MD5 | 2c77bacccfaeb7211451f8f1102f9af2 |
|
BLAKE2b-256 | de24b5d2afd2b1567b1f7ce7f507b63fcb47baa7f347e3b3a8356c1a2fef9b05 |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f71d9e60d1ba0e6cc76ba05d40da9e86dcefc60205b80db40efe7654b5279fc |
|
MD5 | 96a5b8c5c23dd72c8e2832d46d13208b |
|
BLAKE2b-256 | 3dd9a78ece524192d9c98b8aabc3a76aa4f4cd479161614e5ff26d24bf6979c3 |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf28020c406262e6a9e678be77caa1657070e216d8cc9aee3b9105341e514151 |
|
MD5 | f75a7a732730da771d02304be2acbdcd |
|
BLAKE2b-256 | 955bdd86d702c5a910aad387e974635726688838856fbf6308dcff5fa33d6d9d |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7b1d3715ae98fc4433782e6bc11b3c2e0f80e1ffc97b95a91dcb0946fdd5e9 |
|
MD5 | b54464adb1ae0eba6ae65f71f952c2f6 |
|
BLAKE2b-256 | 7e1ef2e740076818425d6628c21143b9008c39c91284848661a5d919c6d04f42 |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bcccb4f0788e23a90acb38ce36c58d79e8e2dd6083e0563b4201f311f1f3e39 |
|
MD5 | 204c4ea185fcb9058fadef3552b26f36 |
|
BLAKE2b-256 | cfbc65dbe2cd647eeba825b23316b987e21e5f8824d8166c86ebd25386354d08 |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec2a8ad7ebd4c0c43c734bcf96819b8ce8d174fa549c978a06061bc2e76c326f |
|
MD5 | 44b09515bc3696b339c105ff0efce035 |
|
BLAKE2b-256 | 2643ab0e7b2634ccd4c4f2ea0f7f637d6e692770f4dd2443a5b65f2bdc59e251 |
Close
Hashes for pyresidfp-0.4.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18603f996b20ab8807a29fe30b296adab9b0254161a190d9a7b998180deda9b6 |
|
MD5 | 93b76e9c360e219fd7a21d8da84163d2 |
|
BLAKE2b-256 | e1c70fab5fe548daddf744bcd897c4cd7209ddf5e6a6931a5a902e072ab92ce3 |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8ef384192ca9b8b927d33d6f7b49bebf5f832bfa78170c24f70daee0064fcd |
|
MD5 | 4b1612fa7e9d6db9bd505b1600c75919 |
|
BLAKE2b-256 | c58a791a31bb208a4c720c0bf3b93a0b82b573e0eb4b7ab5a1d2f9c7cc085a55 |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28ff01609135b29bb241fc4393b99b0a33713a49b0bcf6c893818256eee8a2fd |
|
MD5 | e36910bca2d6a8374c53ec0365ba6f83 |
|
BLAKE2b-256 | b81fecf50c7cc38409b1eba39b17a36e3abf3041e4b18ab7c6e78befe0f4f508 |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd26ea55cb4aaf9cf3af229ab65afa0df9e11829c4e3ef4f71872714195de57e |
|
MD5 | 3db7cf2d59279cbd2a719189931736b1 |
|
BLAKE2b-256 | bee5f7514ea1dd0829aafda1806d3181449739439b700c8d5fa0cf59e38dc4ed |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a280628c422c6874dd184a3ef561fa468e8cda6253cade6b9adac64f062040 |
|
MD5 | 6ebc30d03223fb9448f59946a469fe57 |
|
BLAKE2b-256 | 15f723068bc22a64ce0c9185514f61b821ec2e5c6e7cbae82fdd6117b1af4923 |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f9f244f90f2e0b190c55d5d489b6f901c270555367755aadc34c29dd93bc4df |
|
MD5 | 6607bab0ff3e9b4d24025982056fb0de |
|
BLAKE2b-256 | f86913a700592cb39ba42517fd72b17685aa46e80c8dc23bcc22fd450dfa8ea8 |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 698ac87198bd27c382984af9034d0e715b8b8538a4c33d0aee8b677966d57430 |
|
MD5 | aa48e9136ca676498fc7d114279d243e |
|
BLAKE2b-256 | 54ffc4d634c07101552026d1bdfca0f460e2869db5002c90ba73cae0318b4592 |
Close
Hashes for pyresidfp-0.4.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c85565860f7941402ae67364fc4f30da725b97773b914275343cc8c1e19f243 |
|
MD5 | a80910c7b3734c71288362e4df076183 |
|
BLAKE2b-256 | 4398d25aa9dbbe7451b29389e8aaca364fbc68c70aaede42d68a5a86a6bafacb |
Close
Hashes for pyresidfp-0.4.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d40883724d34fb63459c8de768643f1e55cd663a50a826724963d844252980a3 |
|
MD5 | 7e16e7dec8b42a64a8aeed0755aefe76 |
|
BLAKE2b-256 | b58d5f5242c3b8415ed9aaeecb12c5b80484be6d9519ec8273c91eb8cbfb7204 |
Close
Hashes for pyresidfp-0.4.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6178261371dd93b23d1cc96e7ea43b99349652dcbf96f255db8720f9cac23e9 |
|
MD5 | 53118cf71a1fc8ed2e47f0a78dc39006 |
|
BLAKE2b-256 | bf1f72738c30bc708d8291cbd92f296d74ed94dfd6732357d425773795861669 |
Close
Hashes for pyresidfp-0.4.1-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4c413cb4e0009768f582dfde7f6117d4e6f7bc3c3ac8b75598f2bdf9d2376c9 |
|
MD5 | 76bb9469e68dd8619e27e4fb0333bbcd |
|
BLAKE2b-256 | 123c5f980998b69fe07a568a1e5588a399bf6f6437b48861b9beab7ac77148a9 |
Close
Hashes for pyresidfp-0.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d86fc1cb97c66d95c8f11c814cc90545e99cce83169b062357e373dd022169a9 |
|
MD5 | b4b12ea62e265c9ba74ae8ef40543710 |
|
BLAKE2b-256 | fdb7d8e5a5ce170108d506b6562d1ea531660825fa1a572ef3a6ad35457d5d79 |
Close
Hashes for pyresidfp-0.4.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc50fc31cddabfc78d445b106cc9fc1df13c481198939f40195d12151704c374 |
|
MD5 | 0c377784b57949ac1d464180b96f26a7 |
|
BLAKE2b-256 | 0b0527e809d85712401dd2996e4be643495f58f27a976fd05ec28bff55d97377 |
Close
Hashes for pyresidfp-0.4.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 329bd96ae5d066e70d2ffacf7d279f390702b0d1da938d3289f0b9321dfafd9a |
|
MD5 | 80bc1abeb127a0ce883fcf61776682ca |
|
BLAKE2b-256 | 44e61eb05ac9d7f39d2bf653d6946daadc6ddfd66cb2b3ba268e4256959d9778 |
Close
Hashes for pyresidfp-0.4.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79ae73d9d01d576b1ddf32ea90d3bf2587fe5b89aa8b62cc91ef6109aef68434 |
|
MD5 | b9cdaac40196a8eef143a938184ae6e5 |
|
BLAKE2b-256 | 90a610e47a6d760d5306178c790bb66ac1d634ea162ed9992963f5ccf41acb43 |
Close
Hashes for pyresidfp-0.4.1-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e65162498c9aded9f139bcd03d4d85738341defe4471452ae4712c4c9beacbd |
|
MD5 | 3d589093234836342b9096ae7d51197d |
|
BLAKE2b-256 | 6c5daf33ed64172df9c13a6d16f0068be53063df90bce5e77efd6bc5ea75cceb |
Close
Hashes for pyresidfp-0.4.1-cp36-cp36m-musllinux_1_1_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152f9934584af8c185c6c43c3c1a6c7d3e55cf00ecb28dcaeb355ef8b3197769 |
|
MD5 | c149a869a8bcc0f9d3fefbe1df1aa10d |
|
BLAKE2b-256 | ed125f0243c83a11a0a1af1d1440ab6f51dcf101cbabfb511cbdae0ee37fcc90 |
Close
Hashes for pyresidfp-0.4.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23857304fff933d3e4d06a30a6526305069db4cfc74316331ef12223a9b3c5a2 |
|
MD5 | fba5aa7beb2257f06553ecb708b0a03e |
|
BLAKE2b-256 | d38612dfc4254b791038a44609e1e778078e0fe0a20e6025637c3925065ebdef |
Close
Hashes for pyresidfp-0.4.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c92531af56c6b46245226c1ef00161849c7e15ba487fede51ed87c5b61c3bea |
|
MD5 | 91bf3ed7d6607462c24a69c9f74acc88 |
|
BLAKE2b-256 | 00d098fa53f12e12c743b9719b8a24806334119c565c0831122e3f0d43848d58 |
Close
Hashes for pyresidfp-0.4.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71dd23c601bee76dbba0348c125ab3b2b0f2472d1ecd592fd0543fc3b38472e8 |
|
MD5 | 69a4357027de9548f0f725b86edb04d0 |
|
BLAKE2b-256 | 322a684b4e9c8748dbbbd6c142edf4b3a3ed8bd80d21fb0f64f13fb5509fd62c |