{"id":17788839,"url":"https://github.com/moebiussurfing/ofxpatchbayparams","last_synced_at":"2025-04-02T00:44:08.808Z","repository":{"id":109378794,"uuid":"390214808","full_name":"moebiussurfing/ofxPatchbayParams","owner":"moebiussurfing","description":"OpenFrameworks add-on that allows you to quickly link ofParameters\u003cfloat\u003e pairs. (Controller \u003e Target)","archived":false,"fork":false,"pushed_at":"2023-07-30T06:53:08.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T16:19:34.998Z","etag":null,"topics":["openframeworks","openframeworks-addon"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moebiussurfing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2021-07-28T04:39:10.000Z","updated_at":"2023-03-05T02:02:15.000Z","dependencies_parsed_at":"2024-12-14T16:40:37.647Z","dependency_job_id":"81053cae-b4f8-481c-8f77-e4aa1eed832e","html_url":"https://github.com/moebiussurfing/ofxPatchbayParams","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxPatchbayParams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxPatchbayParams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxPatchbayParams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxPatchbayParams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moebiussurfing","download_url":"https://codeload.github.com/moebiussurfing/ofxPatchbayParams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735350,"owners_count":20825223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["openframeworks","openframeworks-addon"],"created_at":"2024-10-27T10:24:17.712Z","updated_at":"2025-04-02T00:44:08.790Z","avatar_url":"https://github.com/moebiussurfing.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ofxPatchbay\n\nThis is modified version by **moebiusSurfing** from https://github.com/e7mac/ofxPatchbay.  \n\n* Removed all input controllers (keys, mouse and MIDI).  \n* Added new ```ofParameter\u003cfloat\u003e``` controller.  \n* A simplified API.\n\nThanks @**e7mac**!  \n\n### Example Code:\n\nofApp.h\n```.c++\nofxPatchbay patchbay;\n\n// controllers\nofParameter\u003cfloat\u003epController0{ \"pController0\", 0, 0, 1 };\nofParameter\u003cfloat\u003epController1{ \"pController1\", 0, 0, 1 };\nofParameter\u003cfloat\u003epController2{ \"pController2\", 0, 0, 1 };\nofParameter\u003cfloat\u003epController3{ \"pController3\", 0, 0, 1 };\n\n// targets\nofParameter\u003cfloat\u003epTarget0{ \"pTarget0\", 0, 0, 1 };\nofParameter\u003cfloat\u003epTarget1{ \"pTarget1\", 0, 0, 1 };\nofParameter\u003cfloat\u003epTarget2{ \"pTarget2\", 0, 0, 1 };\nofParameter\u003cfloat\u003epTarget3{ \"pTarget3\", 0, 0, 1 };\n```\n\nofApp.cpp\n```.c++\n// controllers\ngControllers.add(pController0);\ngControllers.add(pController1);\ngControllers.add(pController2);\ngControllers.add(pController3);\n\n// targets\ngTargets.add(pTarget0);\ngTargets.add(pTarget1);\ngTargets.add(pTarget2);\ngTargets.add(pTarget3);\n\n// define controllers\npatchbay.addController(pController0);\npatchbay.addController(pController1);\npatchbay.addController(pController2);\npatchbay.addController(pController3);\n\n// define targets\npatchbay.addTarget(pTarget0);\npatchbay.addTarget(pTarget1);\npatchbay.addTarget(pTarget2);\npatchbay.addTarget(pTarget3);\n\n// initialize\npatchbay.setupParameters();\n\n//-\n\n// disconnect\npatchbay.disconnectAll();\t\n\n// connect\npatchbay.link(0, 3);\npatchbay.link(1, 1);\npatchbay.link(2, 2);\npatchbay.link(3, 0);\n```\n  \n![image](docs/Capture.PNG?raw=true \"image\")\n\n---------------------------------\n\nOpenframeworks addon that allows you to quickly and easily plug various controllers (MIDI controller, audio, mouse, keyboard) to parameters that you can define in your code.\n\n## Usage\n\nLet's say you want to control the size of a rectangle that you defined somewhere (`ofRectangle rect`). Register a lambda function with the patchbay, giving it a human-readable name. The closure should accept a parameter `value`, which will be a `float` in the range `[0,1]`\n\n```\npatchbay.registerControllable1f(\"rect-size\", [\u0026] (float value) {\n    rect.setHeight(100 * value);\n    rect.setWidth(100 * value);    \n});\n```\n\nNow you can connect the x-position of the mouse to the registered parameter:\n\n`patchbay.connect1f(\"mouse-x\", \"rect-size\");`\n\nYou can disconnect them like this:\n\n`patchbay.disconnect1f(\"mouse-x\", \"rect-size\");`\n\nAnd hook it up to a MIDI controller:\n\n`patchbay.connect1f(\"midi-cc-10\", \"rect-size\");`\n\nOr even audio:\n\n`patchbay.connect1f(\"audio-rms\", \"rect-size\");`\n\n## Installation\n\nDefine this object in ofApp.h\n\n```\nofxPatchbay patchbay;\n```\n\nAnd add this line to `ofApp::update()`\n\n`patchbay.update();`\n\n## Dependencies\n\nUses [ofxMidi](https://github.com/danomatika/ofxMidi) for MIDI controller input.\nUses [BlackHole](https://github.com/ExistentialAudio/BlackHole) 16ch as the default Audio input. This can be changed in `ofxAudioInput.h`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoebiussurfing%2Fofxpatchbayparams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoebiussurfing%2Fofxpatchbayparams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoebiussurfing%2Fofxpatchbayparams/lists"}