summaryrefslogtreecommitdiff
path: root/dmx/dmxcontrol.py
diff options
context:
space:
mode:
Diffstat (limited to 'dmx/dmxcontrol.py')
-rw-r--r--dmx/dmxcontrol.py124
1 files changed, 92 insertions, 32 deletions
diff --git a/dmx/dmxcontrol.py b/dmx/dmxcontrol.py
index e214aec..8013934 100644
--- a/dmx/dmxcontrol.py
+++ b/dmx/dmxcontrol.py
@@ -3,53 +3,113 @@
# prevrms = prevrms * 0.64 + rms * 0.4
# print prevrms
-gamountmul = 0.2 # 1.4
-gmul = 0.4
-
-effects[0].camount = 0.22 * gamountmul
-effects[0].cphase = 0.0
-effects[0].jumpdecayset = 0.05 #0.49 # 0.19
-effects[0].jumpdecayfall = 0.90
-effects[0].jumpv = 0.12
+#dmx.lounge_buero_ecke 268 {u'r': 249, u'b': 0, u'g': 19}
+#dmx.lounge_midwest 373 {u'r': 255, u'b': 0, u'g': 118}
+#dmx.lounge_buehne_links 5 {u'r': 3, u'b': 1, u'g': 1}
+#dmx.lounge_traverse 86 {u'r': 58, u'b': 12, u'g': 16}
+#dmx.lounge_decke 146 {u'r': 0, u'b': 144, u'g': 2}
+
+gamountmul = 0.0 #0.33 # 1.4
+gmul = 0.7
+
+import time
+t = time.time()
+
+if type(effects[4]) != EffectRGBFadeJump:
+ effects[4] = EffectRGBFadeJump(universe[4])
+ print 'x'
+
+fadet = None
+# fadet = 1398550165
+fadedur = 22.
+if fadet != None:
+ if t < fadet:
+ fc = 0.0
+ elif t > fadet:
+ fc = min(max(1. - (t - fadet) / fadedur, 0.0), 1.0)
+ print 'fc', fc
+ gmul = gmul * fc
+ else:
+ print 'fade t =', fadet - t
+
+# unused
+if True:
+ effects[0].camount = 0.22 * gamountmul
+ effects[0].cphase = 0.0
+ effects[0].jumpdecayset = 0.05 #0.49 # 0.19
+ effects[0].jumpdecayfall = 0.90
+ effects[0].jumpv = 0.0
+ effects[0].fadespeed = 0.04
+else:
+ effects[0].h = 0.033
+ effects[0].s = 1.0
+ effects[0].v = 0.8
universe[0].mult = 0.55 * gmul
-effects[1].camount = 0.1 * gamountmul
-effects[1].cphase = 0.5
-effects[1].phasejump = 0.03 # 0.084
-effects[1].jumpdecayset = 0.1
-effects[1].jumpdecayfall = 0.90
-effects[1].jumpv = 0.2
+if False:
+ effects[1].camount = 0.1 * gamountmul
+ effects[1].cphase = 0.5
+ effects[1].phasejump = 0.03 # 0.084
+ effects[1].jumpdecayset = 0.1
+ effects[1].jumpdecayfall = 0.90
+ effects[1].jumpv = 0.3
+else:
+ effects[1].h = 0.14
+ effects[1].s = 1.0
+ effects[1].v = 1.0 # 3.7
universe[1].mult = 0.55 * gmul
+from math import sin, cos, pi
+def hsvmap(arg, h, s, v):
+ #s = 0.7 + 0.3 * cos(arg*2*pi)
+ #s = 0.7 * s
+ return (h, s, v)
+def hsvmap1(arg, h, s, v):
+ s = 0.7 + 0.3 * cos(arg*2*pi)
+ return (h, 0.5 * s, 0.3 + 0.7 * v)
+
effects[2].camount = 0.12 * gamountmul
+effects[2].fadespeed = 0.025
effects[2].cphase = 0.5
-effects[2].phasejump = 0.12
-effects[2].jumpdecayset = 0.36 # 0.19
-effects[2].jumpdecayfall = 0.955
-effects[2].jumpv = 0.3 #1.5
+effects[2].phasejump = 0.05 # 0.075
+effects[2].jumpdecayset = 0.18 # 0.19
+effects[2].jumpdecayfall = 0.935 #0.955
+effects[2].jumpv = 0.6 # 0.8 #1.5
+effects[2].hsvmap = hsvmap
universe[2].mult = 0.3 * gmul # + prevrms
effects[3].camount = 0.10 * gamountmul
+effects[3].fadespeed = 0.04
effects[3].cphase = 0.0
-effects[3].phasejump = 0.12 # 0.084
-effects[3].jumpdecayset = 0.39 # 0.27
-effects[3].jumpdecayfall = 0.955
-effects[3].jumpv = 0.5 #4.23
+effects[3].phasejump = 0.09 # 12 # 0.084
+effects[3].jumpdecayset = 0.38 #0.432 # 0.29 # 0.27
+effects[3].jumpdecayfall = 0.925 #0.955
+effects[3].jumpv = 0.6 #0.8 #4.23
+effects[3].hsvmap = hsvmap
+# effects[3].r_phasejump = 0.3
universe[3].mult = 0.3 * gmul # + prevrms
-effects[4].camount = 0.12 * gamountmul
-effects[4].phasejump = 0.22
-effects[4].cphase = 0.5
-effects[4].jumpdecayset = 0.6
-effects[4].jumpdecayfall = 0.95
-effects[4].jumpv = 0.9
-universe[4].mult = 0.32 * gmul
+if True:
+ effects[4].camount = 0.12 * gamountmul
+ effects[4].phasejump = 0.03 # 0.22
+ effects[4].cphase = 0.5
+ effects[4].jumpdecayset = 0.0 # 0.2
+ effects[4].jumpdecayfall = 0.95
+ effects[4].jumpv = 0.2
+ effects[4].hsvmap = hsvmap1
+else:
+ effects[4].h = 0.18
+ effects[4].s = 0.90
+ effects[4].v = 3.8
+universe[4].mult = 0.42 * gmul
effects[4].r_phasejump += 0.0004
+effects[5].fadespeed = 0.03 # 0.06
+
# static
-#for e in effects[:3]:
-# e.fadespeed = 0.0
-# e.r_phasejump = 0.09
+for e in effects:
+ e.jumpv = 0
+ # e.decay = 0
# bpm = 106.