changeset 295:8da6dc78999b

certainly didn't forget to add Effects.py
author David McClosky <dmcc@bigasterisk.com>
date Sat, 18 Jun 2005 17:10:10 +0000
parents c9dcc57116c2
children e99bd20dad85
files light9/Effects.py
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/light9/Effects.py	Sat Jun 18 17:10:10 2005 +0000
@@ -0,0 +1,21 @@
+import random
+import light9.Submaster as Submaster
+from chase import chase as chase_logic
+
+__all__ = ['chase']
+
+thirds = 'third-l', 'third-c', 'third-r'
+thirds_bounce = 'third-l', 'third-c', 'third-r', 'third-c'
+flutter = ['scoop-l', 'scoop-c', 'scoop-r', 'down-c', 'down-l', 'down-r'] * 5
+random.shuffle(flutter)
+
+def chase(t, ontime=0.5, offset=0.2, onval=1.0, 
+          offval=0.0, names=None, combiner=max):
+    """names is list of sub or channel names"""
+    sub_vals = {}
+    chase_vals = chase_logic(t, ontime, offset, onval, offval, names, combiner)
+    for name, value in chase_vals.items():
+        sub = Submaster.get_sub_by_name(name)
+        sub_vals[sub] = value
+
+    return Submaster.combine_subdict(sub_vals)