diff options
author | Thomas White <taw@bitwiz.me.uk> | 2021-01-09 11:29:31 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2021-01-09 11:29:31 +0100 |
commit | 800195398b0dc5f33344ef6d1ef16cd047ba5b2f (patch) | |
tree | 7910b4e41b6798bde33bc64d6191228d068ee89e /guile/starlet/midi-control/button-utils.scm | |
parent | b60f73031bb275644243d46133df6568cecca40f (diff) |
Add select-on-button
Diffstat (limited to 'guile/starlet/midi-control/button-utils.scm')
-rw-r--r-- | guile/starlet/midi-control/button-utils.scm | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/guile/starlet/midi-control/button-utils.scm b/guile/starlet/midi-control/button-utils.scm new file mode 100644 index 0000000..008d2c5 --- /dev/null +++ b/guile/starlet/midi-control/button-utils.scm @@ -0,0 +1,31 @@ +(define-module (starlet midi-control button-utils) + #:use-module (starlet midi-control base) + #:use-module (starlet midi-control faders) + #:use-module (starlet playback) + #:export (make-go-button + make-stop-button + select-on-button)) + + +(define* (make-go-button pb button + #:key (channel #f)) + (register-midi-note-callback! + #:channel channel + #:note-number button + #:func (lambda () (go! pb)))) + + +(define* (make-stop-button pb button + #:key (channel #f)) + (register-midi-note-callback! + #:channel channel + #:note-number button + #:func (lambda () (display "Stop/back!\n")))) + + +(define* (select-on-button button fixture + #:key (channel #f)) + (register-midi-note-callback! + #:channel channel + #:note-number button + #:func (lambda () (sel fixture)))) |