Commit 0dd4bee8 authored by Brandon Invergo's avatar Brandon Invergo

Clean up use of Guile's module system

parent 17944120
...@@ -14,19 +14,18 @@ ...@@ -14,19 +14,18 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol alsa) (define-module (librekontrol alsa)
:export (make-alsa-ctl #:use-module (srfi srfi-9)
alsa-ctl? #:export (make-alsa-ctl
alsa-ctl-numid alsa-ctl?
alsa-ctl-type alsa-ctl-numid
alsa-ctl-descr alsa-ctl-type
set-alsa-ctl-descr! alsa-ctl-descr
define-alsa-ctl set-alsa-ctl-descr!
open-alsa-ctl define-alsa-ctl
set-ctl open-alsa-ctl
toggle-ctl set-ctl
turn-off-ctls)) toggle-ctl
turn-off-ctls))
(use-modules (srfi srfi-9))
(define-record-type <alsa-ctl> (define-record-type <alsa-ctl>
(make-alsa-ctl numid type descr) (make-alsa-ctl numid type descr)
......
...@@ -14,36 +14,35 @@ ...@@ -14,36 +14,35 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol device) (define-module (librekontrol device)
:export (make-control #:use-module (srfi srfi-9)
control? #:use-module (ice-9 optargs)
control-device #:use-module (librekontrol core)
control-input-event #:use-module (librekontrol alsa)
control-alsa-ctl #:use-module (librekontrol input)
connect-control #:use-module ((librekontrol midi) #:prefix midi:)
define-control #:export (make-control
make-input-max-parameter control?
configure-device control-device
midi-note-button control-input-event
make-midi-note-button-toggle control-alsa-ctl
remap-button connect-control
make-remap-button-toggle define-control
system-button make-input-max-parameter
make-system-button-toggle configure-device
rel-knob-to-button midi-note-button
make-abs-knob-to-button make-midi-note-button-toggle
system-abs-knob remap-button
system-rel-knob make-remap-button-toggle
make-abs-to-rel-system-knob system-button
midi-control-abs-knob make-system-button-toggle
make-rel-to-abs-midi-control-knob rel-knob-to-button
midi-note-pad)) make-abs-knob-to-button
system-abs-knob
(use-modules (srfi srfi-9) system-rel-knob
(ice-9 optargs) make-abs-to-rel-system-knob
(librekontrol core) midi-control-abs-knob
(librekontrol alsa) make-rel-to-abs-midi-control-knob
(librekontrol input) midi-note-pad))
((librekontrol midi) #:prefix midi:))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Defining "control" structures and mapping them to callback ;; ;; Defining "control" structures and mapping them to callback ;;
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-a4dj) (define-module (librekontrol devices ni-a4dj)
:export (alsa-name #:use-module (librekontrol alsa)
input-name #:export (alsa-name
led-current-input)) input-name
(use-modules (librekontrol alsa)) led-current-input))
(define alsa-name "Audio4DJ") (define alsa-name "Audio4DJ")
(define input-name #f) (define input-name #f)
......
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-a8dj) (define-module (librekontrol devices ni-a8dj)
:export (alsa-name #:use-module (librekontrol alsa)
input-name #:export (alsa-name
led-current-input input-name
led-gnd-lift-vinyl led-current-input
led-gnd-lift-cd led-gnd-lift-vinyl
led-gnd-lift-phono led-gnd-lift-cd
led-software-lock)) led-gnd-lift-phono
(use-modules (librekontrol alsa)) led-software-lock))
(define alsa-name "Audio8DJ") (define alsa-name "Audio8DJ")
(define input-name #f) (define input-name #f)
......
...@@ -14,24 +14,24 @@ ...@@ -14,24 +14,24 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-ak1) (define-module (librekontrol devices ni-ak1)
:export (alsa-name #:use-module (librekontrol input)
input-name #:use-module (librekontrol alsa)
button-left #:use-module (librekontrol device)
button-middle #:export (alsa-name
button-right input-name
knob-ring button-left
led-left button-middle
led-middle button-right
led-right knob-ring
led-ring led-left
left led-middle
middle led-right
right led-ring
knob left
knob-max)) middle
(use-modules (librekontrol input) right
(librekontrol alsa) knob
(librekontrol device)) knob-max))
(define alsa-name "AudioKontrol1") (define alsa-name "AudioKontrol1")
(define input-name "Audio Kontrol 1") (define input-name "Audio Kontrol 1")
......
This diff is collapsed.
...@@ -14,96 +14,96 @@ ...@@ -14,96 +14,96 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-kontrolx1) (define-module (librekontrol devices ni-kontrolx1)
:export (alsa-name #:use-module (librekontrol input)
input-name #:use-module (librekontrol alsa)
led-fx-a-on #:use-module (librekontrol device)
led-fx-a-1 #:export (alsa-name
led-fx-a-2 input-name
led-fx-a-3 led-fx-a-on
led-fx-b-on led-fx-a-1
led-fx-b-1 led-fx-a-2
led-fx-b-2 led-fx-a-3
led-fx-b-3 led-fx-b-on
pot-fx-a-dry/wet led-fx-b-1
pot-fx-a-1 led-fx-b-2
pot-fx-a-2 led-fx-b-3
pot-fx-a-3 pot-fx-a-dry/wet
pot-fx-b-dry/wet pot-fx-a-1
pot-fx-b-1 pot-fx-a-2
pot-fx-b-2 pot-fx-a-3
pot-fx-b-3 pot-fx-b-dry/wet
led-hotcue pot-fx-b-1
led-shift-white pot-fx-b-2
led-shift-green pot-fx-b-3
led-deck-a-fx1 led-hotcue
led-deck-a-fx2 led-shift-white
led-deck-a-in led-shift-green
led-deck-a-out led-deck-a-fx1
led-deck-a-<beat led-deck-a-fx2
led-deck-a-beat> led-deck-a-in
led-deck-a-cue led-deck-a-out
led-deck-a-cup led-deck-a-<beat
led-deck-a-play led-deck-a-beat>
led-deck-a-sync led-deck-a-cue
knob-deck-a-1 led-deck-a-cup
knob-deck-a-2 led-deck-a-play
led-deck-b-fx1 led-deck-a-sync
led-deck-b-fx2 knob-deck-a-1
led-deck-b-in knob-deck-a-2
led-deck-b-out led-deck-b-fx1
led-deck-b-<beat led-deck-b-fx2
led-deck-b-beat> led-deck-b-in
led-deck-b-cue led-deck-b-out
led-deck-b-cup led-deck-b-<beat
led-deck-b-play led-deck-b-beat>
led-deck-b-sync led-deck-b-cue
knob-deck-b-1 led-deck-b-cup
knob-deck-b-2 led-deck-b-play
button-unknown-1 led-deck-b-sync
button-unknown-2 knob-deck-b-1
button-unknown-3 knob-deck-b-2
button-unknown-4 button-unknown-1
button-unknown-5 button-unknown-2
button-unknown-6 button-unknown-3
button-unknown-7 button-unknown-4
button-unknown-8 button-unknown-5
button-unknown-9 button-unknown-6
button-unknown-10 button-unknown-7
button-unknown-11 button-unknown-8
button-unknown-12 button-unknown-9
button-unknown-13 button-unknown-10
button-unknown-14 button-unknown-11
button-unknown-15 button-unknown-12
button-unknown-16 button-unknown-13
button-unknown-17 button-unknown-14
button-unknown-18 button-unknown-15
button-unknown-19 button-unknown-16
button-unknown-20 button-unknown-17
button-unknown-21 button-unknown-18
button-unknown-22 button-unknown-19
button-unknown-23 button-unknown-20
button-unknown-24 button-unknown-21
button-unknown-25 button-unknown-22
button-unknown-26 button-unknown-23
button-unknown-27 button-unknown-24
button-unknown-28 button-unknown-25
button-unknown-29 button-unknown-26
button-unknown-30 button-unknown-27
button-unknown-31 button-unknown-28
button-unknown-32 button-unknown-29
button-unknown-33 button-unknown-30
button-unknown-34 button-unknown-31
button-unknown-35 button-unknown-32
button-unknown-36 button-unknown-33
button-unknown-37 button-unknown-34
button-unknown-38 button-unknown-35
button-unknown-39 button-unknown-36
button-unknown-40 button-unknown-37
pot-max button-unknown-38
knob-max)) button-unknown-39
(use-modules (librekontrol input) button-unknown-40
(librekontrol alsa) pot-max
(librekontrol device)) knob-max))
(define alsa-name "TraktorKontrolX") (define alsa-name "TraktorKontrolX")
(define input-name "Traktor Kontrol X1") (define input-name "Traktor Kontrol X1")
......
...@@ -14,88 +14,88 @@ ...@@ -14,88 +14,88 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-kore) (define-module (librekontrol devices ni-kore)
:export (alsa-name #:use-module (librekontrol input)
input-name #:use-module (librekontrol alsa)
led-f1 #:use-module (librekontrol device)
led-f2 #:export (alsa-name
led-f3 input-name
led-f4 led-f1
led-f5 led-f2
led-f6 led-f3
led-f7 led-f4
led-f8 led-f5
led-touch1 led-f6
led-touch2 led-f7
led-touch3 led-f8
led-touch4 led-touch1
led-touch5 led-touch2
led-touch6 led-touch3
led-touch7 led-touch4
led-touch8 led-touch5
button-1 led-touch6
button-2 led-touch7
button-3 led-touch8
button-4 button-1
button-5 button-2
button-6 button-3
button-7 button-4
button-8 button-5
button-knob-1 button-6
button-knob-2 button-7
button-knob-3 button-8
button-knob-4 button-knob-1
button-knob-5 button-knob-2
button-knob-6 button-knob-3
button-knob-7 button-knob-4
button-knob-8 button-knob-5
knob-1 button-knob-6
knob-2 button-knob-7
knob-3 button-knob-8
knob-4 knob-1
knob-5 knob-2
knob-6 knob-3
knob-7 knob-4
knob-8 knob-5
led-left knob-6
led-right knob-7
led-up knob-8
led-down led-left
led-stop led-right
led-play led-up
led-record led-down
led-listen led-stop
led-lcd led-play
button-right led-record
button-down led-listen
button-up led-lcd
button-left button-right
button-listen button-down
button-record button-up
button-playpause button-left
button-stop button-listen
led-menu button-record
led-sound button-playpause
led-esc button-stop
led-view led-menu
led-enter led-sound
led-control led-esc
button-menu led-view
button-control led-enter
button-enter led-control
button-view button-menu
button-esc button-control
button-sound button-enter
knob-rotary button-view
knob-input button-esc
knob-phones button-sound
knob-output knob-rotary
button-lcd-backlight knob-input
knob-max knob-phones
knob-volume-max knob-output
knob-rotary-max)) button-lcd-backlight
(use-modules (librekontrol input) knob-max
(librekontrol alsa) knob-volume-max
(librekontrol device)) knob-rotary-max))
(define alsa-name "KoreController") (define alsa-name "KoreController")
(define input-name "Kore Controller") (define input-name "Kore Controller")
......
...@@ -14,88 +14,88 @@ ...@@ -14,88 +14,88 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-kore2) (define-module (librekontrol devices ni-kore2)
:export (alsa-name #:use-module (librekontrol input)
input-name #:use-module (librekontrol alsa)
led-f1 #:use-module (librekontrol device)
led-f2 #:export (alsa-name
led-f3 input-name
led-f4 led-f1
led-f5 led-f2
led-f6 led-f3
led-f7 led-f4
led-f8 led-f5
led-touch1 led-f6
led-touch2 led-f7
led-touch3 led-f8
led-touch4 led-touch1
led-touch5 led-touch2
led-touch6 led-touch3
led-touch7 led-touch4
led-touch8 led-touch5
button-1 led-touch6
button-2 led-touch7
button-3 led-touch8
button-4 button-1
button-5 button-2
button-6 button-3
button-7 button-4
button-8 button-5
button-knob-1 button-6
button-knob-2 button-7
button-knob-3 button-8
button-knob-4 button-knob-1
button-knob-5 button-knob-2
button-knob-6 button-knob-3
button-knob-7 button-knob-4
button-knob-8 button-knob-5
knob-1 button-knob-6
knob-2 button-knob-7
knob-3 button-knob-8
knob-4 knob-1
knob-5 knob-2
knob-6 knob-3
knob-7 knob-4
knob-8 knob-5
led-left knob-6
led-right knob-7
led-up knob-8
led-down led-left
led-stop led-right
led-play led-up
led-record led-down
led-listen led-stop
led-lcd led-play
button-right led-record
button-down led-listen
button-up led-lcd
button-left button-right
button-listen button-down
button-record button-up
button-playpause button-left
button-stop button-listen
led-menu button-record
led-sound button-playpause
led-esc button-stop
led-view led-menu
led-enter led-sound
led-control led-esc
button-menu led-view
button-control led-enter
button-enter led-control
button-view button-menu
button-esc button-control
button-sound button-enter
knob-rotary button-view
knob-input button-esc
knob-phones button-sound
knob-output knob-rotary
button-lcd-backlight knob-input
knob-max knob-phones
knob-volume-max knob-output
knob-rotary-max)) button-lcd-backlight
(use-modules (librekontrol input) knob-max
(librekontrol alsa) knob-volume-max
(librekontrol device)) knob-rotary-max))
(define alsa-name "KoreController2") (define alsa-name "KoreController2")
(define input-name "Kore Controller 2") (define input-name "Kore Controller 2")
......
...@@ -14,211 +14,211 @@ ...@@ -14,211 +14,211 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (librekontrol devices ni-maschine) (define-module (librekontrol devices ni-maschine)
:export (alsa-name #:use-module (librekontrol input)
input-name #:use-module (librekontrol alsa)
led-pad-1 #:use-module (librekontrol device)
led-pad-2 #:export (alsa-name
led-pad-3 input-name
led-pad-4 led-pad-1
led-pad-5 led-pad-2
led-pad-6 led-pad-3
led-pad-7 led-pad-4
led-pad-8 led-pad-5
led-pad-9 led-pad-6
led-pad-10 led-pad-7
led-pad-11 led-pad-8
led-pad-12 led-pad-9
led-pad-13 led-pad-10