diff options
Diffstat (limited to 'guile/starlet/fixture-library')
-rw-r--r-- | guile/starlet/fixture-library/chauvet/mav2.scm (renamed from guile/starlet/fixture-library/chauvet/mav2/32chan.scm) | 26 | ||||
-rw-r--r-- | guile/starlet/fixture-library/generic/any-rgb.scm | 62 | ||||
-rw-r--r-- | guile/starlet/fixture-library/generic/rgb.scm | 17 | ||||
-rw-r--r-- | guile/starlet/fixture-library/robe/mmxwashbeam.scm (renamed from guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm) | 47 |
4 files changed, 44 insertions, 108 deletions
diff --git a/guile/starlet/fixture-library/chauvet/mav2/32chan.scm b/guile/starlet/fixture-library/chauvet/mav2.scm index 5868587..d79e73e 100644 --- a/guile/starlet/fixture-library/chauvet/mav2/32chan.scm +++ b/guile/starlet/fixture-library/chauvet/mav2.scm @@ -18,25 +18,25 @@ ;; 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) +(define-module (starlet fixture-library chauvet mav2) + #:use-module (starlet scanout) #:use-module (starlet fixture) + #:use-module (starlet utils) + #:use-module (starlet colours) #: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-fixture + <chauvet-mav2-32ch> -(define-method (scanout-fixture (fixture <chauvet-mav2-32ch>) - get-attr set-chan set-chan-16bit) + (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) 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/rgb.scm b/guile/starlet/fixture-library/generic/rgb.scm index 6fa281d..4c2eb11 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,21 +19,20 @@ ;; 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 utils) #:use-module (starlet colours) #:export (<generic-rgb>)) -(define-class <generic-rgb> (<fixture>) - (attributes - #:init-form (list - (attr-continuous 'intensity '(0 100) 0) - (attr-colour 'colour white)))) +(define-fixture + <generic-rgb> -(define-method (scanout-fixture (fixture <generic-rgb>) - get-attr set-chan8 set-chan16) + (fixture-attributes + (attr-continuous 'intensity '(0 100) 0) + (attr-colour 'colour white)) (let ((intensity (get-attr 'intensity)) (rgb (colour-as-rgb (get-attr 'colour)))) diff --git a/guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm b/guile/starlet/fixture-library/robe/mmxwashbeam.scm index b412a24..282bd0f 100644 --- a/guile/starlet/fixture-library/robe/mmxwashbeam/mode1.scm +++ b/guile/starlet/fixture-library/robe/mmxwashbeam.scm @@ -1,7 +1,7 @@ ;; -;; starlet/fixture-library/robe/mmxwashbeam/mode1.scm +;; starlet/fixture-library/robe/mmxwashbeam.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. ;; @@ -18,35 +18,34 @@ ;; 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) +(define-module (starlet fixture-library robe mmxwashbeam) + #:use-module (starlet scanout) #:use-module (starlet fixture) + #:use-module (starlet utils) #: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-fixture + <robe-mmxwashbeam-mode1> -(define-method (scanout-fixture (fixture <robe-mmxwashbeam-mode1>) - get-attr set-chan8 set-chan16) + (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))) |