{"id":17502096,"url":"https://github.com/itstorque/performer","last_synced_at":"2026-02-27T13:09:16.754Z","repository":{"id":77107625,"uuid":"483803939","full_name":"itstorque/performer","owner":"itstorque","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-23T03:41:27.000Z","size":4109,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T05:45:23.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itstorque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-20T20:29:37.000Z","updated_at":"2022-05-14T13:46:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a049df5-7879-4e4d-adb0-200d21bdc463","html_url":"https://github.com/itstorque/performer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itstorque/performer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2Fperformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2Fperformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2Fperformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2Fperformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itstorque","download_url":"https://codeload.github.com/itstorque/performer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstorque%2Fperformer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29896315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-19T20:37:38.037Z","updated_at":"2026-02-27T13:09:16.713Z","avatar_url":"https://github.com/itstorque.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Peformer\n\n### Simple Additive LFO\n\n```python\nfrom performer import *\n\naudio = AudioOut(output_device=1)\n\nout = ADSR(OSC(f=261.63) + OSC(f=329.63)) + OSC(f=392.00))\n\naudio.attach_voice(out)\naudio.stream()\n```\n\n### MIDI Keyboard Example\n\n```python\nfrom performer import *\n\ncontroller = MIDIKeyboard(midiout=True)\n\naudio = AudioOut(volume=0.1, output_device=4, controller=controller)\n\nF = Param(200)\n\nosc1 = OSC(f=F, volume=1, type=Sine)\nosc2 = OSC(f=F, volume=1, type=Sine, fmul=0.66)\nosc3 = OSC(f=F, volume=1, type=Sine, fmul=0.33)\n\ncontroller.attach_freq(F)\n\naudio.attach_voice(osc1 + osc2 + osc3)\naudio.stream()\n```\n\n### Face Detection Theremin\n\n```python\nfrom performer import *\nimport cv2\n\nfaceCascade = cv2.CascadeClassifier(os.path.dirname(cv2.__file__)+\"/data/haarcascade_frontalface_default.xml\")\nvideo_capture = cv2.VideoCapture(0)\n\ndef control(controller):\n    # Capture frame-by-frame\n    ret, frames = video_capture.read()\n    gray = cv2.cvtColor(frames, cv2.COLOR_BGR2GRAY)\n    faces = faceCascade.detectMultiScale(\n        gray,\n        scaleFactor=1.1,\n        minNeighbors=5,\n        minSize=(30, 30),\n        flags=cv2.CASCADE_SCALE_IMAGE\n    )\n    # Draw a rectangle around the faces\n    for (x, y, w, h) in faces:\n        cv2.rectangle(frames, (x, y), (x+w, y+h), (0, 255, 0), 2)\n    # Display the resulting frame\n    cv2.imshow('Video', frames)\n\n    if len(faces) \u003e 0:\n\n        (x, y, w, h) = faces[0]\n        \n        controller.set_param('freq', x)\n        controller.set_param('amp', y/500)\n\n    else:\n\n        controller.set_param('amp', 0)\n\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        pass\n\ncontroller = Controller(control)\n\naudio = AudioOut(controller=controller, output_device=2)\n\nF = Param(300, 'freq')\nA = Param(1, 'amp')\n\ncontroller.attach_param(F)\ncontroller.attach_param(A)\n\nlfo1 = LFO(f=F, volume=A, type=Sin, fmul=1)\nlfo2 = LFO(f=F, volume=A, type=Sin, fmul=0.66)\nlfo3 = LFO(f=F, volume=A, type=Sin, fmul=0.33)\n\naudio.attach_voice(sum([lfo1, lfo2, lfo3]))\naudio.stream()\n```\n\n\n### requirements\n\n- numpy\n- sounddevice\n- matplotlib\n- soundfile\n\nYou also need to install `libsndfile` from a package manager like homebrew\nusing a command similar to:\n\n```shell\nbrew install python-soundfile\n```\n\nNote that if you face an error similar to this, then your soundfile install is weird.\nThis workaround is M1 Macs.\n``` python\nTraceback (most recent call last):\n  File \"/Users/torque/Library/Python/3.8/lib/python/site-packages/soundfile.py\", line 142, in \u003cmodule\u003e\n    raise OSError('sndfile library not found')\nOSError: sndfile library not found\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/Users/torque/programs/performer/performer/__init__.py\", line 13, in \u003cmodule\u003e\n    from .audio.audio_out_file import *\n  File \"/Users/torque/programs/performer/performer/audio/audio_out_file.py\", line 2, in \u003cmodule\u003e\n    import soundfile as sf\n  File \"/Users/torque/Library/Python/3.8/lib/python/site-packages/soundfile.py\", line 162, in \u003cmodule\u003e\n    _snd = _ffi.dlopen(_os.path.join(\nOSError: cannot load library '/Users/torque/Library/Python/3.8/lib/python/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/torque/Library/Python/3.8/lib/python/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Users/torque/Library/Python/3.8/lib/python/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/usr/local/lib/libsndfile.dylib' (no such file), '/usr/lib/libsndfile.dylib' (no such file)\n```\n\n`libsndfile` won't work out of the box on M1 macs. To fix that, you need\nto add the homebrew path to your PATH. The below command has some security\nconsequences, but is generally okay and should fix the problem\n```shell\nexport DYLD_LIBRARY_PATH=\"/opt/homebrew/lib:$DYLD_LIBRARY_PATH\"\n```\n\nThe alternative would be to manually install the `libsndfile` library\nin the default `/usr/local/lib` homebrew used on intel macs.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstorque%2Fperformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitstorque%2Fperformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstorque%2Fperformer/lists"}