aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-02 11:23:03 +0200
committerThomas White <taw@physics.org>2023-04-02 11:23:03 +0200
commit94a6e132b20a22a96b4b4616ab1dfb966d5c5847 (patch)
tree68aae343b6ad3fd7f737575009f87355110d46cd
parent2cecec66f8922fcb547898809690842c76423f2f (diff)
Move stuff to (taw controls)
-rw-r--r--guile/taw/controls.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/guile/taw/controls.scm b/guile/taw/controls.scm
index a74bd30..06658e3 100644
--- a/guile/taw/controls.scm
+++ b/guile/taw/controls.scm
@@ -1,12 +1,25 @@
(define-module (taw controls)
+ #:use-module (starlet attributes)
+ #:use-module (starlet playback)
+ #:use-module (starlet colours)
#:use-module (starlet midi-control base)
#:use-module (starlet midi-control button-utils)
#:use-module (starlet midi-control faders)
- #:export (taw-playback-controls))
+ #:export (taw-playback-controls
+ taw-selection-controls))
(define (taw-playback-controls controller pb)
+ (register-midi-note-callback!
+ controller
+ #:note-number 25
+ #:func (lambda ()
+ (reload-cue-list! pb)
+ (reassert-current-cue! pb)))
+
+ (send-note-on controller 25)
+
(make-go-button controller pb 12
#:ready-note 20
#:pause-note 16)
@@ -24,3 +37,18 @@
#:ready-note 31))
+(define (taw-selection-controls controller)
+
+ ;; Red button de-selects everything
+ (select-on-button controller 26 #f
+ #:ready-note 26)
+
+ ;; My control map
+ (set-midi-control-map!
+ controller
+ (fader 16 intensity #:congruent 108 #:incongruent 72)
+ (jogwheel 0 intensity #:active 124)
+ (fader 4 (colour-component-id 'cyan) #:congruent 120 #:incongruent 84)
+ (fader 5 (colour-component-id 'magenta) #:congruent 121 #:incongruent 85)
+ (fader 6 (colour-component-id 'yellow) #:congruent 122 #:incongruent 86)
+ (fader 7 colour-temperature #:congruent 123 #:incongruent 87)))