{"id":15142175,"url":"https://github.com/todbot/circuitpython_microosc","last_synced_at":"2025-10-23T19:31:20.721Z","repository":{"id":189556865,"uuid":"680866274","full_name":"todbot/CircuitPython_MicroOSC","owner":"todbot","description":"Minimal OSC parser, server, and client for CircuitPython and CPython","archived":false,"fork":false,"pushed_at":"2024-01-06T20:58:43.000Z","size":83,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-09T22:42:08.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/todbot.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-08-20T16:58:27.000Z","updated_at":"2024-10-09T19:01:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"a87e88dc-b834-4f87-8883-391c481a5d3f","html_url":"https://github.com/todbot/CircuitPython_MicroOSC","commit_stats":null,"previous_names":["todbot/circuitpython_microosc"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_MicroOSC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_MicroOSC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_MicroOSC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_MicroOSC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/todbot","download_url":"https://codeload.github.com/todbot/CircuitPython_MicroOSC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867955,"owners_count":16555810,"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":[],"created_at":"2024-09-26T09:24:15.278Z","updated_at":"2025-10-23T19:31:20.716Z","avatar_url":"https://github.com/todbot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introduction\n============\n\n\n.. image:: https://readthedocs.org/projects/circuitpython-microosc/badge/?version=latest\n    :target: https://circuitpython-microosc.readthedocs.io/\n    :alt: Documentation Status\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n.. image:: https://github.com/todbot/CircuitPython_MicroOSC/workflows/Build%20CI/badge.svg\n    :target: https://github.com/todbot/CircuitPython_MicroOSC/actions\n    :alt: Build Status\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Code Style: Ruff\n\n\nMinimal OSC parser, server, and client for CircuitPython and CPython\n\n\n`Open Sound Control \u003chttps://opensoundcontrol.stanford.edu/\u003e`_ is an efficient data transport\nencoding/protocol for real-time performance messages for music or other similar endeavors.\nThe OSC byte encoding is designed to be semi-human readable and efficient enough for\nUDP packet transmission.\n\nOSC Messages are defined by an \"OSC Address\" (e.g. \"/1/faderA\") and optional \"OSC Arguments\",\none or more possible of several data types (e.g. float32 or int32). OSC doesn't pre-define\nspecific OSC Addresses, it is up the the sender and receiver to agree upon them.\n\nThis \"MicroOSC\" library is a minimal UDP receiver (\"OSC Server\") and parser of OSC packets.\nThe MicroOSC UDP receiver supports both unicast and multicast UDP on both CircuitPython and CPython.\n\nSince this is a minimal OSC library, it can parse and emit OSC packets with\nonly the following OSC data types:\n\n* floating point numbers (\"float32\")\n* integer numbers (\"int32\")\n* strings\n\n\nRequirements\n============\n\nTo run this library you will need one of:\n\n* CircuitPython board with native ``wifi`` support, like those based on ESP32-S2, ESP32-S3, etc.\n* Desktop Python (CPython) computer\n\nTo send OSC messages, you will need an OSC UDP sender (aka \"OSC client\").\nSome easy-to-use OSC clients are:\n\n* `TouchOSC \u003chttps://hexler.net/touchosc\u003e`_\n* `OSCSend for Ableton Live \u003chttps://www.ableton.com/en/packs/connection-kit/\u003e`_\n\nTo receive OSC messages, you will need an OSC UDP receiver (aka \"OSC server\").\nSome easy-to-use OSC clients are:\n\n* `Protokol for Mac/Win/Linux/iOS/Android \u003chttps://hexler.net/protokol\u003e`_\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython \u003chttps://github.com/adafruit/circuitpython\u003e`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle \u003chttps://circuitpython.org/libraries\u003e`_\nor individual libraries can be installed using\n`circup \u003chttps://github.com/adafruit/circup\u003e`_.\n\nInstalling from PyPI\n=====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI \u003chttps://pypi.org/project/circuitpython-microosc/\u003e`_.\nTo install for current user:\n\n.. code-block:: shell\n\n    pip3 install circuitpython-microosc\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install circuitpython-microosc\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name \u0026\u0026 cd project-name\n    python3 -m venv .venv\n    source .env/bin/activate\n    pip3 install circuitpython-microosc\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n    pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n    circup install microosc\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n    circup update\n\nUsage Example\n=============\n\n.. code-block:: python\n\n    import time, os, wifi, socketpool\n    import microosc\n\n    UDP_HOST = \"224.0.0.1\"  # multicast UDP\n    UDP_PORT = 5000\n\n    ssid = os.getenv(\"CIRCUITPY_WIFI_SSID\")\n    password = os.getenv(\"CIRCUITPY_WIFI_PASSWORD\")\n\n    print(\"connecting to WiFi\", ssid)\n    wifi.radio.connect(ssid, password)\n\n    socket_pool = socketpool.SocketPool(wifi.radio)\n\n    def fader_handler(msg):\n       \"\"\"Used to handle 'fader' OscMsgs, printing it as a '*' text progress bar\n       :param OscMsg msg: message with one required float32 value\n       \"\"\"\n       print(msg.addr, \"*\" * int(20 * msg.args[0]))  # make a little bar chart\n\n    dispatch_map = {\n        \"/\": lambda msg: print(\"\\t\\tmsg:\", msg.addr, msg.args),  # prints all messages\n        \"/1/fader\": fader_handler,\n        \"/filter1\": fader_handler,\n    }\n\n    osc_server = micro_osc.Server(socket_pool, UDP_HOST, UDP_PORT, dispatch_map)\n\n    print(\"MicroOSC server started on \", UDP_HOST, UDP_PORT)\n\n    last_time = time.monotonic()\n\n    while True:\n\n        osc_server.poll()\n\n        if time.monotonic() - last_time \u003e 1.0:\n            last_time = time.monotonic()\n            print(f\"waiting {last_time:.2f}\")\n\n\nReferences\n==========\n\n* `Open Sound Control Spec 1.0 \u003chttps://opensoundcontrol.stanford.edu/spec-1_0.html\u003e`_\n* `OSC Message examples \u003chttps://opensoundcontrol.stanford.edu/spec-1_0-examples.html\u003e`_\n* `OSC info and tools \u003chttps://wiki.thingsandstuff.org/OSC\u003e`_\n* `TouchOSC apps for Mac/Win/Linux \u003chttps://hexler.net/touchosc\u003e`_\n\nDocumentation\n=============\nAPI documentation for this library can be found on `Read the Docs \u003chttps://circuitpython-microosc.readthedocs.io/\u003e`_.\n\nFor information on building library documentation, please check out\n`this guide \u003chttps://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1\u003e`_.\n\nTesting\n=======\n\nInstall ``pytest`` with ``pip3 install pytest --upgrade`` and run ``pytest -v``\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n\u003chttps://github.com/todbot/CircuitPython_MicroOSC/blob/HEAD/CODE_OF_CONDUCT.md\u003e`_\nbefore contributing to help this project stay welcoming.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fcircuitpython_microosc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftodbot%2Fcircuitpython_microosc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fcircuitpython_microosc/lists"}