aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/midi-control/button-utils.scm
blob: 008d2c54a07e8ffde0875c35f0efbb99d466e397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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))))