Talk to your Novation Launchpad in Go

launchpad GoDoc

A package allows you to talk to your Novation Launchpad in Go. Light buttons or read your touches.

This library is currently only working with Launchpad S (Green-Red Launchpads) but we are trying to support multiple models and layouts.

go get github.com/rakyll/launchpad

Portmidi is required to use this package.

$ apt-get install libportmidi-dev
# or
$ brew install portmidi

Usage

Initialize a new Launchpad. If there are no currently connected Launchpad device, initialization will fail with an error. You can fake a device by creating an input and output MIDI device and name them as Launchpad.

pad, err = launchpad.Open();
if err != nil {
    log.Fatalf("Error initializing launchpad: %v", err)
}
defer pad.Close()

// turn off all of the lights
pad.Clear()

Coordinate system

The coordinate system is illustrated below.

+--------- arrow keys -----------+  +--- mode keys ---+
{0, 8} {1, 8} {2, 8} {3, 8} {4, 8} {5, 8} {6, 8} {7, 8} | ableton
----------------------------------------------------------------
{0, 0} {1, 0} {2, 0} {3, 0} {4, 0} {5, 0} {6, 0} {7, 0} | {8, 0} vol
----------------------------------------------------------------
{0, 1} {1, 1} {2, 1} {3, 1} {4, 1} {5, 1} {6, 1} {7, 1} | {8, 1} pan
----------------------------------------------------------------
{0, 2} {1, 2} {2, 2} {3, 2} {4, 2} {5, 2} {6, 2} {7, 2} | {8, 2} sndA
----------------------------------------------------------------
{0, 3} {1, 3} {2, 3} {3, 3} {4, 3} {5, 3} {6, 3} {7, 3} | {8, 3} sndB
----------------------------------------------------------------
{0, 4} {1, 4} {2, 4} {3, 4} {4, 4} {5, 4} {6, 4} {7, 4} | {8, 4} stop
----------------------------------------------------------------
{0, 5} {1, 5} {2, 5} {3, 5} {4, 5} {5, 5} {6, 5} {7, 5} | {8, 5} trk on
----------------------------------------------------------------
{0, 6} {1, 6} {2, 6} {3, 6} {4, 6} {5, 6} {6, 6} {7, 6} | {8, 6} solo
----------------------------------------------------------------
{0, 7} {1, 7} {2, 7} {3, 7} {4, 7} {5, 7} {6, 7} {7, 7} | {8, 7} arm
----------------------------------------------------------------

Demo: Light your touchs

A simple program to light every touch:

pad, err := launchpad.Open()
if err != nil {
    log.Fatal(err)
}
defer pad.Close()

pad.Clear()

ch := pad.Listen()
for {
	select {
	case hit := <-ch:
		pad.Light(hit.X, hit.Y, 3, 3)
	}
}

License

Copyright 2013 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • 1-8 Keys Not Lighting Up

    1-8 Keys Not Lighting Up

    I have been playing with the step sequencer example code. I increased the grid so I can try to utilize the 1-9 and A-H controls.

    I want to control the 1-9 keys along the top, so I can use them to control tick speed and pages. I can use A-H without trouble.

    I have not been able to use the pad.Light(0, 8, 4, 0) (and I also tried pad(0, 9, 4, 0)) which should light up 1 but I can do pad.Light(9, 0, 4, 0) which is H.

  • Created a mk3 version.

    Created a mk3 version.

    Hello I have created a MK3 version of this code, tested with a LaunchPad Mini MK3

    I have responed to your comments, do you think we could merge this is now ?

  • go.mod: initial commit

    go.mod: initial commit

    Signed-off-by: Matt Layher [email protected]

    Hey @rakyll! I'm revisiting this library again after a few years because I'm interested in building an Elgato Stream Deck-like interface using my Launchpad Mini. If that's something you'd also be interested in, I'll keep you posted!

    Hope you're doing well, and thanks again for this library.

  • Top row no longer working?

    Top row no longer working?

    There were some changes in the lib recently and now my top rows won't light up. Any idea why that would be?

    The keys still work but the lights no longer light up. Noticed they are Y: -1 instead of Y:8 now.

  • Godoc link doesn't display documentaion

    Godoc link doesn't display documentaion

    I believe this happened with the migration from godoc.org to go.dev. It displays "Documentation not displayed due to license restrictions."

    I assume this is because the LICENSE is at the bottom of the README rather than in a separate file, though I'm not familiar enough with go.dev to know that's the issue for sure.

  • add mechanism to configure and perform a scrolling text

    add mechanism to configure and perform a scrolling text

    In this pull request I made sure to be backward compatible. It adds functions that allow to display scrolling text on the launchpad. The Launchpad S offers this functionality natively (see an PDF-Documentation which i found). Since the README says that only the Launchpad S is currently supported, I did not put this functionality into an extra sub-package.

  • Unable de use lib on windows

    Unable de use lib on windows

    Hi, I don"t succeed using this lib on windows. I installed msys64 , I installed gcc and libportmidi

    And now when i run go build I've got this error

    $ go build
    # github.com/sguiheux/launchpad
    D:\msys64\home\Vv\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
    C:\Users\Vv\AppData\Local\Temp\go-link-950327387\000006.o : Dans la fonction « _cgo_preinit_init » :
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:28 : référence indéfinie vers « __imp___iob_func »
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:28:(.text+0x37): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp___iob_func
    C:\Users\Vv\AppData\Local\Temp\go-link-950327387\000006.o : Dans la fonction « x_cgo_sys_thread_create » :
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:56 : référence indéfinie vers « __imp__beginthread »
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:56:(.text+0xdc): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp__beginthread
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:58 : référence indéfinie vers « __imp__errno »
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:58:(.text+0xee): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp__errno
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:58 : référence indéfinie vers « __imp___iob_func »
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:58:(.text+0xf6): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp___iob_func
    C:\Users\Vv\AppData\Local\Temp\go-link-950327387\000006.o : Dans la fonction « x_cgo_notify_runtime_init_done » :
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:99 : référence indéfinie vers « __imp___iob_func »
    C:\workdir\go\src\runtime\cgo/gcc_libinit_windows.c:99:(.text+0x225): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp___iob_func
    C:\Users\Vv\AppData\Local\Temp\go-link-950327387\000007.o : Dans la fonction « x_cgo_thread_start » :
    C:\workdir\go\src\runtime\cgo/gcc_util.c:18 : référence indéfinie vers « __imp___iob_func »
    C:\workdir\go\src\runtime\cgo/gcc_util.c:18:(.text+0x3c): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp___iob_func
    C:\Users\Vv\AppData\Local\Temp\go-link-950327387\000008.o : Dans la fonction « _cgo_sys_thread_start » :
    C:\workdir\go\src\runtime\cgo/gcc_windows_amd64.c:32 : référence indéfinie vers « __imp__beginthread »
    C:\workdir\go\src\runtime\cgo/gcc_windows_amd64.c:32:(.text+0xa3): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp__beginthread
    C:\workdir\go\src\runtime\cgo/gcc_windows_amd64.c:34 : référence indéfinie vers « __imp__errno »
    C:\workdir\go\src\runtime\cgo/gcc_windows_amd64.c:34:(.text+0xb5): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp__errno
    C:\workdir\go\src\runtime\cgo/gcc_windows_amd64.c:34 : référence indéfinie vers « __imp___iob_func »
    C:\workdir\go\src\runtime\cgo/gcc_windows_amd64.c:34:(.text+0xbd): relocalisation tronquée pour concorder avec la taille : R_X86_64_PC32 vers le symbole indéfini __imp___iob_func
    collect2: erreur : ld a retourné 1 code d'état d'exécution
    
    

    Any ideas?

    Regards

  • sample: drummachine not starting

    sample: drummachine not starting

    The drummachine sample is existing with the following even though a launchpad is connected and visible to the system.

    2015/05/15 09:53:02 error while initializing connection to midi out stream
    exit status 1
    
Soundcloud-watch - Watch your Soundcloud likes for removed songs

Soundcloud Watcher Tool to watch for any added/removed likes from a profile. TOD

Oct 21, 2022
GTW Talk slides - Slides Talk concurrencia

Slides Talk concurrencia Este repo se ejecuta utilizando el pkg present $ presen

Feb 4, 2022
This app brings the Matterbridge binary to your server to connect Nextcloud Talk with other chat services

This app brings the Matterbridge binary to your server to connect Nextcloud Talk with other chat services

Sep 12, 2022
Talk, easily.
Talk, easily.

Quik.do v0.1.0 talk, easily. Note: This project is heavily under development. IT IS NOT PRODUCTION READY YET. DO NOT USE IT. What Quik.do is a video c

Jan 1, 2023
Sample code for my Go Deadlocks talk

Go Deadlocks Talk This is sample code for my Go Deadlocks talk. Simple simple - a super simple deadlock simple2 - the same but with an extra Go deadlo

Jul 30, 2022
Code for the keycloak demo for the talk I gave at blablaconf 2021
Code for the keycloak demo for the talk I gave at blablaconf 2021

This demo illustrates the usage of keycloak to secure several service accross different clients using roles. How to Run: From a terminal you need to r

Oct 30, 2021
NearTalk is chat platform to talk to people nearby.

NearTalk Visit neartalk.makeworld.space to check it out! That server always runs the latest code on the main branch. What is it? NearTalk is chat plat

Nov 22, 2022
Go library for Nextcloud Talk

A Go library that can be used to communicate with Nextcloud Talk instances.

Dec 2, 2022
A little websocket TCP proxy to let browsers talk to a fixed port on arbitrary hosts. Built for Gemini (gemini://, port 1965)

Kepler A little websocket TCP proxy built to let Amfora talk to Gemini servers when running in a browser. Usage $ git clone https://github.com/awfulco

May 27, 2022
Demo for my talk at ArgoCon '21 showing how to use Go to create and submit dynamic Argo Workflows.
Demo for my talk at ArgoCon '21 showing how to use Go to create and submit dynamic Argo Workflows.

argocon-21-demo Demo for my talk at ArgoCon '21 showing how to use Go to create and submit dynamic Argo Workflows. This repo implements a Go-based CLI

Oct 12, 2022
Code and slides from the talk "A golang CLI to rule them all" at JavaZone 2021

A Golang CLI to rule them all This is a repo for the slides and the code that were showed at the presentation with the same title at the JavaZone conf

Sep 28, 2022
A simple pep talk generator based on a tweet from @VVh1sp3r

Description Based on a pep talk generator that @VVh1sp3r tweeted. (see image). I thought it would be a fun little project to use as my first Go progra

Jan 23, 2022
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.

StatusOK Monitor your Website and APIs from your computer.Get notified through Slack or E-mail when your server is down or response time is more than

Dec 27, 2022
Host yo' self from your browser, your phone, your toaster.
Host yo' self from your browser, your phone, your toaster.

A hosting service from the browser, because why not. Try it at hostyoself.com. See it in action Here's an example where I use hostyoself.com to host i

Jan 1, 2023
Send email and SMS broadcasts to your contacts. SMS are sent via your Android phone connected to your PC.

Polysender Send email and SMS broadcasts to your contacts. Polysender is a desktop application, so it does not require a complicated server setup. Ema

Aug 11, 2022
Are you programming and suddenly your stomach is rumbling? No problem, order your Ifood without leaving your favorite text editor ❤️

vim-ifood Você ta programando e de repente bateu aquela fome? Sem problemas, peça seu Ifood sem sair do seu editor de texto favorito ❤️ Are you progra

Jun 2, 2022
Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes.

DNS-Updater Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes. Motivation Havin

Mar 10, 2022
Write your SQL queries in raw files with all benefits of modern IDEs, use them in an easy way inside your application with all the profit of compile time constants

About qry is a general purpose library for storing your raw database queries in .sql files with all benefits of modern IDEs, instead of strings and co

Dec 25, 2022
With this package you can create your own syslog server with your own handlers for different kind of syslog messages

Using this library you can easy implement your own syslog server that: Can listen on multiple UDP ports and unix domain sockets. Can pass parsed syslo

Nov 9, 2022
Manage your repository's TODOs, tickets and checklists as config in your codebase.

tickgit ??️ tickgit is a tool to help you manage latent work in a codebase. Use the tickgit command to view pending tasks, progress reports, completio

Dec 30, 2022