{"id":17788862,"url":"https://github.com/moebiussurfing/ofxsurfingrandomizer","last_synced_at":"2025-04-02T00:44:10.409Z","repository":{"id":41039849,"uuid":"369933839","full_name":"moebiussurfing/ofxSurfingRandomizer","owner":"moebiussurfing","description":"Randomizer explorer between minimum and maximum ranges for ofParameters and int index with probabilities.","archived":false,"fork":false,"pushed_at":"2023-05-04T05:01:09.000Z","size":29682,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T16:19:37.562Z","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":"mit","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","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-05-23T00:53:22.000Z","updated_at":"2022-06-28T08:58:11.000Z","dependencies_parsed_at":"2024-12-14T16:40:46.055Z","dependency_job_id":null,"html_url":"https://github.com/moebiussurfing/ofxSurfingRandomizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxSurfingRandomizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxSurfingRandomizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxSurfingRandomizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moebiussurfing%2FofxSurfingRandomizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moebiussurfing","download_url":"https://codeload.github.com/moebiussurfing/ofxSurfingRandomizer/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:24.928Z","updated_at":"2025-04-02T00:44:10.371Z","avatar_url":"https://github.com/moebiussurfing.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ofxSurfingRandomizer\n\n## Overview\nAn **openFrameworks** add-on to perform **Two** types of useful **Randomizers** for your scenes.  \n\n![](examples/1-Rand_Basic/Capture.PNG)\n\nThe Randomizers will target over:  \n\nA. The desired **ofParameters** (int/float/bool) of an **ofParameterGroup**.  \n\nB. An **Index** selector. (_int/preset/state..._)   \n\n## Why ?\n\n  - Useful to **Explore not expected Combinations** of the **ofParameters Randomizer** (A) that \"modulate\" your scene.  \n\n  - Using the **Index Randomizer** (B) you can add some \"_organic behavior_\" to your scene, switching your scene between different _modes/presets/states_.  \n\n  - A global **BPM timer** can be used to set the speed of the switching, with two different categories for stay duration (**long/short**).  \n\n  - Each allowed index (ie: from 0 to 8) has a settable probability to make some states more or less frequently switched to. \n\n\n## A. ofParameters RANDOMIZER\n### USAGE  \n1. Just pass your ```ofParameterGroup``` parameters container.\n2. Enable the desired parameters from the group.\n3. Set the range limits for each parameter to fit the random inside them.\n4. Notice that limits will be also inside the Min/Max of the parameters but independent of them.\n5. Trig the randomization.\n6. Use the Tester player to repeat randomizations during tweaking.\n\n## B. Iindex RANDOMIZER \n### USAGE  \n1. Initialize the Min-Max of your index/int parameter. (ie: how many presets/states are available)\n2. Set the probability for each index.\n3. Set if the index should stay long or short staying duration when her random happens.\n4. Set the global BPM clock speed.\n5. Pass your *ofParameter\u003cint\u003e* target index to receive the index randoms (in ofApp).\n6. Use the Tester player to repeat randomizations during tweaking.\n\n\u003cdetails\u003e\n  \u003csummary\u003eOther Features\u003c/summary\u003e\n  \u003cp\u003e\n\n- **ImGui** based.\n- Only ```float```, ```int``` and ```bool``` types yet.\n- Reset all parameters to the parameter or the range min/max.\n- Reset Min/Max ranges to a parameter limits.\n- Store/Recall a temp memory state. To improve exploring Undo/Redo.\n- Auto Store/Recall all the settings.\n- **ImGui** based GUI ready to integrate.\n- Added **Undo Engine** to improve exploration.\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample Code\u003c/summary\u003e\n  \u003cp\u003e\n\n**ofApp.h**\n```.cpp\n#include \"ofxSurfingRandomizer.h\"\n\nofxSurfingRandomizer randomizer;\n\n// A. Params\nofParameterGroup params; // group container\nofParameter\u003cfloat\u003e lineWidth;\nofParameter\u003cfloat\u003e separation;\nofParameter\u003cfloat\u003e speed;\nofParameter\u003cint\u003e amount;\nofParameter\u003cint\u003e shapeType;\n\n// B. Index\nofParameter\u003cint\u003e index{ \"index\", 0, 0, 8 };\nofEventListener listenerIndex;\n```\n\n**ofApp.cpp**\n```.cpp\nvoid ofApp::setup() \n{\n  // A. Params\n  params.setName(\"paramsGroup\");\n  params.add(lineWidth.set(\"lineWidth\", 0.5, 0.0, 1.0));\n  params.add(separation.set(\"separation\", 50.0, 1.0, 100.0));\n  params.add(speed.set(\"speed\", 0.5, 0.0, 1.0));\n  params.add(amount.set(\"amount\", 1, 1, 10));\n  params.add(speed.set(\"shapeType\", 0, 0, 3));\n\n  // Setup\n  randomizer.setIndexPtr(index); // B -\u003e Must be setted before call setup.\n  randomizer.setup(params); // A\n\n  // B. Index\n  // Lambda callback to receive the randomized index target.\n  //--------------------------------------------------------------\n  listenerIndex = index.newListener([this](int \u0026i) {\n    ofLogNotice(\"ofApp\") \u003c\u003c \"Index: \" \u003c\u003c index;\n  });\n}\n```\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDependencies\u003c/summary\u003e\n  \u003cp\u003e\n\nClone these add-ons and include into the **OF PROJECT GENERATOR**:\n* [ofxSurfingHelpers](https://github.com/moebiussurfing/ofxSurfingHelpers)  \n* [ofxImGui](https://github.com/Daandelange/ofxImGui/). / _FORK_ from @**Daandelange**  \n* [ofxImGuiSurfing](https://github.com/moebiussurfing/ofxImGuiSurfing/)  \n* [ofxSurfingUndoHelper](https://github.com/moebiussurfing/ofxSurfingUndoHelper/) / _Optional. Disabled by default._  \n* [ofxWindowApp](https://github.com/moebiussurfing/ofxWindowApp). / _Not required. Only for some examples._ \n  \nAlready included into `/libs`. No need to add manually into PG.  \n* [ofxScaleDragRect](https://github.com/moebiussurfing/ofxScaleDragRect) / _Fork_  \n* [ofxMSAInteractiveObject](https://github.com/moebiussurfing/ofxMSAInteractiveObject) / _Fork_  \n* [ofxUndo](https://github.com/moebiussurfing/ofxUndo) / _Optional. Disabled by default._  \n\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eTested Systems\u003c/summary\u003e\n  \u003cp\u003e\n\n  - **Windows 10** / **VS 2017**  **VS 2022** / **OF ~0.11**\n  \u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eTODO\u003c/summary\u003e\n  \u003cp\u003e\n\n* Add more types: 2D/3D vectors and colors. Using templates [?] \n  \u003c/p\u003e\n\u003c/details\u003e\n\n## Author\nAn add-on by **@moebiusSurfing**  \n*( ManuMolina ) 2021*  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoebiussurfing%2Fofxsurfingrandomizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoebiussurfing%2Fofxsurfingrandomizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoebiussurfing%2Fofxsurfingrandomizer/lists"}