From 8b844aa45344630a30e690f983de188d409615b8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 7 Apr 2021 21:31:12 +0200 Subject: Convert everything else to use --- examples/demo.scm | 11 ++++------- guile/starlet/fixture-library/robe.scm | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/examples/demo.scm b/examples/demo.scm index 76f3358..f7dcea9 100644 --- a/examples/demo.scm +++ b/examples/demo.scm @@ -83,7 +83,7 @@ ;; Set a parameter (at foh1 'intensity 80) (at floor4 'intensity 100) -(at floor4 'cyan 80) +(at floor4 'colour (make-colour-rgb 0 100 0)) ;; If parameter is not specified, 'intensity' is understood @@ -98,7 +98,7 @@ ;; Effects library (at floor2 'intensity 100) -(at floor2 'yellow 100) +(at floor2 'colour (make-colour-cmy 0 0 100)) (at floor2 'pan 0) (at floor2 'tilt (sinewave 0.5 100 170)) @@ -214,15 +214,12 @@ (cue 3 (lighting-state - (at floor3 (quote magenta) 11500/127) (at floor3 (quote pan) 299) (at floor3 (quote intensity) 156) (at floor3 (quote tilt) 48) - (at floor4 (quote magenta) 11200/127) - (at floor4 (quote cyan) 200/127) - (at floor3 (quote yellow) 100) + (at floor4 'colour (make-colour-cmy 200/127 11500/127 100)) + (at floor3 'colour (make-colour-cmy 200/127 11500/127 100)) (at floor4 (quote intensity) 127) - (at floor4 (quote yellow) 10000/127) (at floor4 (quote pan) 239) (at floor2 (quote intensity) -58) (at floor4 (quote tilt) 49)) diff --git a/guile/starlet/fixture-library/robe.scm b/guile/starlet/fixture-library/robe.scm index 19b9a51..d1ae3ae 100644 --- a/guile/starlet/fixture-library/robe.scm +++ b/guile/starlet/fixture-library/robe.scm @@ -16,9 +16,7 @@ (attr-list 'strobe '(#t #f) #f) (attr-list 'prism '(#t #f) #f) (attr-list 'tungsten-watts-emulation '(750 1000 1200 2000 2500 #f) #f) - (attr-continuous 'cyan '(0 100) 0) - (attr-continuous 'magenta '(0 100) 0) - (attr-continuous 'yellow '(0 100) 0) + (attr-colour 'colour white) (attr-continuous 'colour-temperature-correction '(2700 8000) 8000) (attr-continuous 'green-correction '(-100 100) 0)))) @@ -43,9 +41,10 @@ (#f . 107)) (get-attr 'tungsten-watts-emulation))) - (set-chan16 9 (percent->dmxval16 (get-attr 'cyan))) - (set-chan16 11 (percent->dmxval16 (get-attr 'magenta))) - (set-chan16 13 (percent->dmxval16 (get-attr 'yellow)))) + (let ((cmy (colour-as-cmy (get-attr 'colour)))) + (set-chan8 9 (percent->dmxval8 (car cmy))) + (set-chan8 11 (percent->dmxval8 (cadr cmy))) + (set-chan8 13 (percent->dmxval8 (caddr cmy))))) (define-class () @@ -58,9 +57,7 @@ (attr-list 'colwheel '(#f red blue orange green amber uv) #f) (attr-list 'gobo '(#f iris gobo1 gobo2 gobo3 gobo4 gobo5 gobo6) #f) (attr-list 'beamtype '(beam beamwash beamwashext) 'beam) - (attr-continuous 'cyan '(0 100) 0) - (attr-continuous 'magenta '(0 100) 0) - (attr-continuous 'yellow '(0 100) 0) + (attr-colour 'colour white) (attr-continuous 'zoom '(0 100) 0) (attr-continuous 'focus '(0 100) 0) (attr-continuous 'barndoor-rot '(0 180) 90) @@ -113,9 +110,10 @@ (beamwashext . 45)) (get-attr 'beamtype))) - (set-chan8 9 (percent->dmxval8 (get-attr 'cyan))) - (set-chan8 10 (percent->dmxval8 (get-attr 'magenta))) - (set-chan8 11 (percent->dmxval8 (get-attr 'yellow)))) + (let ((cmy (colour-as-cmy (get-attr 'colour)))) + (set-chan8 9 (percent->dmxval8 (car cmy))) + (set-chan8 10 (percent->dmxval8 (cadr cmy))) + (set-chan8 11 (percent->dmxval8 (caddr cmy))))) (define-class () -- cgit v1.2.3