diff options
author | Thomas White <taw@physics.org> | 2021-05-22 20:13:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-05-22 20:13:55 +0200 |
commit | a8f22ae3f9149f02e277badd63e9b37b3f3293b5 (patch) | |
tree | 911366dc21d273294751dfa520c329244af7fe32 /guile/starlet | |
parent | 82f75f966b1d8c02ac87b0030a724855c31881af (diff) |
send-note-on/off: Handle #f argument
Diffstat (limited to 'guile/starlet')
-rw-r--r-- | guile/starlet/midi-control/base.scm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/guile/starlet/midi-control/base.scm b/guile/starlet/midi-control/base.scm index c9a6118..f0947aa 100644 --- a/guile/starlet/midi-control/base.scm +++ b/guile/starlet/midi-control/base.scm @@ -127,18 +127,20 @@ (define* (send-note-on note #:key (channel #f)) - (enqueue-midi-bytes! (+ #b10010000 - (if channel channel default-channel)) - note - 127)) + (when note + (enqueue-midi-bytes! (+ #b10010000 + (if channel channel default-channel)) + note + 127))) (define* (send-note-off note #:key (channel #f)) - (enqueue-midi-bytes! (+ #b10000000 - (if channel channel default-channel)) - note - 0)) + (when note + (enqueue-midi-bytes! (+ #b10000000 + (if channel channel default-channel)) + note + 0))) (define (all-notes-off! channel) |