{"id":19732828,"url":"https://github.com/smerrony/midibanger","last_synced_at":"2026-06-09T02:33:07.992Z","repository":{"id":222468062,"uuid":"757368296","full_name":"SMerrony/MidiBanger","owner":"SMerrony","description":"A Raspberry Pico MIDI player that plays physical (toy) instruments via servos.","archived":false,"fork":false,"pushed_at":"2024-03-13T07:53:52.000Z","size":1397,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T04:00:07.479Z","etag":null,"topics":["midi","midi-player","music","pico","pico-sdk","raspberry-pi-pico","rp2040","rp2040-zero"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SMerrony.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":"2024-02-14T10:58:30.000Z","updated_at":"2024-02-29T08:10:47.000Z","dependencies_parsed_at":"2024-02-25T08:23:20.390Z","dependency_job_id":"2780bac9-217c-43db-931a-aca0f742da2a","html_url":"https://github.com/SMerrony/MidiBanger","commit_stats":null,"previous_names":["smerrony/midibanger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SMerrony/MidiBanger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2FMidiBanger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2FMidiBanger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2FMidiBanger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2FMidiBanger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SMerrony","download_url":"https://codeload.github.com/SMerrony/MidiBanger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SMerrony%2FMidiBanger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34089328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["midi","midi-player","music","pico","pico-sdk","raspberry-pi-pico","rp2040","rp2040-zero"],"created_at":"2024-11-12T00:28:06.749Z","updated_at":"2026-06-09T02:33:07.978Z","avatar_url":"https://github.com/SMerrony.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MidiBanger\nA Raspberry Pico* MIDI device that plays physical (toy) instruments via servos.\n\nMidiBanger supports both percussive (mallet-type) and pressed (key-type) instruments.\n\n* Pan-and-tilt mode using just two servos to play reachable notes\n* Servo-per-note mode\n* Solenoid-per-note mode (soon)\n\nThe current version supports up to 16 directly-connected servos, later versions may\nsupport I2C servo controllers allowing hundreds of servos to be used. \n\n*Tested on Raspberry Pi Pico, Raspberry Pi Pico W, and Waveshare RP2040-Zero.\n\n![Pan-and-tilt version playing Janod toy glockenspiel](images/MidiBanger_Janod_1.jpg)\n\n## Hardware Requirements\n* Raspberry Pico or compatible such as RP2040-Zero\n* Servo per note eg. SG90 9g Micro Servo, or a pair if using pan-and-tilt \n* Optional - Micro speaker - handy for debugging and setup\n* Optional - 5V PSU for servos, if you think you need it\n* Some 3D-printed parts to hold servos etc.\n\nSome sample 3D parts are included in the `3D` directory, there are [FreeCAD](https://www.freecad.org/) designs and `.3mf` files\nfor slicing.\n\n## Configuration\nSee the comments in `src/config.h` for details.\n\nTo avoid masses of commented-out congfiguration I have put the configuration that is specific to a\nparticular physical instrument in a separate file which is then `#include`d in the main `config.h`.\nExample configurations are `chicco_toy_glock_config.h` and `janod_toy_glock_config.h`.\n\nFor the servo-per-note mode, the critical configuration item is the `NOTEPIN_INITIALISER`.  Leave its first line alone, then replace the contents with a maximum of sixteen [MIDI note number] = GPIO_PIN pairs.\n\nFor the two-servo pan-and-tilt mode it's the `NOTE_PAN_INITIALISER` that you will need to adjust to set the \nangles for each note.  This will be a trial-and-error process, I suggest you start by installing the servos so that\ntheir centres of movement roughly point to the middle of the instrument and then do a first run WITHOUT the hammer attached.\n\nIf you are connecting up several MidiBangers I suggest you use a different string or\nnumber for each one at the end of the `USB_PRODUCT` string.  It will make your life a lot simpler!\n\n## Building\nDon't forget to set `PICO_BOARD` to match your target microcontroller in `CMakeLists.txt`, then...\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n## Hints\n### Pan-and-Tilt Players\n* Try a metal-geared servo for the panning action, these seem to have less play than the plastic-geared equivalent.\n* For greater accuracy playing large intervals (leaps) you can try setting the angles for the lowest and highest notes\njust a little towards the centre, this will compensate for some overshoot.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmerrony%2Fmidibanger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmerrony%2Fmidibanger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmerrony%2Fmidibanger/lists"}