From 94a6e132b20a22a96b4b4616ab1dfb966d5c5847 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 2 Apr 2023 11:23:03 +0200 Subject: Move stuff to (taw controls) --- guile/taw/controls.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'guile') 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))) -- cgit v1.2.3