Talk to your Novation Launchpad in Go

Overview

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.
Issues
  • 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.

    opened by ghost 9
  • 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 ?

    opened by dhowlett99 1
  • 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.

    opened by mdlayher 1
  • 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.

    opened by whatisgravity 1
  • 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.

    opened by rainu 0
  • 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

    opened by sguiheux 0
  • 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
    
    opened by rakyll 0
Releases(v0.1.0)
Soundcloud-watch - Watch your Soundcloud likes for removed songs

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

Finley Garton 2 May 30, 2022
GTW Talk slides - Slides Talk concurrencia

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

Juan Clot 1 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

Nextcloud 25 Jun 14, 2022
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

Bora Tanrıkulu 110 Jun 11, 2022
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

Nick Craig-Wood 7 Dec 30, 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

Zakaria Amine 1 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

makeworld 16 Apr 26, 2022
Go library for Nextcloud Talk

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

Gary Kim 4 Jul 27, 2021
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

mooff 1 May 27, 2022
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

null 3 Jun 9, 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

Eika Gruppen AS 2 Dec 15, 2021
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

Becki True 0 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.

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

Sanath Kumar 1.5k Jun 26, 2022
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

Zack 1.7k Jun 28, 2022
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

Charalampos Mitsakis 12 Jun 19, 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

Felipe Volpone 4 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

42_atomys 9 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

Sergey Treinis 21 Apr 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

Michał Derkacz 68 Dec 15, 2021
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

Augmentable 276 Jun 3, 2022
James is your butler and helps you to create, build, debug, test and run your Go projects

go-james James is your butler and helps you to create, build, debug, test and run your Go projects. When you often create new apps using Go, it quickl

Pieter Claerhout 50 Mar 8, 2022
Supporting your devops by shortening your strings using common abbreviations and clever guesswork

abbreviate Shorten your strings using common abbreviations. Supported by Tidelift Motivation This tool comes out of a frustration of the name of resou

Pascal Dennerly 182 Jun 7, 2022
A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working directory easy, even for fairly large files.

httpfolder A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working direc

null 14 Dec 13, 2021
Display a message in morse code on your capslock LED, keyboard backlight or using your screen brightness!

halp halp is a command line utility that lets you display messages in morse code on your capslock LED, keyboard backlight (if you have it) or using yo

Madhav Jivrajani 25 Jan 26, 2022
:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

$ qrcp Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal. You can support development

Claudio d'Angelis 8.6k Jun 26, 2022
Ah shhgit! Find secrets in your code. Secrets detection for your GitHub, GitLab and Bitbucket repositories: www.shhgit.com

shhgit helps secure forward-thinking development, operations, and security teams by finding secrets across their code before it leads to a security br

Paul 3.5k Jun 23, 2022
📕 twtxt is a Self-Hosted, Twitter™-like Decentralised microBlogging platform. No ads, no tracking, your content, your data!

twtxt ?? twtxt is a Self-Hosted, Twitter™-like Decentralised micro-Blogging platform. No ads, no tracking, your content, your data! Technically twtxt

Twt 505 Jul 26, 2021
:football: Generate your own O'RLY animal book cover to troll your colleagues | 生成你自己的O'RLY动物书封面,让你的同事惊掉下巴

English | 中文 O'RLY Cover Generator O'RLY Cover Generator is a parody book cover generator, implemented in Golang and Vue.js, supporting a wide range o

LI Zhennan 614 Jul 1, 2022
Check your internet speed right from your terminal. Built on GOlang using chromedp

adhocore/fast A GO lang command line tool to check internet speed right from the terminal. Uses fast.com through headless chrome. Prerequistie Chrome

Jitendra Adhikari 61 Jun 1, 2022