diff options
author | Thomas White <taw@physics.org> | 2023-05-14 21:48:05 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-05-14 21:48:05 +0200 |
commit | a1feb3a6fe9bdadbc39294ddaf3d07c8655fc9f4 (patch) | |
tree | 1d9aecf85f2df712ed7537353b53d7ff54e5a5cc /guile/starlet/open-sound-control/utils.scm | |
parent | d2138c27ffc90080fe7e0b16a9e7f3109200ee23 (diff) |
Send selection via OSC
Diffstat (limited to 'guile/starlet/open-sound-control/utils.scm')
-rw-r--r-- | guile/starlet/open-sound-control/utils.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/guile/starlet/open-sound-control/utils.scm b/guile/starlet/open-sound-control/utils.scm index 34c4127..4f0a60b 100644 --- a/guile/starlet/open-sound-control/utils.scm +++ b/guile/starlet/open-sound-control/utils.scm @@ -33,7 +33,8 @@ osc-playback-controls osc-select-button osc-parameter-encoder - osc-state-fader)) + osc-state-fader + send-selection-updates-to)) (define* (osc-playback-controls pb server go-method stop-method back-method @@ -151,3 +152,13 @@ (add-osc-method server fader "i" (lambda (v) (set! fader-val v))))) + + +(define (send-selection-updates-to addr) + (add-hook! + selection-hook + (lambda (sel) + (osc-send + addr + "/starlet/selection/update" + (get-selection-as-string))))) |