aboutsummaryrefslogtreecommitdiff
path: root/guile/starlet/fixture-library
diff options
context:
space:
mode:
Diffstat (limited to 'guile/starlet/fixture-library')
-rw-r--r--guile/starlet/fixture-library/adj/mega-tripar-profile.scm63
-rw-r--r--guile/starlet/fixture-library/chauvet/mav2.scm50
-rw-r--r--guile/starlet/fixture-library/chauvet/mav2/32chan.scm49
-rw-r--r--guile/starlet/fixture-library/generic/any-rgb.scm62
-rw-r--r--guile/starlet/fixture-library/generic/dimmer.scm20
-rw-r--r--guile/starlet/fixture-library/generic/rgb.scm51
-rw-r--r--guile/starlet/fixture-library/lightmaxx/led-cob.scm45
-rw-r--r--guile/starlet/fixture-library/robe/dl7s.scm241
-rw-r--r--guile/starlet/fixture-library/robe/dl7s/mode1.scm65
-rw-r--r--guile/starlet/fixture-library/robe/mmxspot.scm87
-rw-r--r--guile/starlet/fixture-library/robe/mmxspot/mode1.scm87
-rw-r--r--guile/starlet/fixture-library/robe/mmxwashbeam.scm94
-rw-r--r--guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm94
-rw-r--r--guile/starlet/fixture-library/stairville/octagon-theater-cw-ww.scm51
-rw-r--r--guile/starlet/fixture-library/stairville/z120m.scm69
-rw-r--r--guile/starlet/fixture-library/tadm/led-bar.scm46
16 files changed, 794 insertions, 380 deletions
diff --git a/guile/starlet/fixture-library/adj/mega-tripar-profile.scm b/guile/starlet/fixture-library/adj/mega-tripar-profile.scm
new file mode 100644
index 0000000..4815fa9
--- /dev/null
+++ b/guile/starlet/fixture-library/adj/mega-tripar-profile.scm
@@ -0,0 +1,63 @@
+;;
+;; starlet/fixture-library/adj/mega-tripar-profile.scm
+;;
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.me.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library adj mega-tripar-profile)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet utils)
+ #:use-module (starlet colours)
+ #:export (<adj-mega-tripar-profile-3ch>
+ <adj-mega-tripar-profile-4ch>))
+
+
+;; 3 channel mode (RGB direct control)
+
+(define-fixture
+
+ <adj-mega-tripar-profile-3ch>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white))
+
+ (let ((intensity (/ (get-attr intensity) 100))
+ (rgb (colour-as-rgb (get-attr colour))))
+ (set-chan8 1 (percent->dmxval8 (* intensity (car rgb))))
+ (set-chan8 2 (percent->dmxval8 (* intensity (cadr rgb))))
+ (set-chan8 3 (percent->dmxval8 (* intensity (caddr rgb))))))
+
+
+;; 4 channel mode (RGB + separate intensity)
+
+(define-fixture
+
+ <adj-mega-tripar-profile-4ch>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white))
+
+ (let ((rgb (colour-as-rgb (get-attr colour))))
+ (set-chan8 1 (percent->dmxval8 (get-attr intensity)))
+ (set-chan8 2 (percent->dmxval8 (car rgb)))
+ (set-chan8 3 (percent->dmxval8 (cadr rgb)))
+ (set-chan8 4 (percent->dmxval8 (caddr rgb)))))
+
diff --git a/guile/starlet/fixture-library/chauvet/mav2.scm b/guile/starlet/fixture-library/chauvet/mav2.scm
new file mode 100644
index 0000000..5fae168
--- /dev/null
+++ b/guile/starlet/fixture-library/chauvet/mav2.scm
@@ -0,0 +1,50 @@
+;;
+;; starlet/fixture-library/chauvet.scm
+;;
+;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library chauvet mav2)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet utils)
+ #:use-module (starlet colours)
+ #:export (<chauvet-mav2-32ch>))
+
+
+(define-fixture
+
+ <chauvet-mav2-32ch>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-continuous pan '(0 540) 270)
+ (attr-continuous tilt '(0 270) 135)
+ (attr-continuous cyan '(0 100) 0)
+ (attr-continuous magenta '(0 100) 0)
+ (attr-continuous yellow '(0 100) 0))
+
+ (set-chan-16bit 1 (get-attr pan) 540)
+ (set-chan-16bit 3 (get-attr tilt) 270)
+ (set-chan-16bit 6 (get-attr intensity) 100)
+
+ (set-chan 10 (percent->dmxval (get-attr cyan)))
+ (set-chan 11 (percent->dmxval (get-attr magenta)))
+ (set-chan 12 (percent->dmxval (get-attr yellow)))
+
+ (set-chan 8 255))
diff --git a/guile/starlet/fixture-library/chauvet/mav2/32chan.scm b/guile/starlet/fixture-library/chauvet/mav2/32chan.scm
deleted file mode 100644
index 5868587..0000000
--- a/guile/starlet/fixture-library/chauvet/mav2/32chan.scm
+++ /dev/null
@@ -1,49 +0,0 @@
-;;
-;; starlet/fixture-library/chauvet.scm
-;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
-;;
-;; This file is part of Starlet.
-;;
-;; Starlet is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;;
-(define-module (starlet fixture-library chauvet)
- #:use-module (oop goops)
- #:use-module (starlet fixture)
- #:export (<chauvet-mav2-32ch>))
-
-
-(define-class <chauvet-mav2-32ch> (<fixture>)
- (attributes
- #:init-form (list
- (attr-continuous 'intensity '(0 100) 0)
- (attr-continuous 'pan '(0 540) 270)
- (attr-continuous 'tilt '(0 270) 135)
- (attr-continuous 'cyan '(0 100) 0)
- (attr-continuous 'magenta '(0 100) 0)
- (attr-continuous 'yellow '(0 100) 0))))
-
-
-(define-method (scanout-fixture (fixture <chauvet-mav2-32ch>)
- get-attr set-chan set-chan-16bit)
-
- (set-chan-16bit 1 (get-attr 'pan) 540)
- (set-chan-16bit 3 (get-attr 'tilt) 270)
- (set-chan-16bit 6 (get-attr 'intensity) 100)
-
- (set-chan 10 (percent->dmxval (get-attr 'cyan)))
- (set-chan 11 (percent->dmxval (get-attr 'magenta)))
- (set-chan 12 (percent->dmxval (get-attr 'yellow)))
-
- (set-chan 8 255))
diff --git a/guile/starlet/fixture-library/generic/any-rgb.scm b/guile/starlet/fixture-library/generic/any-rgb.scm
deleted file mode 100644
index 1fc3fe2..0000000
--- a/guile/starlet/fixture-library/generic/any-rgb.scm
+++ /dev/null
@@ -1,62 +0,0 @@
-;;
-;; starlet/fixture-library/generic/any-rgb.scm
-;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
-;;
-;; This file is part of Starlet.
-;;
-;; Starlet is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;;
-(define-module (starlet fixture-library generic any-rgb)
- #:use-module (oop goops)
- #:use-module (starlet fixture)
- #:export (make-any-rgb))
-
-
-(define (chan->attr chan)
- (attr-continuous chan '(0 100) 0))
-
-
-(define (make-any-rgb chans)
-
- (let ((new-class (make-class
- (list <fixture>)
- (list (cons 'attributes
- (list #:init-thunk
- (lambda ()
- (map chan->attr chans)))))
- #:name 'generic-rgb)))
-
- (add-method!
- scanout-fixture
- (method ((fix new-class) get-attr set-chan8 set-chan16)
- (for-each
-
- (lambda (chan offset)
-
- (cond
-
- ((eq? chan '0)
- (set-chan8 offset 0))
-
- ((eq? chan 'FL)
- (set-chan8 offset 255))
-
- (else (set-chan8 offset
- (percent->dmxval8
- (get-attr chan))))))
-
- chans (iota (length chans) 1))))
-
- new-class))
diff --git a/guile/starlet/fixture-library/generic/dimmer.scm b/guile/starlet/fixture-library/generic/dimmer.scm
index 65e6d99..6b25c15 100644
--- a/guile/starlet/fixture-library/generic/dimmer.scm
+++ b/guile/starlet/fixture-library/generic/dimmer.scm
@@ -1,7 +1,7 @@
;;
;; starlet/fixture-library/generic/dimmer.scm
;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.org.uk>
;;
;; This file is part of Starlet.
;;
@@ -19,20 +19,18 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;
(define-module (starlet fixture-library generic dimmer)
- #:use-module (oop goops)
+ #:use-module (starlet scanout)
#:use-module (starlet fixture)
+ #:use-module (starlet utils)
+ #:use-module (starlet attributes)
#:export (<generic-dimmer>))
+(define-fixture
-(define-class <generic-dimmer> (<fixture>)
- (attributes
- #:init-form (list
- (attr-continuous 'intensity '(0 100) 0))))
+ <generic-dimmer>
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0))
-(define-method (scanout-fixture (fixture <generic-dimmer>)
- get-attr set-chan8 set-chan16)
-
- ;; Set DMX value for intensity
- (set-chan8 1 (percent->dmxval8 (get-attr 'intensity))))
+ (set-chan8 1 (percent->dmxval8 (get-attr intensity))))
diff --git a/guile/starlet/fixture-library/generic/rgb.scm b/guile/starlet/fixture-library/generic/rgb.scm
index 6fa281d..a47b48d 100644
--- a/guile/starlet/fixture-library/generic/rgb.scm
+++ b/guile/starlet/fixture-library/generic/rgb.scm
@@ -1,7 +1,7 @@
;;
;; starlet/fixture-library/generic/rgb.scm
;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.org.uk>
;;
;; This file is part of Starlet.
;;
@@ -19,25 +19,52 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;
(define-module (starlet fixture-library generic rgb)
- #:use-module (oop goops)
+ #:use-module (starlet scanout)
#:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet utils)
#:use-module (starlet colours)
- #:export (<generic-rgb>))
+ #:export (<generic-rgb>
+ <generic-rgbw>))
-(define-class <generic-rgb> (<fixture>)
- (attributes
- #:init-form (list
- (attr-continuous 'intensity '(0 100) 0)
- (attr-colour 'colour white))))
+(define (colour-as-rgbw-weirdness col weirdness)
+ (let ((rgb (colour-as-rgb col)))
+ (let ((w (* (- 1 weirdness) (apply min rgb))))
+ (list (- (red rgb) w)
+ (- (green rgb) w)
+ (- (blue rgb) w)
+ w))))
-(define-method (scanout-fixture (fixture <generic-rgb>)
- get-attr set-chan8 set-chan16)
+(define-fixture
- (let ((intensity (get-attr 'intensity))
- (rgb (colour-as-rgb (get-attr 'colour))))
+ <generic-rgb>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white))
+
+ (let ((intensity (get-attr intensity))
+ (rgb (colour-as-rgb (get-attr colour))))
(set-chan8 1 (percent->dmxval8 (* intensity 0.01 (car rgb))))
(set-chan8 2 (percent->dmxval8 (* intensity 0.01 (cadr rgb))))
(set-chan8 3 (percent->dmxval8 (* intensity 0.01 (caddr rgb))))))
+
+(define-fixture
+
+ <generic-rgbw>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white)
+ (attr-continuous white-weirdness '(0 100) 0))
+
+ (let ((intensity (get-attr intensity))
+ (rgbw (colour-as-rgbw-weirdness (get-attr colour)
+ (/ (get-attr white-weirdness) 100))))
+ (set-chan8 1 (percent->dmxval8 (* 0.01 intensity (car rgbw))))
+ (set-chan8 2 (percent->dmxval8 (* 0.01 intensity (cadr rgbw))))
+ (set-chan8 3 (percent->dmxval8 (* 0.01 intensity (caddr rgbw))))
+ (set-chan8 4 (percent->dmxval8 (* 0.01 intensity (cadddr rgbw))))))
diff --git a/guile/starlet/fixture-library/lightmaxx/led-cob.scm b/guile/starlet/fixture-library/lightmaxx/led-cob.scm
new file mode 100644
index 0000000..5ce5879
--- /dev/null
+++ b/guile/starlet/fixture-library/lightmaxx/led-cob.scm
@@ -0,0 +1,45 @@
+;;
+;; starlet/fixture-library/lightmaxx-led-cob.scm
+;;
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library lightmaxx led-cob)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet colours)
+ #:use-module (starlet utils)
+ #:use-module (starlet attributes)
+ #:export (<lightmaxx-ledcob-5ch>))
+
+(define-fixture
+
+ <lightmaxx-ledcob-5ch>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white))
+
+ (let ((intensity (get-attr intensity))
+ (rgb (colour-as-rgb (get-attr colour))))
+ (set-chan8 1 (percent->dmxval8 (car rgb)))
+ (set-chan8 2 (percent->dmxval8 (cadr rgb)))
+ (set-chan8 3 (percent->dmxval8 (caddr rgb)))
+ (set-chan8 4 (percent->dmxval8 intensity))
+ (set-chan8 5 0)))
+
diff --git a/guile/starlet/fixture-library/robe/dl7s.scm b/guile/starlet/fixture-library/robe/dl7s.scm
new file mode 100644
index 0000000..0f9b10d
--- /dev/null
+++ b/guile/starlet/fixture-library/robe/dl7s.scm
@@ -0,0 +1,241 @@
+;;
+;; starlet/fixture-library/robe/dl7s/mode1.scm
+;;
+;; Copyright © 2020-2023 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library robe dl7s)
+ #:use-module (oop goops)
+ #:use-module (starlet fixture)
+ #:use-module (starlet utils)
+ #:use-module (starlet attributes)
+ #:use-module (starlet colours)
+ #:use-module (starlet scanout)
+ #:export (<robe-dl7s-mode1>))
+
+
+(define virtual-colour-wheel
+ '((#f 0)
+ (lee4-medium-bastard-amber 2)
+ (lee10-medium-yellow 4)
+ (lee19-fire 6)
+ (lee26-bright-red 8)
+ (lee58-lavender 10)
+ (lee68-sky-blue 12)
+ (lee71-tokyo-blue 14)
+ (lee79-just-blue 16)
+ (lee88-lime-green 18)
+ (lee90-dark-yellow-green 20)
+ (lee100-spring-yellow 22)
+ (lee101-yellow 24)
+ (lee102-light-amber 26)
+ (lee103-straw 28)
+ (lee104-deep-amber 30)
+ (lee105-orange 32)
+ (lee106-primary-red 34)
+ (lee111-dark-pink 36)
+ (lee115-peacock-blue 38)
+ (lee116-medium-blue-green 40)
+ (lee117-steel-blue 42)
+ (lee118-light-blue 44)
+ (lee119-dark-blue 46)
+ (lee120-deep-blue 48)
+ (lee121-lee-green 50)
+ (lee128-bright-pink 52)
+ (lee131-marine-blue 54)
+ (lee132-medium-blue 56)
+ (lee134-golden-amber 58)
+ (lee135-deep-golden-amber 60)
+ (lee136-pale-lavender 62)
+ (lee137-special-lavender 64)
+ (lee138-pale-green 66)
+ (lee139-primary-green 68)
+ (lee141-bright-blue 70)
+ (lee147-apricot 72)
+ (lee148-bright-rose 74)
+ (lee152-pale-gold 76)
+ (lee154-pale-rose 78)
+ (lee157-pink 80)
+ (lee158-deep-orange 82)
+ (lee162-bastard-amber 84)
+ (lee164-flame-red 86)
+ (lee165-daylight-blue 88)
+ (lee169-lilac-tint 90)
+ (lee170-deep-lavender 92)
+ (lee172-lagoon-blue 94)
+ (lee179-chrome-orange 96)
+ (lee180-dark-lavender 98)
+ (lee181-congo-blue 100)
+ (lee197-alice-blue 102)
+ (lee201-full-ct-blue 104)
+ (lee202-half-ct-blue 106)
+ (lee203-quarter-ct-blue 108)
+ (lee204-full-ct-orange 110)
+ (lee205-half-ct-orange 112)
+ (lee206-quarter-ct-orange 114)
+ (lee247-lee-minus-green 116)
+ (lee247-half-minus-green 118)
+ (lee281-threequarter-ct-blue 120)
+ (lee285-threequarter-ct-orange 122)
+ (lee352-glacier-blue 124)
+ (lee353-lighter-blue 126)
+ (lee715-cabana-blue 128)
+ (lee778-millennium-gold 130)
+ (lee793-vanity-fair 132)
+ (deep-red 193)
+ (deep-blue 195)
+ (orange 197)
+ (green 199)
+ (magenta 201)
+ (congo-blue 203)
+ (pink 205)
+ (lavender 207)
+ (laser-green 209)
+ (ctb 211)
+ (minus-green 213)
+ (minus-half-green 215)))
+
+(define static-gobo-wheel
+ '((#f 0)
+ (water 7)
+ (rugged-isles 14)
+ (quadrangle-screen 21)
+ (whirl 28)
+ (breakup 36)
+ (blur-breakup 43)
+ (knitting 50)
+ (grit 57)))
+
+(define rotating-gobo-wheel
+ '((#f 0)
+ (rose 7)
+ (water-line 11)
+ (tree-trunk 15)
+ (high-window 20)
+ (grid 24)
+ (clouds 29)))
+
+
+;; FIXME: Gobo shaking (both wheels)
+;; FIXME: Rainbow effect on colour wheel (???)
+;; FIXME: Fine control iris, zoom
+(define-fixture
+
+ <robe-dl7s-mode1>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-continuous pan '(0 540) 270)
+ (attr-continuous tilt '(0 270) 135)
+ (attr-list strobe '(#f on random) #f)
+ (attr-continuous strobe-frequency '(0 25) 25 "Frequencies not calibrated")
+ (attr-list prism '(#t #f) #f)
+ (attr-colour colour white)
+ (attr-list colwheel (map car virtual-colour-wheel) #f "Has priority over 'colour' attribute")
+ (attr-continuous colour-temperature '(2700 8000) 3200)
+ (attr-list animation-wheel '(#t #f) #f)
+ (attr-continuous animation-wheel-position '(-100 100) 0)
+ (attr-continuous animation-wheel-speed '(-100 100) 0)
+ (attr-list gobo (map car static-gobo-wheel) #f)
+ (attr-continuous gobo-shift '(0 100) 0)
+ (attr-list rotating-gobo (map car rotating-gobo-wheel) #f)
+ (attr-continuous rotating-gobo-speed '(-100 100) 0)
+ (attr-continuous prism-rotation-speed '(-100 100) 0)
+ (attr-continuous frost '(0 100) 0)
+ (attr-continuous zoom '(0 100) 50)
+ (attr-continuous iris '(0 100) 0)
+ (attr-continuous barndoor-all-rotation '(-45 45) 0)
+ (attr-continuous barndoor1 '(0 100) 0)
+ (attr-continuous barndoor2 '(0 100) 0)
+ (attr-continuous barndoor3 '(0 100) 0)
+ (attr-continuous barndoor4 '(0 100) 0)
+ (attr-continuous barndoor1-rotation '(-25 25) 0)
+ (attr-continuous barndoor2-rotation '(-25 25) 0)
+ (attr-continuous barndoor3-rotation '(-25 25) 0)
+ (attr-continuous barndoor4-rotation '(-25 25) 0)
+ (attr-continuous focus '(0 100) 50))
+
+ (set-chan16 1 (scale-to-range (get-attr pan) '(0 540) '(0 65535)))
+ (set-chan16 3 (scale-to-range (get-attr tilt) '(0 270) '(0 65535)))
+
+ (set-chan8 5 0) ;; Pan/tilt speed/time: maximum speed
+ (set-chan8 6 0) ;; Power/special function: default
+ (set-chan8 7 0) ;; Colour mode: default
+
+ (set-chan8 8 (lookup (get-attr colwheel) virtual-colour-wheel))
+
+ (let ((cmy (colour-as-cmy (get-attr colour))))
+ (set-chan16 9 (percent->dmxval16 (cyan cmy)))
+ (set-chan16 11 (percent->dmxval16 (magenta cmy)))
+ (set-chan16 13 (percent->dmxval16 (yellow cmy))))
+
+ (set-chan8 15
+ (scale-and-clamp-to-range (get-attr colour-temperature)
+ '(8000 2700) '(0 255)))
+
+ (set-chan8 16 0) ;; Green correction: uncorrected white
+ (set-chan8 17 0) ;; Colour mix control: virtual colour wheel has priority
+ (set-chan8 18 0) ;; Rotating gobo selection speed: maximum
+ (set-chan8 19 0) ;; Everything time: off (???)
+
+ (let ((ani-active (get-attr animation-wheel)))
+ (set-chan8 20 (if ani-active
+ (scale-to-range (get-attr animation-wheel-position)
+ '(-100 100) '(19 127))
+ 0)) ;; 73 = stop
+ (set-chan8 21 (scale-to-range (get-attr animation-wheel-speed)
+ '(100 -100) '(1 255)))) ;; 128 = stop
+ (set-chan8 22 0) ;; Animation wheel macro: no function
+
+ (set-chan8 23 (lookup (get-attr gobo) static-gobo-wheel))
+ (set-chan8 24 (percent->dmxval8 (get-attr gobo-shift)))
+
+ (set-chan8 25 (lookup (get-attr rotating-gobo) rotating-gobo-wheel))
+ (set-chan8 26 (scale-to-range (get-attr rotating-gobo-speed)
+ '(-100 100) '(1 255))) ;; 128 = stop
+ (set-chan8 27 0) ;; Rotating gobo fine adjustment (default)
+
+ (set-chan8 28 (if (get-attr prism) 50 0))
+ (set-chan8 29 (scale-to-range (get-attr prism-rotation-speed)
+ '(100 -100) '(1 255))) ;; 128 = stop, <128=forwards
+ (set-chan8 30 (scale-to-range (get-attr frost) '(0 100) '(0 180)))
+ (set-chan8 31 (scale-to-range (get-attr iris) '(0 100) '(0 180)))
+ (set-chan16 33 (percent->dmxval16 (get-attr zoom)))
+ (set-chan16 35 (percent->dmxval16 (get-attr focus)))
+
+ (set-chan8 38 (scale-to-range (get-attr barndoor-all-rotation) '(-45 45) '(0 255)))
+ (set-chan8 39 (percent->dmxval8 (get-attr barndoor1)))
+ (set-chan8 40 (scale-to-range (get-attr barndoor1-rotation) '(-25 25) '(0 255)))
+ (set-chan8 41 (percent->dmxval8 (get-attr barndoor2)))
+ (set-chan8 42 (scale-to-range (get-attr barndoor2-rotation) '(-25 25) '(0 255)))
+ (set-chan8 43 (percent->dmxval8 (get-attr barndoor3)))
+ (set-chan8 44 (scale-to-range (get-attr barndoor3-rotation) '(-25 25) '(0 255)))
+ (set-chan8 45 (percent->dmxval8 (get-attr barndoor4)))
+ (set-chan8 46 (scale-to-range (get-attr barndoor4-rotation) '(-25 25) '(0 255)))
+ (set-chan8 47 0) ;; Framing shutter macro: no function
+ (set-chan8 48 128) ;; Framing shutter macro speed: default
+
+ (let ((strb (get-attr strobe)))
+ (set-chan8 49
+ (cond
+ ((not strb) 32)
+ ((eq? strb 'on)
+ (scale-to-range (get-attr strobe-frequency) '(1 25) '(64 95)))
+ ((eq? strb 'random)
+ (scale-to-range (get-attr strobe-frequency) '(1 25) '(192 223))))))
+
+ (set-chan16 50 (percent->dmxval16 (get-attr intensity))))
diff --git a/guile/starlet/fixture-library/robe/dl7s/mode1.scm b/guile/starlet/fixture-library/robe/dl7s/mode1.scm
deleted file mode 100644
index e9d5a9a..0000000
--- a/guile/starlet/fixture-library/robe/dl7s/mode1.scm
+++ /dev/null
@@ -1,65 +0,0 @@
-;;
-;; starlet/fixture-library/robe/dl7s/mode1.scm
-;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
-;;
-;; This file is part of Starlet.
-;;
-;; Starlet is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;;
-(define-module (starlet fixture-library robe dl7s mode1)
- #:use-module (oop goops)
- #:use-module (starlet fixture)
- #:use-module (starlet colours)
- #:export (<robe-dl7s-mode1>))
-
-
-(define-class <robe-dl7s-mode1> (<fixture>)
- (attributes
- #:init-form (list
- (attr-continuous 'intensity '(0 100) 0)
- (attr-continuous 'pan '(0 540) 270)
- (attr-continuous 'tilt '(0 270) 135)
- (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-colour 'colour white)
- (attr-continuous 'colour-temperature-correction '(2700 8000) 8000)
- (attr-continuous 'green-correction '(-100 100) 0))))
-
-
-(define-method (scanout-fixture (fixture <robe-dl7s-mode1>)
- get-attr set-chan8 set-chan16)
-
- (set-chan16 50 (percent->dmxval16 (get-attr 'intensity)))
-
- (set-chan16 1 (scale-to-range (get-attr 'pan) '(0 540) '(0 65535)))
- (set-chan16 3 (scale-to-range (get-attr 'tilt) (0 270) '(0 65535)))
-
- (set-chan8 49 (if (get-attr 'strobe) 95 32))
-
- (set-chan8 28 (if (get-attr 'prism) 50 0))
-
- (set-chan8 7 (assv-ref '((750 . 82)
- (1000 . 88)
- (1200 . 92)
- (2000 . 97)
- (2500 . 102)
- (#f . 107))
- (get-attr 'tungsten-watts-emulation)))
-
- (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)))))
diff --git a/guile/starlet/fixture-library/robe/mmxspot.scm b/guile/starlet/fixture-library/robe/mmxspot.scm
new file mode 100644
index 0000000..1f37299
--- /dev/null
+++ b/guile/starlet/fixture-library/robe/mmxspot.scm
@@ -0,0 +1,87 @@
+;;
+;; starlet/fixture-library/robe/mmxspot/mode1.scm
+;;
+;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library robe mmxspot)
+ #:use-module (oop goops)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet colours)
+ #:export (<robe-mmxspot-mode1>))
+
+
+(define-fixture
+
+ <robe-mmxspot-mode1>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-continuous pan '(0 540) 270)
+ (attr-continuous tilt '(0 270) 135)
+ (attr-list colwheel '(#f red blue orange green amber uv) #f)
+ (attr-list prism '(#t #f) #f)
+ (attr-list strobe '(off on random zap) off)
+ (attr-continuous strobe-frequency '(0 100) 50)
+ (attr-colour colour white)
+ (attr-continuous iris '(0 100) 0)
+ (attr-continuous zoom '(0 100) 0)
+ (attr-continuous focus '(0 100) 0)
+ (attr-continuous hotspot '(0 100) 0)
+ (attr-continuous frost '(0 100) 0)
+ (attr-continuous cto '(3200 6900) 6900))
+
+ (set-chan16 37 (percent->dmxval16 (get-attr intensity)))
+
+ (set-chan16 1 (scale-to-range (get-attr pan) '(0 540) '(0 65535)))
+
+ (set-chan16 3 (scale-to-range (get-attr tilt) '(0 270) '(0 65535)))
+
+ (set-chan16 28 (scale-to-range (get-attr iris) '(0 100) '(0 45567)))
+ (set-chan16 30 (percent->dmxval16 (get-attr zoom)))
+ (set-chan16 32 (percent->dmxval16 (get-attr focus)))
+
+ (set-chan8 36
+ (let ((strb (get-attr strobe))
+ (spd (get-attr strobe-speed)))
+ (cond
+ ;; FIXME: Check the frequencies
+ ((eq? strb 'on) (scale-to-range spd '(0 100) '(64 95)))
+ ((eq? strb 'random) (scale-to-range spd '(0 100) '(192 223)))
+ ((eq? strb 'zap) (scale-to-range spd '(0 100) '(160 191)))
+ (else 255))))
+
+ (set-chan8 25 (if (get-attr prism) 20 0))
+
+ (set-chan8 7 (assv-ref '((#f . 0)
+ (red . 18)
+ (blue . 37)
+ (orange . 55)
+ (green . 73)
+ (amber . 91)
+ (uv . 110))
+ (get-attr colwheel)))
+
+ (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))))
+
+ (set-chan8 35 (percent->dmxval8 (get-attr hotspot)))
+ (set-chan8 12 (scale-to-range (get-attr cto) '(3200 6900) '(0 255)))
+ (set-chan8 27 (scale-to-range (get-attr frost) '(0 100) '(0 179))))
diff --git a/guile/starlet/fixture-library/robe/mmxspot/mode1.scm b/guile/starlet/fixture-library/robe/mmxspot/mode1.scm
deleted file mode 100644
index 9fedde4..0000000
--- a/guile/starlet/fixture-library/robe/mmxspot/mode1.scm
+++ /dev/null
@@ -1,87 +0,0 @@
-;;
-;; starlet/fixture-library/robe/mmxspot/mode1.scm
-;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
-;;
-;; This file is part of Starlet.
-;;
-;; Starlet is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;;
-(define-module (starlet fixture-library robe mmxspot mode1)
- #:use-module (oop goops)
- #:use-module (starlet fixture)
- #:use-module (starlet colours)
- #:export (<robe-mmxspot-mode1>))
-
-
-(define-class <robe-mmxspot-mode1> (<fixture>)
- (attributes
- #:init-form (list
- (attr-continuous 'intensity '(0 100) 0)
- (attr-continuous 'pan '(0 540) 270)
- (attr-continuous 'tilt '(0 270) 135)
- (attr-list 'colwheel '(#f red blue orange green amber uv) #f)
- (attr-list 'prism '(#t #f) #f)
- (attr-list 'strobe '(#f #t random zap) #f)
- (attr-continuous 'strobe-speed '(0 100) 50)
- (attr-colour 'colour white)
- (attr-continuous 'iris '(0 100) 0)
- (attr-continuous 'zoom '(0 100) 0)
- (attr-continuous 'focus '(0 100) 0)
- (attr-continuous 'hotspot '(0 100) 0)
- (attr-continuous 'frost '(0 100) 0)
- (attr-continuous 'cto '(3200 6900) 6900))))
-
-
-(define-method (scanout-fixture (fixture <robe-mmxspot-mode1>)
- get-attr set-chan8 set-chan16)
-
- (set-chan16 37 (percent->dmxval16 (get-attr 'intensity)))
-
- (set-chan16 1 (scale-to-range (get-attr 'pan) '(0 540) '(0 65535)))
-
- (set-chan16 3 (scale-to-range (get-attr 'tilt) '(0 270) '(0 65535)))
-
- (set-chan16 28 (scale-to-range (get-attr 'iris) '(0 100) '(0 45567)))
- (set-chan16 30 (percent->dmxval16 (get-attr 'zoom)))
- (set-chan16 32 (percent->dmxval16 (get-attr 'focus)))
-
- (set-chan8 36
- (let ((strb (get-attr 'strobe))
- (spd (get-attr 'strobe-speed)))
- (cond
- ((eq? strb #t) (scale-to-range spd '(0 100) '(64 95)))
- ((eq? strb 'random) (scale-to-range spd '(0 100) '(192 223)))
- ((eq? strb 'zap) (scale-to-range spd '(0 100) '(160 191)))
- (else 255))))
-
- (set-chan8 25 (if (get-attr 'prism) 20 0))
-
- (set-chan8 7 (assv-ref '((#f . 0)
- (red . 18)
- (blue . 37)
- (orange . 55)
- (green . 73)
- (amber . 91)
- (uv . 110))
- (get-attr 'colwheel)))
-
- (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))))
-
- (set-chan8 35 (percent->dmxval8 (get-attr 'hotspot)))
- (set-chan8 12 (scale-to-range (get-attr 'cto) '(3200 6900) '(0 255)))
- (set-chan8 27 (scale-to-range (get-attr 'frost) '(0 100) '(0 179))))
diff --git a/guile/starlet/fixture-library/robe/mmxwashbeam.scm b/guile/starlet/fixture-library/robe/mmxwashbeam.scm
new file mode 100644
index 0000000..a41c80d
--- /dev/null
+++ b/guile/starlet/fixture-library/robe/mmxwashbeam.scm
@@ -0,0 +1,94 @@
+;;
+;; starlet/fixture-library/robe/mmxwashbeam.scm
+;;
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library robe mmxwashbeam)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet utils)
+ #:use-module (starlet colours)
+ #:export (<robe-mmxwashbeam-mode1>))
+
+
+(define-fixture
+
+ <robe-mmxwashbeam-mode1>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-continuous pan '(0 540) 270)
+ (attr-continuous tilt '(0 270) 135)
+ (attr-list strobe '(#t #f) #f)
+ (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-colour colour white)
+ (attr-continuous zoom '(0 100) 0)
+ (attr-continuous focus '(0 100) 0)
+ (attr-continuous barndoor-rot '(0 180) 90)
+ (attr-continuous barndoor1 '(0 180) 0)
+ (attr-continuous barndoor2 '(0 100) 0)
+ (attr-continuous barndoor3 '(0 100) 0)
+ (attr-continuous barndoor4 '(0 100) 0))
+
+ (set-chan16 33 (percent->dmxval16 (get-attr intensity)))
+
+ (set-chan16 1 (scale-to-range (get-attr pan) '(0 540) '(0 65535)))
+ (set-chan16 3 (scale-to-range (get-attr tilt) '(0 270) '(0 65535)))
+
+ (set-chan8 32 (if (get-attr strobe) 70 255))
+
+ (set-chan16 19 (percent->dmxval16 (get-attr zoom)))
+ (set-chan16 21 (percent->dmxval16 (get-attr focus)))
+
+ ;;(set-chan 24 (number->dmxval (get-attr barndoor-rot) '(0 180)))
+ (set-chan8 25 (percent->dmxval8 (get-attr barndoor1)))
+ (set-chan8 26 (percent->dmxval8 (get-attr barndoor2)))
+ (set-chan8 27 (percent->dmxval8 (get-attr barndoor3)))
+ (set-chan8 28 (percent->dmxval8 (get-attr barndoor4)))
+
+ (set-chan8 7 (assv-ref '((#f . 0)
+ (red . 18)
+ (blue . 37)
+ (orange . 55)
+ (green . 73)
+ (amber . 91)
+ (uv . 110))
+ (get-attr colwheel)))
+
+ (set-chan8 15 (assv-ref '((#f . 0)
+ (iris . 5)
+ (gobo1 . 10)
+ (gobo2 . 14)
+ (gobo3 . 18)
+ (gobo4 . 22)
+ (gobo5 . 26)
+ (gobo6 . 30))
+ (get-attr gobo)))
+
+ (set-chan8 18 (assv-ref '((beam . 0)
+ (beamwash . 35)
+ (beamwashext . 45))
+ (get-attr beamtype)))
+
+ (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)))))
diff --git a/guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm b/guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm
deleted file mode 100644
index b412a24..0000000
--- a/guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm
+++ /dev/null
@@ -1,94 +0,0 @@
-;;
-;; starlet/fixture-library/robe/mmxwashbeam/mode1.scm
-;;
-;; Copyright © 2020-2021 Thomas White <taw@bitwiz.org.uk>
-;;
-;; This file is part of Starlet.
-;;
-;; Starlet is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-;;
-(define-module (starlet fixture-library robe mmxwashbeam mode1)
- #:use-module (oop goops)
- #:use-module (starlet fixture)
- #:use-module (starlet colours)
- #:export (<robe-mmxwashbeam-mode1>))
-
-
-(define-class <robe-mmxwashbeam-mode1> (<fixture>)
- (attributes
- #:init-form (list
- (attr-continuous 'intensity '(0 100) 0)
- (attr-continuous 'pan '(0 540) 270)
- (attr-continuous 'tilt '(0 270) 135)
- (attr-list 'strobe '(#t #f) #f)
- (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-colour 'colour white)
- (attr-continuous 'zoom '(0 100) 0)
- (attr-continuous 'focus '(0 100) 0)
- (attr-continuous 'barndoor-rot '(0 180) 90)
- (attr-continuous 'barndoor1 '(0 180) 0)
- (attr-continuous 'barndoor2 '(0 100) 0)
- (attr-continuous 'barndoor3 '(0 100) 0)
- (attr-continuous 'barndoor4 '(0 100) 0))))
-
-
-(define-method (scanout-fixture (fixture <robe-mmxwashbeam-mode1>)
- get-attr set-chan8 set-chan16)
-
- (set-chan16 33 (percent->dmxval16 (get-attr 'intensity)))
-
- (set-chan16 1 (scale-to-range (get-attr 'pan) '(0 540) '(0 65535)))
- (set-chan16 3 (scale-to-range (get-attr 'tilt) '(0 270) '(0 65535)))
-
- (set-chan8 32 (if (get-attr 'strobe) 70 255))
-
- (set-chan16 19 (percent->dmxval16 (get-attr 'zoom)))
- (set-chan16 21 (percent->dmxval16 (get-attr 'focus)))
-
- ;;(set-chan 24 (number->dmxval (get-attr 'barndoor-rot) '(0 180)))
- (set-chan8 25 (percent->dmxval8 (get-attr 'barndoor1)))
- (set-chan8 26 (percent->dmxval8 (get-attr 'barndoor2)))
- (set-chan8 27 (percent->dmxval8 (get-attr 'barndoor3)))
- (set-chan8 28 (percent->dmxval8 (get-attr 'barndoor4)))
-
- (set-chan8 7 (assv-ref '((#f . 0)
- (red . 18)
- (blue . 37)
- (orange . 55)
- (green . 73)
- (amber . 91)
- (uv . 110))
- (get-attr 'colwheel)))
-
- (set-chan8 15 (assv-ref '((#f . 0)
- (iris . 5)
- (gobo1 . 10)
- (gobo2 . 14)
- (gobo3 . 18)
- (gobo4 . 22)
- (gobo5 . 26)
- (gobo6 . 30))
- (get-attr 'gobo)))
-
- (set-chan8 18 (assv-ref '((beam . 0)
- (beamwash . 35)
- (beamwashext . 45))
- (get-attr 'beamtype)))
-
- (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)))))
diff --git a/guile/starlet/fixture-library/stairville/octagon-theater-cw-ww.scm b/guile/starlet/fixture-library/stairville/octagon-theater-cw-ww.scm
new file mode 100644
index 0000000..b3320b2
--- /dev/null
+++ b/guile/starlet/fixture-library/stairville/octagon-theater-cw-ww.scm
@@ -0,0 +1,51 @@
+;;
+;; starlet/fixture-library/stairville/octagon-theater-cw-ww.scm
+;;
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.me.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library stairville octagon-theater-cw-ww)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet utils)
+ #:export (<stairville-octagon-theater-cw-ww>))
+
+(define-fixture
+
+ <stairville-octagon-theater-cw-ww>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-continuous colour-temperature '(2800 6400) 3200)
+ (attr-list strobe '(#f #t) #f)
+ ;; FIXME: Strobe frequency is not stated in manual.
+ ;; I've assumed that "slow" means 1 Hz, "fast" 25 Hz
+ (attr-continuous strobe-frequency '(1 25) 1))
+
+ (let ((coltemp (get-attr colour-temperature)))
+ (set-chan8 1 (scale-and-clamp-to-range coltemp '(2800 6400) '(0 255)))
+ (set-chan8 2 (scale-and-clamp-to-range coltemp '(2800 6400) '(255 0))))
+ (if (get-attr strobe)
+ (set-chan8 3 (scale-and-clamp-to-range
+ (get-attr strobe-frequency)
+ '(1 25)
+ '(16 255)))
+ (set-chan8 3 0))
+ (set-chan8 3 0) ;; Strobe
+ (set-chan8 4 0) ;; Mode (0-15 = direct control)
+ (set-chan8 5 (percent->dmxval8 (get-attr intensity))))
diff --git a/guile/starlet/fixture-library/stairville/z120m.scm b/guile/starlet/fixture-library/stairville/z120m.scm
new file mode 100644
index 0000000..00fb476
--- /dev/null
+++ b/guile/starlet/fixture-library/stairville/z120m.scm
@@ -0,0 +1,69 @@
+;;
+;; starlet/fixture-library/stairville/z120m.scm
+;;
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library stairville z120m)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet utils)
+ #:use-module (starlet colours)
+ #:export (<stairville-z120m-6ch>))
+
+
+(define (colour-as-rgbw-weirdness col weirdness)
+ (let ((rgb (colour-as-rgb col)))
+ (let ((w (* (- 1 weirdness) (apply min rgb))))
+ (list (- (red rgb) w)
+ (- (green rgb) w)
+ (- (blue rgb) w)
+ w))))
+
+
+(define-fixture
+
+ <stairville-z120m-6ch>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white)
+ (attr-continuous strobe-frequency '(1 25) 1)
+ (attr-list strobe '(off on random) 'off)
+ (attr-continuous white-weirdness '(0 100) 0))
+
+ (let ((intensity (get-attr intensity))
+ (rgbw (colour-as-rgbw-weirdness (get-attr colour)
+ (/ (get-attr white-weirdness) 100))))
+ (set-chan8 1 (percent->dmxval8 intensity))
+ (set-chan8 3 (percent->dmxval8 (car rgbw)))
+ (set-chan8 4 (percent->dmxval8 (cadr rgbw)))
+ (set-chan8 5 (percent->dmxval8 (caddr rgbw)))
+ (set-chan8 6 (percent->dmxval8 (cadddr rgbw))))
+ (cond
+ ((eq? (get-attr strobe) 'on)
+ (set-chan8 2 (scale-and-clamp-to-range
+ (get-attr 'strobe-frequency)
+ '(1 25)
+ '(106 165))))
+ ((eq? (get-attr strobe) 'random)
+ (set-chan8 2 (scale-and-clamp-to-range
+ (get-attr strobe-frequency)
+ '(1 25)
+ '(181 240))))
+ (else (set-chan8 2 255))))
diff --git a/guile/starlet/fixture-library/tadm/led-bar.scm b/guile/starlet/fixture-library/tadm/led-bar.scm
new file mode 100644
index 0000000..45c4e34
--- /dev/null
+++ b/guile/starlet/fixture-library/tadm/led-bar.scm
@@ -0,0 +1,46 @@
+;;
+;; starlet/fixture-library/tadm/led-bar.scm
+;;
+;; Copyright © 2020-2022 Thomas White <taw@bitwiz.org.uk>
+;;
+;; This file is part of Starlet.
+;;
+;; Starlet is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+(define-module (starlet fixture-library tadm led-bar)
+ #:use-module (starlet scanout)
+ #:use-module (starlet fixture)
+ #:use-module (starlet attributes)
+ #:use-module (starlet colours)
+ #:use-module (starlet utils)
+ #:use-module (starlet attributes)
+ #:export (<tadm-led-bar>))
+
+(define-fixture
+
+ <tadm-led-bar>
+
+ (fixture-attributes
+ (attr-continuous intensity '(0 100) 0)
+ (attr-colour colour white))
+
+ (let ((intensity (get-attr intensity))
+ (rgb (colour-as-rgb (get-attr colour))))
+ (set-chan8 1 17)
+ (set-chan8 2 (percent->dmxval8 intensity))
+ (set-chan8 3 0)
+ (set-chan8 4 (percent->dmxval8 (car rgb)))
+ (set-chan8 5 (percent->dmxval8 (cadr rgb)))
+ (set-chan8 6 (percent->dmxval8 (caddr rgb)))))
+