Commit a92e9fea authored by Brandon Invergo's avatar Brandon Invergo

Merge branch 'master' of gitlab.com:librekontrol/librekontrol

parents f8543d34 e36b5aff
......@@ -2,6 +2,11 @@
*.a
*.log
*.trs
*.1
*.go
doc/*.info
doc/*.pdf
doc/librekontrol.t2p
vgcore.*
config.cache
tests/.deps
......@@ -29,3 +34,6 @@ GTAGS
dist/*
src/librekontrol
po/POTFILES
doc/version.texi
doc/stamp-vti
1. Get the code from https://gitlab.com/librekontrol/librekontrol
2. Run autotools: autoreconf -fvi
3. Build the software: ./configure && make
4. Optionally install it: make install
5. Hack!
Please see the TODO file for an idea of things that need to be done.
Please consider contributing any device definitions, callback
functions, etc. that you write.
Please submit any bugs or feature requests via the bug tracker on the
Gitlab page.
2019-04-01 Brandon Invergo <brandon@invergo.net>
* guile/librekontrol/device.scm (make-remap-button-toggle): Don't
"hold down" the button when toggling a remap-button-toggle unless
an option is set.
2019-03-28 Brandon Invergo <brandon@invergo.net>
* guile/librekontrol/device.scm
(remap-button,make-remap-button-toggle): Support modifier keys for
remap-button callbacks. Don't ask for the output event-type;
assume that only keypress events are being sent.
(rel-knob-to-button,make-abs-knob-to-button): Support sending
keypress events from rel/abs controls.
2019-03-27 Brandon Invergo <brandon@invergo.net>
* guile/librekontrol/input.scm: (make-input-event): Break out the
input-event making from input-event symbol definition.
* guile/librekontrol/device.scm (configure-device): Replace
'define-device' macro with 'configure-device' function.
(make-abs-to-rel-system-knob): Fix conversion of absolute
positions to relative positions. Also account for "infinite
rotary"-style knobs, where the absolute position wraps around.
2019-03-24 Brandon Invergo <brandon@invergo.net>
* guile/librekontrol/device.scm: Rename "switch"-making procedures
......
......@@ -22,3 +22,9 @@ ACLOCAL_AMFLAGS = --install -I m4
EXTRA_DIST = TODO .dir-locals.el
exampledir = $(datadir)/$(PACKAGE)/examples
dist_example_DATA = $(wildcard examples/*.scm)
README: doc/librekontrol.texi
makeinfo --plaintext $^ | \
sed '1,/Procedure Index/d;/^2 Getting Started/,$$d' >$@
# -*- mode: Org -*-
* v0.1
The first version of Librekontrol to be released! Get it, test it,
hack on it, and report bugs!
This diff is collapsed.
* v0.1 [3/7]
# -*- mode: Org -*-
* v0.1 [7/7]
** DONE Add exit hooks to the device macro
CLOSED: [2019-03-18 Mon 23:28]
** DONE Add an #:init section to the device macro
CLOSED: [2019-03-19 Tue 21:38]
** DONE Don't ~define-public~ in the various ~define-...~ macros
CLOSED: [2019-03-19 Tue 22:24]
** TODO Write README
** TODO Write manual
** TODO Add Scheme source to Automake files for installation
** TODO Update gettext stuff
** DONE Write README
CLOSED: [2019-04-09 Tue 23:41]
** DONE Write manual
CLOSED: [2019-04-09 Tue 23:41]
** DONE Add Scheme source to Automake files for installation
CLOSED: [2019-04-02 Tue 22:16]
** DONE Update gettext stuff
CLOSED: [2019-04-02 Tue 22:16]
* Future
** TODO [#A] Create generic "virtual" devices to simplify enabling remap events
** TODO [#A] Improve error handling and graceful failing
** TODO [#A] Listen for commands on a socket, to support Emacs Geiser etc.
** TODO [#A] Move more code from C to Scheme
*** TODO [#A] Rewrite librekontrol.c in Scheme
*** TODO [#A] Move the event loop to (librekontrol main) or something like that
*** TODO [#A] Properly export (librekontrol core) as an extension.
** TODO [#A] OSC support
** TODO [#A] MIDI-in (MIDI clock, etc.) support
** TODO [#A] Complete definitions for all supported devices [6/10]
......@@ -31,7 +41,8 @@
CLOSED: [2019-03-18 Mon 23:39]
*** DONE ni-rk3
CLOSED: [2019-03-18 Mon 23:39]
** TODO [#A] Support loading/unloading "profiles" so device definitions can be swapped while running [0/2]
** TODO [#B] Listen for commands on a socket, to support Emacs Geiser etc.
** TODO [#B] Support loading/unloading "profiles" so device definitions can be swapped while running [0/2]
*** TODO Support closing ctls and devices in Scheme
*** TODO Write profile-support macros
** TODO [#B] Translations
......
......@@ -18,7 +18,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.68)
AC_INIT([LibreKontrol], [0.1], [brandon@invergo.net], [librekontrol],
AC_INIT([Librekontrol], [0.1], [https://gitlab.com/librekontrol/librekontrol/issues], [librekontrol],
[http://www.librekontrol.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
......
This diff is collapsed.
;; Copyright (C) 2019 Brandon M. Invergo <brandon@invergo.net>
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(use-modules (librekontrol core)
(librekontrol device)
(librekontrol input)
(librekontrol alsa)
((librekontrol devices ni-ak1) #:prefix ak1:))
(configure-device
#:alsa-name ak1:alsa-name
#:input-name ak1:input-name
#:remap-events (list (make-input-event ev-key key-home)
(make-input-event ev-key key-end)
(make-input-event ev-key key-space)
(make-input-event ev-key key-leftbrace)
(make-input-event ev-key key-rightbrace)
(make-input-event ev-key key-leftshift))
#:controls (list (list ak1:left remap-button
;; Transport: Go to Start
#:event-code key-home)
(list ak1:middle (make-remap-button-toggle)
;; Transport: Start/Stop
#:event-code key-space)
(list ak1:right remap-button
;; Transport: Go to End
#:event-code key-end)
(list ak1:knob (make-abs-knob-to-button)
;; Bind Shift-{ & Shift-} to, e.g., Scroll
;; Backward/Forward
#:neg-event-code key-leftbrace
#:pos-event-code key-rightbrace
#:neg-mod-keys (list key-leftshift)
#:pos-mod-keys (list key-leftshift)
#:knob-max (ak1:knob-max)
#:invert #t))
#:init (list (lambda ()
(turn-off-ctls
(map control-alsa-ctl
(list ak1:left ak1:middle ak1:right ak1:knob)))))
#:exit-hooks (list (lambda ()
(turn-off-ctls
(map control-alsa-ctl
(list ak1:left ak1:middle ak1:right ak1:knob))))))
(use-modules (librekontrol core)
(librekontrol device)
(librekontrol input)
(librekontrol alsa)
((librekontrol devices ni-ak1) #:prefix ak1:)
(ice-9 popen)
(ice-9 rdelim))
(define (playerctl-playing?)
(let* ((playerctl-port (open-input-pipe "playerctl status"))
(playerctl-status (read-line playerctl-port)))
(close-pipe playerctl-port)
(equal? playerctl-status "Playing")))
(configure-device
#:alsa-name ak1:alsa-name
#:input-name ak1:input-name
#:remap-events (list (make-input-event ev-key key-1)
(make-input-event ev-key key-2)
(make-input-event ev-key key-space)
(make-input-event ev-key key-a)
(make-input-event ev-key key-p)
(make-input-event ev-key key-leftctrl))
#:controls (list (list ak1:left system-button
#:cmd "playerctl previous")
(list ak1:middle (make-system-button-toggle
(playerctl-playing?))
#:on-cmd "playerctl play"
#:off-cmd "playerctl pause")
(list ak1:right system-button
#:cmd "playerctl next")
(list ak1:knob (make-abs-knob-to-button)
#:neg-event-code key-a
#:pos-event-code key-p
#:pos-mod-keys (list key-leftctrl)
#:knob-max (ak1:knob-max)
#:invert #t))
#:idle-wait 0.5
#:idle-hooks (list (lambda ()
(set-ctl (control-alsa-ctl ak1:knob) #f)))
#:exit-hooks (list (lambda ()
(turn-off-ctls
(map control-alsa-ctl
(list ak1:left ak1:middle ak1:right ak1:knob)))))
#:init (list (if (playerctl-playing?)
(set-ctl (control-alsa-ctl ak1:middle) #t))))
This diff is collapsed.
......@@ -22,4 +22,4 @@
(define alsa-name "Audio4DJ")
(define input-name #f)
(define-alsa-ctl led-current-input 1)
(define-alsa-ctl led-current-input 1 'integer)
......@@ -26,8 +26,8 @@
(define alsa-name "Audio8DJ")
(define input-name #f)
(define-alsa-ctl led-current-input 1)
(define-alsa-ctl led-gnd-lift-vinyl 2)
(define-alsa-ctl led-gnd-lift-cd 3)
(define-alsa-ctl led-gnd-lift-phono 4)
(define-alsa-ctl led-software-lock 5)
(define-alsa-ctl led-current-input 1 'integer)
(define-alsa-ctl led-gnd-lift-vinyl 2 'boolean)
(define-alsa-ctl led-gnd-lift-cd 3 'boolean)
(define-alsa-ctl led-gnd-lift-phono 4 'boolean)
(define-alsa-ctl led-software-lock 5 'boolean)
This diff is collapsed.
......@@ -102,6 +102,7 @@
pot-max
knob-max))
(use-modules (librekontrol input)
(librekontrol alsa)
(librekontrol device))
(define alsa-name "TraktorKontrolX")
......@@ -111,14 +112,14 @@
(+ x btn-misc))
;; FX
(define-alsa-ctl led-fx-a-on 1)
(define-alsa-ctl led-fx-a-1 2)
(define-alsa-ctl led-fx-a-2 3)
(define-alsa-ctl led-fx-a-3 4)
(define-alsa-ctl led-fx-b-on 5)
(define-alsa-ctl led-fx-b-1 6)
(define-alsa-ctl led-fx-b-2 7)
(define-alsa-ctl led-fx-b-3 8)
(define-alsa-ctl led-fx-a-on 1 'integer)
(define-alsa-ctl led-fx-a-1 2 'integer)
(define-alsa-ctl led-fx-a-2 3 'integer)
(define-alsa-ctl led-fx-a-3 4 'integer)
(define-alsa-ctl led-fx-b-on 5 'integer)
(define-alsa-ctl led-fx-b-1 6 'integer)
(define-alsa-ctl led-fx-b-2 7 'integer)
(define-alsa-ctl led-fx-b-3 8 'integer)
(define-input-event pot-fx-a-dry/wet ev-abs abs-hat0x)
(define-input-event pot-fx-a-1 ev-abs abs-hat0y)
......@@ -130,36 +131,36 @@
(define-input-event pot-fx-b-3 ev-abs abs-hat3y)
;; Middle area
(define-alsa-ctl led-hotcue 9)
(define-alsa-ctl led-shift-white 10)
(define-alsa-ctl led-shift-green 11)
(define-alsa-ctl led-hotcue 9 'integer)
(define-alsa-ctl led-shift-white 10 'integer)
(define-alsa-ctl led-shift-green 11 'integer)
;; Deck A
(define-alsa-ctl led-deck-a-fx1 12)
(define-alsa-ctl led-deck-a-fx2 13)
(define-alsa-ctl led-deck-a-in 14)
(define-alsa-ctl led-deck-a-out 15)
(define-alsa-ctl led-deck-a-<beat 16)
(define-alsa-ctl led-deck-a-beat> 17)
(define-alsa-ctl led-deck-a-cue 18)
(define-alsa-ctl led-deck-a-cup 19)
(define-alsa-ctl led-deck-a-play 20)
(define-alsa-ctl led-deck-a-sync 21)
(define-alsa-ctl led-deck-a-fx1 12 'integer)
(define-alsa-ctl led-deck-a-fx2 13 'integer)
(define-alsa-ctl led-deck-a-in 14 'integer)
(define-alsa-ctl led-deck-a-out 15 'integer)
(define-alsa-ctl led-deck-a-<beat 16 'integer)
(define-alsa-ctl led-deck-a-beat> 17 'integer)
(define-alsa-ctl led-deck-a-cue 18 'integer)
(define-alsa-ctl led-deck-a-cup 19 'integer)
(define-alsa-ctl led-deck-a-play 20 'integer)
(define-alsa-ctl led-deck-a-sync 21 'integer)
(define-input-event knob-deck-a-1 ev-abs abs-x)
(define-input-event knob-deck-a-2 ev-abs abs-y)
;; Deck B
(define-alsa-ctl led-deck-b-fx1 22)
(define-alsa-ctl led-deck-b-fx2 23)
(define-alsa-ctl led-deck-b-in 24)
(define-alsa-ctl led-deck-b-out 25)
(define-alsa-ctl led-deck-b-<beat 26)
(define-alsa-ctl led-deck-b-beat> 27)
(define-alsa-ctl led-deck-b-cue 28)
(define-alsa-ctl led-deck-b-cup 29)
(define-alsa-ctl led-deck-b-play 30)
(define-alsa-ctl led-deck-b-sync 31)
(define-alsa-ctl led-deck-b-fx1 22 'integer)
(define-alsa-ctl led-deck-b-fx2 23 'integer)
(define-alsa-ctl led-deck-b-in 24 'integer)
(define-alsa-ctl led-deck-b-out 25 'integer)
(define-alsa-ctl led-deck-b-<beat 26 'integer)
(define-alsa-ctl led-deck-b-beat> 27 'integer)
(define-alsa-ctl led-deck-b-cue 28 'integer)
(define-alsa-ctl led-deck-b-cup 29 'integer)
(define-alsa-ctl led-deck-b-play 30 'integer)
(define-alsa-ctl led-deck-b-sync 31 'integer)
(define-input-event knob-deck-b-1 ev-abs abs-z)
(define-input-event knob-deck-b-2 ev-abs abs-misc)
......
......@@ -94,28 +94,29 @@
knob-volume-max
knob-rotary-max))
(use-modules (librekontrol input)
(librekontrol alsa)
(librekontrol device))
(define alsa-name "KoreController")
(define input-name "Kore Controller")
;; Left side
(define-alsa-ctl led-f1 1)
(define-alsa-ctl led-f2 2)
(define-alsa-ctl led-f3 3)
(define-alsa-ctl led-f4 4)
(define-alsa-ctl led-f5 5)
(define-alsa-ctl led-f6 6)
(define-alsa-ctl led-f7 7)
(define-alsa-ctl led-f8 8)
(define-alsa-ctl led-touch1 9)
(define-alsa-ctl led-touch2 10)
(define-alsa-ctl led-touch3 11)
(define-alsa-ctl led-touch4 12)
(define-alsa-ctl led-touch5 13)
(define-alsa-ctl led-touch6 14)
(define-alsa-ctl led-touch7 15)
(define-alsa-ctl led-touch8 16)
(define-alsa-ctl led-f1 1 'integer)
(define-alsa-ctl led-f2 2 'integer)
(define-alsa-ctl led-f3 3 'integer)
(define-alsa-ctl led-f4 4 'integer)
(define-alsa-ctl led-f5 5 'integer)
(define-alsa-ctl led-f6 6 'integer)
(define-alsa-ctl led-f7 7 'integer)
(define-alsa-ctl led-f8 8 'integer)
(define-alsa-ctl led-touch1 9 'integer)
(define-alsa-ctl led-touch2 10 'integer)
(define-alsa-ctl led-touch3 11 'integer)
(define-alsa-ctl led-touch4 12 'integer)
(define-alsa-ctl led-touch5 13 'integer)
(define-alsa-ctl led-touch6 14 'integer)
(define-alsa-ctl led-touch7 15 'integer)
(define-alsa-ctl led-touch8 16 'integer)
(define-input-event button-1 ev-key btn-4)
(define-input-event button-2 ev-key btn-3)
......@@ -143,15 +144,15 @@
(define-input-event knob-8 ev-abs abs-hat3y)
;; Middle
(define-alsa-ctl led-left 17)
(define-alsa-ctl led-right 18)
(define-alsa-ctl led-up 19)
(define-alsa-ctl led-down 20)
(define-alsa-ctl led-stop 21)
(define-alsa-ctl led-play 22)
(define-alsa-ctl led-record 23)
(define-alsa-ctl led-listen 24)
(define-alsa-ctl led-lcd 25)
(define-alsa-ctl led-left 17 'integer)
(define-alsa-ctl led-right 18 'integer)
(define-alsa-ctl led-up 19 'integer)
(define-alsa-ctl led-down 20 'integer)
(define-alsa-ctl led-stop 21 'integer)
(define-alsa-ctl led-play 22 'integer)
(define-alsa-ctl led-record 23 'integer)
(define-alsa-ctl led-listen 24 'integer)
(define-alsa-ctl led-lcd 25 'integer)
(define-input-event button-right ev-key key-right)
(define-input-event button-down ev-key key-down)
......@@ -163,12 +164,12 @@
(define-input-event button-stop ev-key key-stop)
;; Right side
(define-alsa-ctl led-menu 26)
(define-alsa-ctl led-sound 27)
(define-alsa-ctl led-esc 28)
(define-alsa-ctl led-view 29)
(define-alsa-ctl led-enter 30)
(define-alsa-ctl led-control 31)
(define-alsa-ctl led-menu 26 'integer)
(define-alsa-ctl led-sound 27 'integer)
(define-alsa-ctl led-esc 28 'integer)
(define-alsa-ctl led-view 29 'integer)
(define-alsa-ctl led-enter 30 'integer)
(define-alsa-ctl led-control 31 'integer)
(define-input-event button-menu ev-key key-fn-f1)
(define-input-event button-control ev-key key-fn-f2)
......
......@@ -94,28 +94,29 @@
knob-volume-max
knob-rotary-max))
(use-modules (librekontrol input)
(librekontrol alsa)
(librekontrol device))
(define alsa-name "KoreController2")
(define input-name "Kore Controller 2")
;; Left side
(define-alsa-ctl led-f1 1)
(define-alsa-ctl led-f2 2)
(define-alsa-ctl led-f3 3)
(define-alsa-ctl led-f4 4)
(define-alsa-ctl led-f5 5)
(define-alsa-ctl led-f6 6)
(define-alsa-ctl led-f7 7)
(define-alsa-ctl led-f8 8)
(define-alsa-ctl led-touch1 9)
(define-alsa-ctl led-touch2 10)
(define-alsa-ctl led-touch3 11)
(define-alsa-ctl led-touch4 12)
(define-alsa-ctl led-touch5 13)
(define-alsa-ctl led-touch6 14)
(define-alsa-ctl led-touch7 15)
(define-alsa-ctl led-touch8 16)
(define-alsa-ctl led-f1 1 'integer)
(define-alsa-ctl led-f2 2 'integer)
(define-alsa-ctl led-f3 3 'integer)
(define-alsa-ctl led-f4 4 'integer)
(define-alsa-ctl led-f5 5 'integer)
(define-alsa-ctl led-f6 6 'integer)
(define-alsa-ctl led-f7 7 'integer)
(define-alsa-ctl led-f8 8 'integer)
(define-alsa-ctl led-touch1 9 'integer)
(define-alsa-ctl led-touch2 10 'integer)
(define-alsa-ctl led-touch3 11 'integer)
(define-alsa-ctl led-touch4 12 'integer)
(define-alsa-ctl led-touch5 13 'integer)
(define-alsa-ctl led-touch6 14 'integer)
(define-alsa-ctl led-touch7 15 'integer)
(define-alsa-ctl led-touch8 16 'integer)
(define-input-event button-1 ev-key btn-4)
(define-input-event button-2 ev-key btn-3)
......@@ -143,15 +144,15 @@
(define-input-event knob-8 ev-abs abs-hat3y)
;; Middle
(define-alsa-ctl led-left 17)
(define-alsa-ctl led-right 18)
(define-alsa-ctl led-up 19)
(define-alsa-ctl led-down 20)
(define-alsa-ctl led-stop 21)
(define-alsa-ctl led-play 22)
(define-alsa-ctl led-record 23)
(define-alsa-ctl led-listen 24)
(define-alsa-ctl led-lcd 25)
(define-alsa-ctl led-left 17 'integer)
(define-alsa-ctl led-right 18 'integer)
(define-alsa-ctl led-up 19 'integer)
(define-alsa-ctl led-down 20 'integer)
(define-alsa-ctl led-stop 21 'integer)
(define-alsa-ctl led-play 22 'integer)
(define-alsa-ctl led-record 23 'integer)
(define-alsa-ctl led-listen 24 'integer)
(define-alsa-ctl led-lcd 25 'integer)
(define-input-event button-right ev-key key-right)
(define-input-event button-down ev-key key-down)
......@@ -163,12 +164,12 @@
(define-input-event button-stop ev-key key-stop)
;; Right side
(define-alsa-ctl led-menu 26)
(define-alsa-ctl led-sound 27)
(define-alsa-ctl led-esc 28)
(define-alsa-ctl led-view 29)
(define-alsa-ctl led-enter 30)
(define-alsa-ctl led-control 31)
(define-alsa-ctl led-menu 26 'integer)
(define-alsa-ctl led-sound 27 'integer)
(define-alsa-ctl led-esc 28 'integer)
(define-alsa-ctl led-view 29 'integer)
(define-alsa-ctl led-enter 30 'integer)
(define-alsa-ctl led-control 31 'integer)
(define-input-event button-menu ev-key key-fn-f1)
(define-input-event button-control ev-key key-fn-f2)
......
......@@ -217,6 +217,7 @@
pad-max
knob-max))
(use-modules (librekontrol input)
(librekontrol alsa)
(librekontrol device))
(define alsa-name "MaschineControl")
......@@ -229,22 +230,22 @@
(+ x abs-pressure))
;; Pads
(define-alsa-ctl led-pad-1 1)
(define-alsa-ctl led-pad-2 2)
(define-alsa-ctl led-pad-3 3)
(define-alsa-ctl led-pad-4 4)
(define-alsa-ctl led-pad-5 5)
(define-alsa-ctl led-pad-6 6)
(define-alsa-ctl led-pad-7 7)
(define-alsa-ctl led-pad-8 8)
(define-alsa-ctl led-pad-9 9)
(define-alsa-ctl led-pad-10 10)
(define-alsa-ctl led-pad-11 11)
(define-alsa-ctl led-pad-12 12)
(define-alsa-ctl led-pad-13 13)
(define-alsa-ctl led-pad-14 14)
(define-alsa-ctl led-pad-15 15)
(define-alsa-ctl led-pad-16 16)
(define-alsa-ctl led-pad-1 1 'integer)
(define-alsa-ctl led-pad-2 2 'integer)
(define-alsa-ctl led-pad-3 3 'integer)
(define-alsa-ctl led-pad-4 4 'integer)
(define-alsa-ctl led-pad-5 5 'integer)
(define-alsa-ctl led-pad-6 6 'integer)
(define-alsa-ctl led-pad-7 7 'integer)
(define-alsa-ctl led-pad-8 8 'integer)
(define-alsa-ctl led-pad-9 9 'integer)
(define-alsa-ctl led-pad-10 10 'integer)
(define-alsa-ctl led-pad-11 11 'integer)
(define-alsa-ctl led-pad-12 12 'integer)
(define-alsa-ctl led-pad-13 13 'integer)
(define-alsa-ctl led-pad-14 14 'integer)
(define-alsa-ctl led-pad-15 15 'integer)
(define-alsa-ctl led-pad-16 16 'integer)
(define-input-event button-pad-1 ev-abs (pad 12))
(define-input-event button-pad-2 ev-abs (pad 13))
......@@ -281,14 +282,14 @@
(define-control pad-16 button-pad-16 led-pad-16)
;; Middle
(define-alsa-ctl led-mute 17)
(define-alsa-ctl led-solo 18)
(define-alsa-ctl led-select 19)
(define-alsa-ctl led-duplicate 20)
(define-alsa-ctl led-navigate 21)
(define-alsa-ctl led-pad-mode 22)
(define-alsa-ctl led-pattern 23)
(define-alsa-ctl led-scene 24)
(define-alsa-ctl led-mute 17 'integer)
(define-alsa-ctl led-solo 18 'integer)
(define-alsa-ctl led-select 19 'integer)
(define-alsa-ctl led-duplicate 20 'integer)
(define-alsa-ctl led-navigate 21 'integer)
(define-alsa-ctl led-pad-mode 22 'integer)
(define-alsa-ctl led-pattern 23 'integer)
(define-alsa-ctl led-scene 24 'integer)
(define-input-event button-mute ev-key (btn 40))
(define-input-event button-solo ev-key (btn 39))
......@@ -302,21 +303,21 @@
(define-control mute button-mute led-mute)
(define-control solo button-solo led-solo)
(define-control select button-select led-select)
(define-control duplicate button-duplicte led-duplicate)
(define-control duplicate button-duplicate led-duplicate)
(define-control navigate button-navigate led-navigate)
(define-control pad-mode button-pad-mode led-pad-mode)
(define-control pattern button-pattern led-pattern)
(define-control scene button-scene led-scene)
;; Transport
(define-alsa-ctl led-shift 25)
(define-alsa-ctl led-erase 26)
(define-alsa-ctl led-grid 27)
(define-alsa-ctl led-right-bottom 28)
(define-alsa-ctl led-rec 29)
(define-alsa-ctl led-play 30)
(define-alsa-ctl led-left-bottom 31)
(define-alsa-ctl led-restart 32)
(define-alsa-ctl led-shift 25 'integer)
(define-alsa-ctl led-erase 26 'integer)
(define-alsa-ctl led-grid 27 'integer)
(define-alsa-ctl led-right-bottom 28 'integer)
(define-alsa-ctl led-rec 29 'integer)
(define-alsa-ctl led-play 30 'integer)
(define-alsa-ctl led-left-bottom 31 'integer)
(define-alsa-ctl led-restart 32 'integer)
(define-input-event button-shift ev-key (btn 32))
(define-input-event button-erase ev-key (btn 31))
......@@ -337,14 +338,14 @@
(define-control restart button-restart led-restart)
; Groups
(define-alsa-ctl led-group-a 33)
(define-alsa-ctl led-group-b 34)
(define-alsa-ctl led-group-c 35)
(define-alsa-ctl led-group-d 36)
(define-alsa-ctl led-group-e 37)
(define-alsa-ctl led-group-f 38)
(define-alsa-ctl led-group-g 39)
(define-alsa-ctl led-group-h 40)
(define-alsa-ctl led-group-a 33 'integer)
(define-alsa-ctl led-group-b 34 'integer)
(define-alsa-ctl led-group-c 35 'integer)
(define-alsa-ctl led-group-d 36 'integer)
(define-alsa-ctl led-group-e 37 'integer)
(define-alsa-ctl led-group-f 38 'integer)
(define-alsa-ctl led-group-g 39 'integer)
(define-alsa-ctl led-group-h 40 'integer)
(define-input-event button-group-a ev-key (btn 17))
(define-input-event button-group-b ev-key (btn 18))
......@@ -365,14 +366,14 @@
(define-control group-h button-group-h led-group-h)
; Top-left
(define-alsa-ctl led-auto-write 41)
(define-alsa-ctl led-snap 42)
(define-alsa-ctl led-right-top 43)
(define-alsa-ctl led-left-top 44)
(define-alsa-ctl led-sampling 45)
(define-alsa-ctl led-browse 46)
(define-alsa-ctl led-step 47)
(define-alsa-ctl led-control 48)
(define-alsa-ctl led-auto-write 41 'integer)
(define-alsa-ctl led-snap 42 'integer)
(define-alsa-ctl led-right-top 43 'integer)
(define-alsa-ctl led-left-top 44 'integer)
(define-alsa-ctl led-sampling 45 'integer)
(define-alsa-ctl led-browse 46 'integer)
(define-alsa-ctl led-step 47 'integer)
(define-alsa-ctl led-control 48 'integer)
(define-input-event button-auto-write ev-key (btn 7))
(define-input-event button-snap ev-key (btn 6))
......@@ -393,14 +394,14 @@
(define-control control button-control led-control)
; Top
(define-alsa-ctl led-top-1 49)
(define-alsa-ctl led-top-2 50)
(define-alsa-ctl led-top-3 51)
(define-alsa-ctl led-top-4 52)
(define-alsa-ctl led-top-5 53)
(define-alsa-ctl led-top-6 54)
(define-alsa-ctl led-top-7 55)
(define-alsa-ctl led-top-8 56)
(define-alsa-ctl led-top-1 49 'integer)
(define-alsa-ctl led-top-2 50 'integer)
(define-alsa-ctl led-top-3 51 'integer)
(define-alsa-ctl led-top-4 52 'integer)
(define-alsa-ctl led-top-5 53 'integer)
(define-alsa-ctl led-top-6 54 'integer)
(define-alsa-ctl led-top-7 55 'integer)
(define-alsa-ctl led-top-8 56 'integer)
(define-input-event button-top-1 ev-key (btn 8))
(define-input-event button-top-2 ev-key (btn 9))
......@@ -429,10 +430,10 @@
(define-control volume knob-volume #f)
(define-control tempo knob-tempo #f)