{"id":19002331,"url":"https://github.com/rainu/launchpad","last_synced_at":"2025-09-25T16:50:03.822Z","repository":{"id":57537263,"uuid":"285318247","full_name":"rainu/launchpad","owner":"rainu","description":"Go library to make it easy to use the Novation Launchpad (S and MK2)","archived":false,"fork":false,"pushed_at":"2020-10-02T11:35:27.000Z","size":17,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T17:35:37.898Z","etag":null,"topics":["api","launchpad","launchpad-api","launchpad-mk2","launchpads","library","midi","novation-launchpad"],"latest_commit_sha":null,"homepage":"","language":"Go","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/rainu.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}},"created_at":"2020-08-05T14:45:28.000Z","updated_at":"2024-01-21T09:34:21.000Z","dependencies_parsed_at":"2022-09-04T13:50:34.840Z","dependency_job_id":null,"html_url":"https://github.com/rainu/launchpad","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainu%2Flaunchpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainu%2Flaunchpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainu%2Flaunchpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainu%2Flaunchpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainu","download_url":"https://codeload.github.com/rainu/launchpad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249283008,"owners_count":21243658,"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":["api","launchpad","launchpad-api","launchpad-mk2","launchpads","library","midi","novation-launchpad"],"created_at":"2024-11-08T18:14:40.602Z","updated_at":"2025-09-25T16:49:58.756Z","avatar_url":"https://github.com/rainu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# launchpad \nA package allows you to talk to your Novation Launchpad S or Launchpad MK2 in Go. Light buttons or read your touches.\n\nThis library is currently only working with Launchpad S (Green-Red Launchpads) and Launchpad MK2 (RGB)\n\n## Usage\nInitialize a new Launchpad. If there are no currently connected Launchpad\ndevice, initialization will fail with an error. You can fake a device by\ncreating an input and output MIDI device and name them as Launchpad.\n\n## Drivers\n\nFor \"cable\" communication you need a Driver to connect with the MIDI system of your OS. \nCurrently there are two multi-platform drivers available:\n\n* package ```gitlab.com/gomidi/rtmididrv``` based on rtmidi\n* package ```gitlab.com/gomidi/portmididrv``` based on portmidi\n\nPortmidi is required to use this package.\n\n```\n$ apt-get install libportmidi-dev\n# or\n$ brew install portmidi\n# or \n$ yay -S portmidi\n```\n\n```go\npackage main\n\nimport (\n    \"github.com/rainu/launchpad\"\n\tdriver \"gitlab.com/gomidi/portmididrv\"\n\t\"log\"\n)\nfunc main() {\n    pad, err := launchpad.NewLaunchpad(driver.New())\n    if err != nil {\n        log.Fatalf(\"Error initializing launchpad: %v\", err)\n    }\n    defer pad.Close()\n    \n    // turn off all of the lights\n    pad.Clear()\n}\n```\n\n### Coordinate system\n\nThe coordinate system is illustrated below.\n```\n+--------- arrow keys -----------+  +--- mode keys ---+\n{0, 8} {1, 8} {2, 8} {3, 8} {4, 8} {5, 8} {6, 8} {7, 8} | ableton\n----------------------------------------------------------------\n----------------------------------------------------------------\n{0, 0} {1, 0} {2, 0} {3, 0} {4, 0} {5, 0} {6, 0} {7, 0} | {8, 0} vol\n----------------------------------------------------------------\n{0, 1} {1, 1} {2, 1} {3, 1} {4, 1} {5, 1} {6, 1} {7, 1} | {8, 1} pan\n----------------------------------------------------------------\n{0, 2} {1, 2} {2, 2} {3, 2} {4, 2} {5, 2} {6, 2} {7, 2} | {8, 2} sndA\n----------------------------------------------------------------\n{0, 3} {1, 3} {2, 3} {3, 3} {4, 3} {5, 3} {6, 3} {7, 3} | {8, 3} sndB\n----------------------------------------------------------------\n{0, 4} {1, 4} {2, 4} {3, 4} {4, 4} {5, 4} {6, 4} {7, 4} | {8, 4} stop\n----------------------------------------------------------------\n{0, 5} {1, 5} {2, 5} {3, 5} {4, 5} {5, 5} {6, 5} {7, 5} | {8, 5} trk on\n----------------------------------------------------------------\n{0, 6} {1, 6} {2, 6} {3, 6} {4, 6} {5, 6} {6, 6} {7, 6} | {8, 6} solo\n----------------------------------------------------------------\n{0, 7} {1, 7} {2, 7} {3, 7} {4, 7} {5, 7} {6, 7} {7, 7} | {8, 7} arm\n----------------------------------------------------------------\n```\n\n## Demo: Light your touchs\n\nA simple program to light every touch:\n\n```go\npackage main\n\nimport (\n    \"github.com/rainu/launchpad\"\n    driver \"gitlab.com/gomidi/portmididrv\"\n    \"log\"\n)\nfunc main() {\n    pad, err := launchpad.NewLaunchpad(driver.New())\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer pad.Close()\n    \n    pad.Clear()\n    \n    hits, err := pad.ListenToHits()\n    if err != nil {\n        log.Fatal(err)\n    }\n    \n    for {\n        select {\n        case hit := \u003c-hits:\n            pad.Light(hit.X, hit.Y, launchpad.ColorS{3, 3})\n        }\n    }\n}\n```\n\n## Demo: Write a scrolling text\n\nA simple program to write text on the launchpad\n\n```go\npackage main\n\nimport (\n    \"github.com/rainu/launchpad\"\n    driver \"gitlab.com/gomidi/portmididrv\"\n    \"log\"\n)\nfunc main() {\n    pad, err := launchpad.NewLaunchpad(driver.New())\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer pad.Close()\n    \n    pad.Clear()\n    \n    // Send Text-Loop\n    pad.Text(launchpad.ColorS{3, 0}).Add(7, \"Hello World!\").Perform()\n    \n    marker, err := pad.ListenToScrollTextEndMarker()\n    if err != nil {\n        log.Fatal(err)\n    }\n    for {\n        \u003c-marker\n        log.Printf(\"Scrolling text is ended now.\")\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainu%2Flaunchpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainu%2Flaunchpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainu%2Flaunchpad/lists"}