{"id":29061746,"url":"https://github.com/titouanc/pymidi2","last_synced_at":"2025-10-07T12:04:32.029Z","repository":{"id":277705173,"uuid":"933254237","full_name":"titouanc/pymidi2","owner":"titouanc","description":"A pure Python implementation of MIDI2 Universal MIDI Packets (UMP)","archived":false,"fork":false,"pushed_at":"2025-08-05T13:52:35.000Z","size":223,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T15:35:18.650Z","etag":null,"topics":["midi2","ump"],"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/titouanc.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,"zenodo":null}},"created_at":"2025-02-15T14:24:50.000Z","updated_at":"2025-08-05T13:52:39.000Z","dependencies_parsed_at":"2025-06-12T08:43:42.447Z","dependency_job_id":"b827423e-d56e-4cfa-91f9-04594f925a72","html_url":"https://github.com/titouanc/pymidi2","commit_stats":null,"previous_names":["titouanc/netmidi2","titouanc/pymidi2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/titouanc/pymidi2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titouanc%2Fpymidi2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titouanc%2Fpymidi2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titouanc%2Fpymidi2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titouanc%2Fpymidi2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/titouanc","download_url":"https://codeload.github.com/titouanc/pymidi2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/titouanc%2Fpymidi2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278770738,"owners_count":26042830,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["midi2","ump"],"created_at":"2025-06-27T08:07:45.693Z","updated_at":"2025-10-07T12:04:31.999Z","avatar_url":"https://github.com/titouanc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pymidi2\n\nA pure Python implementation of MIDI2 Universal MIDI Packets (UMP).\n\n**Note**: This project is currently incomplete, and serves as a workbench for other developments\n\nCurrently, it supports:\n\n- Raw UMP endpoints over ALSA (linux)\n- UMP endpoints over UDP (network / multiplatform)\n    - Authentication (shared secret or user:password)\n    - Network discovery via zeroconf (DNS-SD)\n- Endpoint topology discovery via UMP Stream messages\n- Reading Standard MIDI File version 1 (.mid)\n\n## Installation\n\nThis project is managed with `uv`, make sure it is installed on your system.\nOn Archlinux for example:\n\n```bash\npacman -S python-uv\n```\n\nThen clone this repository and ensure it works:\n\n```bash\ngit clone git@github.com:titouanc/pymidi2\ncd pymidi2\nuv run pymidi2 --help\n```\n\n## Endpoint URLs\n\nThe UMP endpoints can be located with URLs. Two supported schemes:\n\n- `file://` for raw UMP ALSA endpoints\n- `udp://` for network endpoints\n\nThe UMP Group number (0-15) can be specified in the URL fragment (`...#\u003cgroup\u003e`).\n\nAuthentication for the UDP endpoints can be passed in the URL:\n\n- `udp://\u003cshared-key\u003e@host`\n- `udp://\u003cusername\u003e:\u003cpassword\u003e@host`\n\nSome valid examples:\n\n- `file:///dev/snd/umpC2D0`\n- `udp://my-host:5673` (no authentication)\n- `udp://the-key@my-host:5673` (shared key authentication)\n- `udp://user:password@my-host:5673#3` (user/password auth, UMP Group number 3)\n\n## Command line tool\n\nRun the command line tool with `uv run pymidi2`\n\nPass `-h / --help` to `pymidi2` or any of its subcommands to enquire about its\noptions and usage.\n\n```\n$ uv run pymidi2 -h\nusage: pymidi2 [-h] [-I] [-D] {find,topo,play,send1} ...\n\npositional arguments:\n  {find,topo,play,send1}\n    find                Find available UMP endpoints\n    topo                Print UMP endpoint topology\n    play                Play a MIDI file\n    send1               Send MIDI1 events\n\noptions:\n  -h, --help            show this help message and exit\n  -I, --info            Enable info logging (default: False)\n  -D, --debug           Enable debug logging (default: False)\n```\n\n### `find`: Finding available Universal MIDI Endpoints\n\nTo find all UMP endpoints that can be reached through all supported transports:\n\n```\n$ uv run pymidi2 find\nZephyr-UDP-MIDI2 (udp://192.168.129.35:53982)\n- Block #0 [io : Recv/Send] 'Synthesizer' UMP groups {0, 1, 2, 3} [MIDI1 + MIDI2]\n- Block #1 [i- : Recv     ] 'Keyboard' UMP groups {8} [MIDI1 only]\n- Block #2 [-o :      Send] 'External output (MIDI DIN-5)' UMP groups {9} [MIDI1 31.25kb/s]\n```\n\n### `topo`: Viewing a particular endpoint's topology\n\nIf a UDP endpoint requires authentication, you can request its topology by\npassing the authentication credentials in the url with `pymidi2 topo`\n\n```\n$ uv run pymidi2 topo udp://user:password@192.168.129.35:53982\nZephyr-UDP-MIDI2 (udp://192.168.129.35:53982)\n- Block #0 [io : Recv/Send] 'Synthesizer' UMP groups {0, 1, 2, 3} [MIDI1 + MIDI2]\n- Block #1 [i- : Recv     ] 'Keyboard' UMP groups {8} [MIDI1 only]\n- Block #2 [-o :      Send] 'External output (MIDI DIN-5)' UMP groups {9} [MIDI1 31.25kb/s]\n```\n\n### `play`: Playing a MIDI file\n\nPass the option `-q / --quiet` to suppress MIDI1 events being printed to stdout.\n\n```\n$ uv run pymidi2 play -e 'udp://192.168.129.35:53982#9' under-the-sea.mid\nBE0750\n8D3E40\n902264\n9E2264\n...\n```\n\n### `send1`: Sending MIDI1 events\n\nPass one or more MIDI1 events, in hexadecimal form\n\n```\n$ uv run pymidi2 send1 udp://192.168.129.35:53982#9 90407F 90427F 90457F\n```\n\n### `recv1`: Receiving MIDI1 events\n\nThis prints out only MIDI1 events from a single UMP group, in MIDI1 format.\nPass an endpoint url including the UMP group.\n\n```\n$ uv run pymidi2 recv1 udp://192.0.2.1:45486#9\n904060\n804060\n904060\n...\n```\n\n### `send2`: Sending MIDI2 events\n\nPass one or more UMP, in hexadecimal form. Separate the 32-bit words of a same\npacket by commas,.\n\n```\n $ uv run pymidi2 send2 udp://192.168.129.35:53982 49904000,FFFF0000 2990427F\n```\n\n### `recv2`: Receiving MIDI2 events\n\nThis prints out all Universal MIDI Packets from an endpoint, in UMP format.\nPass an endpoint url, if specifying the UMP group, then only packets from this\ngroup are printed.\n\n```\n$ uv run pymidi2 recv2 udp://192.0.2.1:45486\n29904060\n29804060\n29904060\n...\n```\n\n## Reference documents\n\n* [**User Datagram Protocol for Universal MIDI Packets** _Network MIDI 2.0 (UDP) Transport Specification_](https://drive.google.com/file/d/1dtsOgMLbtif9Fp-OaZhwnRs9an4dn3uv/edit)\n\n* [**Universal MIDI Packet (UMP) Format and MIDI 2.0 Protocol** _With MIDI 1.0 Protocol in UMP Format_](https://drive.google.com/file/d/1l2L5ALHj4K9hw_LalQ2jJZBMXDxc9Uel/view)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitouanc%2Fpymidi2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftitouanc%2Fpymidi2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftitouanc%2Fpymidi2/lists"}