aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/midi-control/faders.scm
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-08 17:42:08 +0100
committerThomas White <taw@physics.org>2021-03-08 22:21:44 +0100
commit29f797a94191cc22cafe24b1f4dd61c306e1bf8e (patch)
tree1704f472395dd83796420b38f08b2caa02472cd5 /guile/starlet/midi-control/faders.scm
parent269fb0b06a89a0e2c15acbce117fee75f9e15cb5 (diff)
Remove home state and abolish fixture-attribute use in states
The "home state" has no reason to exist. The home values are already stored perfectly well in the attribute lists of the fixtures. Any time we need to look up a home value, we already have the fixture itself available. This also gets rid of any use of <fixture-attribute> in states. This was confusing me. Better to just pass symbols around and only get the real attribute objects when needed (which isn't very often).
Diffstat (limited to 'guile/starlet/midi-control/faders.scm')
-rw-r--r--guile/starlet/midi-control/faders.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/guile/starlet/midi-control/faders.scm b/guile/starlet/midi-control/faders.scm
index 97ed1ff..ae8162a 100644
--- a/guile/starlet/midi-control/faders.scm
+++ b/guile/starlet/midi-control/faders.scm
@@ -80,10 +80,10 @@
#:func (lambda (prev-cc-val new-cc-value)
(set! offset (+ offset (ccval->offset new-cc-value)))
(for-each (lambda (fix old-val)
- (set-attr! programmer-state
- fix
- attr
- (+ old-val offset)))
+ (set-in-state! programmer-state
+ fix
+ attr
+ (+ old-val offset)))
fixtures old-vals)))))))
@@ -129,11 +129,11 @@
initial-vals
fixtures)
(for-each (lambda (fix initial-val gradient)
- (set-attr! programmer-state
- fix
- attr-name
- (+ initial-val
- (* gradient cc-offset))))
+ (set-in-state! programmer-state
+ fix
+ attr-name
+ (+ initial-val
+ (* gradient cc-offset))))
fixtures
initial-vals
gradients))