diff options
Diffstat (limited to 'guile')
-rw-r--r-- | guile/guile-midi/control.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/guile/guile-midi/control.scm b/guile/guile-midi/control.scm index e3ff848..548eead 100644 --- a/guile/guile-midi/control.scm +++ b/guile/guile-midi/control.scm @@ -9,6 +9,7 @@ get-controller-value make-midi-led set-midi-led! + all-notes-off! register-midi-note-callback!)) @@ -114,6 +115,13 @@ 0))) +(define (all-notes-off! channel) + (let again ((l 0)) + (enqueue-midi-bytes! (+ #b10000000 channel) l 0) + (unless (= l 127) + (again (+ l 1))))) + + (define (handle-cc-change! channel cc-number value) (for-each (lambda (a) (atomic-box-set! (get-value-box a) value)) |