From 42f49129729e3f74244c4d752b225877cba631d2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 31 Dec 2020 10:50:16 +0100 Subject: Select fixture and change parameters via MIDI --- guile/starlet/base.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'guile/starlet/base.scm') diff --git a/guile/starlet/base.scm b/guile/starlet/base.scm index 15b6b72..76d6f61 100644 --- a/guile/starlet/base.scm +++ b/guile/starlet/base.scm @@ -24,6 +24,7 @@ merge-states-htp get-state-hash-table set-state-hash-table! + add-state-to-state! scanout-fixture attr-continuous attr-boolean @@ -33,6 +34,7 @@ apply-state at blackout + clear-state! home-val intensity? state-find @@ -260,6 +262,10 @@ val)) +(define (clear-state! state) + (set-state-hash-table! state (make-hash-table))) + + (define (merge-rule-ltp attr a b) (lambda (time) (value->number b time))) @@ -420,6 +426,20 @@ #:unwind? #f)))) + +(define (current-value fix attr-name) + ;; FIXME: Only need to track one fixture through the state stack + (let ((combined-state (merge-states-ltp + (list + (merge-states-htp + (reverse ;; Put "home" state last + (atomic-box-ref state-list))) + programmer-state + selection-state))) + (attr (find-attr fix attr-name))) + (value->number (state-find fix attr combined-state) 0))) + + (define-syntax attr-continuous (syntax-rules () ((_ attr-name attr-range attr-home-value) -- cgit v1.2.3