Mercurial > code > home > repos > light9
changeset 1993:a322fba0035c
tintable cyc effect
Ignore-this: 61408125389e6146f5835d56a26df07a
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sun, 09 Jun 2019 18:31:47 +0000 |
parents | 5c1553fc0740 |
children | 1b690005aabd |
files | light9/effect/effecteval.py show/dance2019/effects.n3 |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/effect/effecteval.py Sun Jun 09 07:37:26 2019 +0000 +++ b/light9/effect/effecteval.py Sun Jun 09 18:31:47 2019 +0000 @@ -412,3 +412,25 @@ color = sample(img, x, y, effectSettings.get(L9['repeat'], False)) out[(dev, L9['color'])] = scale(rgb_to_hex(color), scl) return out + +def effect_cyc(effectSettings, strength, songTime, noteTime): + colorScale = effectSettings.get(L9['colorScale'], '#ffffff') + r, g, b = map(lambda x: x / 255, hex_to_rgb(colorScale)) + + out ={ + (L9['theater/skyline/device/cycRed1'], L9['brightness']): r, + (L9['theater/skyline/device/cycRed2'], L9['brightness']): r, + (L9['theater/skyline/device/cycRed3'], L9['brightness']): r, + (L9['theater/skyline/device/cycRed4'], L9['brightness']): r, + (L9['theater/skyline/device/cycGreen1'], L9['brightness']): g, + (L9['theater/skyline/device/cycGreen2'], L9['brightness']): g, + (L9['theater/skyline/device/cycGreen3'], L9['brightness']): g, + (L9['theater/skyline/device/cycGreen4'], L9['brightness']): g, + (L9['theater/skyline/device/cycBlue1'], L9['brightness']): b, + (L9['theater/skyline/device/cycBlue2'], L9['brightness']): b, + (L9['theater/skyline/device/cycBlue3'], L9['brightness']): b, + (L9['theater/skyline/device/cycBlue4'], L9['brightness']): b, + + } + + return out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/show/dance2019/effects.n3 Sun Jun 09 18:31:47 2019 +0000 @@ -0,0 +1,6 @@ +@prefix : <http://light9.bigasterisk.com/> . +@prefix e: <http://light9.bigasterisk.com/effect/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +e:cyc a :Effect ; rdfs:label "cyc".