diff options
author | Thomas White <taw@physics.org> | 2022-10-30 09:27:50 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-10-30 09:27:50 +0100 |
commit | 9a617419876d2f3a79dbc50071ae0105f731d6ec (patch) | |
tree | eed4421c0bb156155f9ca3662012a58579790aa8 | |
parent | a7539f9c3f80d874898eaed32e8521d970cba86f (diff) |
Add find-midi-device
-rw-r--r-- | guile/starlet/midi-control/base.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/guile/starlet/midi-control/base.scm b/guile/starlet/midi-control/base.scm index bed1a1f..7b28ea7 100644 --- a/guile/starlet/midi-control/base.scm +++ b/guile/starlet/midi-control/base.scm @@ -26,6 +26,7 @@ #:use-module (ice-9 binary-ports) #:use-module (srfi srfi-1) #:export (make-midi-controller + find-midi-device get-cc-value ccval->percent percent->ccval @@ -292,3 +293,11 @@ controller 'cc cc-num (lambda (prev new) (set-sensitivity controller prev new)))) + + +(define (find-midi-device) + (find file-exists? + (list "/dev/snd/midiC0D0" + "/dev/snd/midiC1D0" + "/dev/snd/midiC2D0" + "/dev/snd/midiC3D0"))) |