Changeset - 0dd0b5e282b4
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 7 years ago 2018-06-09 22:40:39
drewp@bigasterisk.com
qsweepusa effects
Ignore-this: 651c0975777e428f35047a68083aad94
3 files changed with 29 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/effect/effecteval.py
Show inline comments
 
@@ -9,12 +9,14 @@ import traceback
 
from noise import pnoise1
 
import logging
 
import time
 
from light9.effect.settings import DeviceSettings
 
from light9.effect.scale import scale
 
import random
 
random.seed(0)
 
print "reload effecteval"
 

	
 
log = logging.getLogger('effecteval')
 

	
 
def literalColor(rnorm, gnorm, bnorm):
 
    return Literal(rgb_to_hex([int(rnorm * 255), int(gnorm * 255), int(bnorm * 255)]))
 

	
 
@@ -195,12 +197,35 @@ def effect_qsweep(effectSettings, streng
 
            (dev, L9['rx']):
 
            lerp(.3, .8, nsin(songTime / period + n / 4)),
 
        (dev, L9['ry']): effectSettings.get(L9['ry'], .2),
 
            })
 
    return out
 

	
 
def effect_qsweepusa(effectSettings, strength, songTime, noteTime):
 
    out = {}
 
    period = float(effectSettings.get(L9['period'], 2))
 

	
 
    colmap = {
 
        1: '#ff0000',
 
        2: '#888888',
 
        3: '#5050ff',
 
    }
 
    
 
    for n in range(1, 3+1):
 
        dev = L9['device/q%s' % n]
 
        out.update({
 
            (dev, L9['color']): scale(colmap[n], effectSettings.get(L9['strength'], 1)),
 
            (dev, L9['zoom']): effectSettings.get(L9['zoom'], .5),
 
            })
 
        out.update({
 
            (dev, L9['rx']):
 
            lerp(.3, .8, nsin(songTime / period + n / 4)),
 
            (dev, L9['ry']): effectSettings.get(L9['ry'], .5),
 
            })
 
    return out
 

	
 
chase1_members = [
 
        DEV['backlight1'],
 
        DEV['lip1'],
 
        DEV['backlight2'],
 
        DEV['down2'],
 
        DEV['lip2'],
 
@@ -239,13 +264,13 @@ def effect_chase1(effectSettings, streng
 
    return out
 

	
 
def effect_chase2(effectSettings, strength, songTime, noteTime):
 
    members = chase2_members
 
    
 
    out = {}
 
    period = float(effectSettings.get(L9['period'], 2 / len(members)))
 
    period = float(effectSettings.get(L9['period'], 0.3))
 

	
 
    for i, dev in enumerate(members):
 
        cursor = (songTime / period) % float(len(members))
 
        dist = abs(i - cursor)
 
        radius = 3
 
        if dist < radius:
show/dance2018/effect.n3
Show inline comments
 
@@ -20,12 +20,13 @@ effect:animRainbow a :Effect; rdfs:label
 
effect:aurawash a :Effect; :publishAttr :strength ; :group "anim".
 
effect:auraSparkles a :Effect; :publishAttr :strength ; :group "anim".
 
effect:pulseRainbow a :Effect; rdfs:label "pulseRainbow"; :publishAttr :strength, :rate ; :group "main"; :order 6.
 

	
 
effect:orangeSearch a :Effect; :publishAttr :strength ; :group "anim".
 
effect:qsweep a :Effect; :publishAttr :strength ; :group "anim".
 
effect:qsweepusa a :Effect; :publishAttr :strength ; :group "anim".
 
effect:chase1 a :Effect; :publishAttr :strength ; :group "anim".
 
effect:chase2 a :Effect; :publishAttr :strength ; :group "anim".
 

	
 
effect:lightning a :Effect; :publishAttr :strength ; :group "main"; :order 7.
 

	
 
effect:strobewarm :group "anim".
show/dance2018/song10.n3
Show inline comments
 
@@ -53,6 +53,8 @@ show:song10 :note <http://light9.bigaste
 
<http://light9.bigasterisk.com/show/dance2018/song10/n2c0p2> :time 1.69662e+02;
 
     :value 0.2 .
 
<http://light9.bigasterisk.com/show/dance2018/song10/n2c0p3> :time 1.72661e+02;
 
     :value 0e+00 .
 
<http://light9.bigasterisk.com/show/dance2018/song10/n2set0> :effectAttr :colorScale;
 
     :value "#3a3c3a" .
 

	
 
effect:qsweepusa a :Effect; :publishAttr :strength ; :group "anim".
 
\ No newline at end of file
0 comments (0 inline, 0 general)