# HG changeset patch # User dmcc # Date 2003-07-08 16:19:55 # Node ID 79bc84310e8047fa49e1d109756e2c3d02e68daa # Parent 7ccf1d10804bd2ad2e92fe8d33566c778781c9df changes from tonight's rehearsal: changes from tonight's rehearsal: - CueFader is closer to actually running the show, computes DMX levels to send. - KeyboardComposer is not a dummy. Use DMXDUMMY=1 to disable it. - Submaster: subs can now be "temporary" -- i.e. they shouldn't be saved or loaded. to save a temporary sub, make a copy of it with a proper name since the computed name will be ugly. Also, get_normalized_copy() and crossfade() methods added. linear_fade helper (shouldn't be in Submaster, probably) added too. - dmxchanedit: longer labels - cuelist1 now has some bogus data in it and some crap removed - dmxclient: now listens to the $DMXHOST and $DMXDUMMY env variables. - patchdata: now up to date with this year's show - danshow subs song{01..19}: removed. maybe we'll re-add them in an archive directory. diff --git a/flax/CueFaders.py b/flax/CueFaders.py --- a/flax/CueFaders.py +++ b/flax/CueFaders.py @@ -3,6 +3,7 @@ import Tix as Tk import time from TreeDict import TreeDict, allow_class_to_be_pickled from TLUtility import enumerate +import Submaster cue_state_indicator_colors = { # bg fg @@ -79,11 +80,13 @@ class TimedGoButton(Tk.Frame): bg='black', fg='white') self.timer_entry.pack(fill='y', side='left') self.disabled = (self.button['state'] == 'disabled') + self.fading = 0 def start_fade(self, end_level=1): try: fade_time = float(self.timer_var.get()) except ValueError: - # TODO figure out how to handle this + # since we use a control now, i don't think we need to worry about + # validation any more. print "can't fade -- bad time" return @@ -91,6 +94,7 @@ class TimedGoButton(Tk.Frame): self.start_level = self.scale_to_fade.scale_var.get() self.end_level = end_level self.fade_length = fade_time + self.fading = 1 self.do_fade() def do_fade(self): diff = time.time() - self.start_time @@ -102,8 +106,11 @@ class TimedGoButton(Tk.Frame): if newlevel != self.end_level: self.after(10, self.do_fade) + else: + self.fading = 0 else: self.scale_to_fade.scale_var.set(self.end_level) + self.fading = 0 def disable(self): if not self.disabled: self.button['state'] = 'disabled' @@ -116,6 +123,8 @@ class TimedGoButton(Tk.Frame): self.timer_var.set(time) def get_time(self): return self.timer_var.get() + def is_fading(self): + return self.fading class CueFader(Tk.Frame): def __init__(self, master, cuelist): @@ -189,6 +198,7 @@ class CueFader(Tk.Frame): scale.scale.bind("", button_press) scale.scale.bind("", button_release) faderframe.pack(side='bottom', fill='both', expand=1) + self.cues_as_subs = {} def get_scale_desc(self, val, name): go_button = self.go_buttons.get(name) if go_button: @@ -210,6 +220,12 @@ class CueFader(Tk.Frame): for scale_name, scale in self.scales.items(): scale.scale.set(0) self.cuelist.shift((-1, 1)[name == 'Next']) + + # now load the subs to fade between + for cue, name in zip(self.cuelist.get_current_cues(), + ('Prev', 'Cur', 'Next')): + self.cues_as_subs[name] = cue.get_levels_as_sub() + print "cues_as_subs", self.cues_as_subs def autoshift(self, name, scale): scale_val = scale.scale_var.get() @@ -237,6 +253,14 @@ class CueFader(Tk.Frame): # undo above work self.scales[d].enable() self.go_buttons[d].enable() + + cur_sub = self.cues_as_subs.get('Cur') + if cur_sub: + other_sub = self.cues_as_subs[name] + # print 'fade between %s and %s (%.2f)' % (cur_sub, other_sub, scale_val) + self.current_levels_as_sub = cur_sub.crossfade(other_sub, scale_val) + print "current levels", self.current_levels_as_sub.get_dmx_list() + # print def opposite_direction(self, d): if d == 'Next': return 'Prev' @@ -245,12 +269,37 @@ class CueFader(Tk.Frame): class Cue: """A Cue has a name, a time, and any number of other attributes.""" - def __init__(self, name, time=3, **attrs): + def __init__(self, name, time=3, sub_levels='', **attrs): self.name = name self.time = time + self.sub_levels = sub_levels self.__dict__.update(attrs) def __repr__(self): return "" % (self.name, self.time) + def get_levels_as_sub(self): + """Get this Cue as a combined Submaster, normalized. This method + should not be called constantly, since it is somewhat expensive. It + will reload the submasters from disk, combine all subs together, and + then compute the normalized form.""" + subdict = {} + try: + print self, self.sub_levels + for line in self.sub_levels.split(','): + line = line.strip() + # print 'line', line + sub, scale = line.split(':') + # print 'sub', sub, 'scale', scale + sub = sub.strip() + scale = float(scale) + subdict[sub] = scale + # print 'subdict', subdict + except (ValueError, AttributeError): + print "parsing error when computing sub for", self + + s = Submaster.Submasters() + newsub = Submaster.sub_maxes(*[s[sub] * scale + for sub, scale in subdict.items()]) + return newsub.get_normalized_copy() empty_cue = Cue('empty') @@ -266,8 +315,8 @@ class CueList: except IOError: self.treedict.cues = [] self.cues = self.treedict.cues - self.current_cue_index = 0 - self.next_pointer = None + self.current_cue_index = -1 + self.next_pointer = 0 self.prev_pointer = None import atexit @@ -465,7 +514,7 @@ class CueEditron(Tk.Frame): pass def setup_editing_forms(self): self.variables = {} - for row, field in enumerate(('name', 'time', 'page', 'desc')): + for row, field in enumerate(('name', 'time', 'page', 'desc', 'sub_levels')): lab = Tk.Label(self, text=field, fg='white', bg='black') lab.grid(row=row, column=0, sticky='nsew') @@ -488,7 +537,7 @@ class CueEditron(Tk.Frame): self.columnconfigure(1, weight=1) def fill_in_cue_info(self): self.enable_callbacks = 0 - for row, field in enumerate(('name', 'time', 'page', 'desc')): + for row, field in enumerate(('name', 'time', 'page', 'desc', 'sub_levels')): text = '' if self.cue: try: diff --git a/flax/KeyboardComposer.py b/flax/KeyboardComposer.py --- a/flax/KeyboardComposer.py +++ b/flax/KeyboardComposer.py @@ -241,7 +241,7 @@ if __name__ == "__main__": root = Tk() tl = toplevelat("Keyboard Composer", existingtoplevel=root) - kc = KeyboardComposer(tl, s, dmxdummy=1) + kc = KeyboardComposer(tl, s, dmxdummy=0) kc.pack(fill=BOTH, expand=1) atexit.register(kc.save) try: diff --git a/flax/Submaster.py b/flax/Submaster.py --- a/flax/Submaster.py +++ b/flax/Submaster.py @@ -8,14 +8,17 @@ import Patch class Submaster: "Contain a dictionary of levels, but you didn't need to know that" - def __init__(self, name, leveldict=None): + def __init__(self, name, leveldict=None, temporary=0): self.name = name + self.temporary = temporary if leveldict: self.levels = leveldict else: self.levels = {} self.reload() def reload(self): + if self.temporary: + return try: self.levels.clear() subfile = file("subs/%s" % self.name) @@ -33,6 +36,9 @@ class Submaster: except IOError: print "Can't read file for sub: %s" % self.name def save(self): + if self.temporary: + return + subfile = file("subs/%s" % self.name, 'w') names = self.levels.keys() names.sort() @@ -52,7 +58,7 @@ class Submaster: return self.levels def __mul__(self, scalar): return Submaster("%s*%s" % (self.name, scalar), - dict_scale(self.levels, scalar)) + dict_scale(self.levels, scalar), temporary=1) __rmul__ = __mul__ def max(self, *othersubs): return sub_maxes(self, *othersubs) @@ -69,12 +75,45 @@ class Submaster: return levels def normalize_patch_names(self): + """Use only the primary patch names.""" # possibly busted -- don't use unless you know what you're doing self.set_all_levels(self.levels.copy()) + def get_normalized_copy(self): + """Get a copy of this sumbaster that only uses the primary patch + names. The levels will be the same.""" + newsub = Submaster("%s (normalized)" % self.name, temporary=1) + newsub.set_all_levels(self.levels) + return newsub + def crossfade(self, othersub, amount): + """Returns a new sub that is a crossfade between this sub and + another submaster. + + NOTE: You should only crossfade between normalized submasters.""" + otherlevels = othersub.get_levels() + keys_set = {} + for k in self.levels.keys() + otherlevels.keys(): + keys_set[k] = 1 + all_keys = keys_set.keys() + + xfaded_sub = Submaster("xfade", temporary=1) + for k in all_keys: + xfaded_sub.set_level(k, + linear_fade(self.levels.get(k, 0), + otherlevels.get(k, 0), + amount)) + + return xfaded_sub + +def linear_fade(start, end, amount): + """Fades between two floats by an amount. amount is a float between + 0 and 1. If amount is 0, it will return the start value. If it is 1, + the end value will be returned.""" + level = start + (amount * (end - start)) + return level def sub_maxes(*subs): return Submaster("max(%r)" % (subs,), - dict_max(*[sub.levels for sub in subs])) + dict_max(*[sub.levels for sub in subs]), temporary=1) class Submasters: "Collection o' Submaster objects" diff --git a/flax/cues/cuelist1 b/flax/cues/cuelist1 --- a/flax/cues/cuelist1 +++ b/flax/cues/cuelist1 @@ -1,148 +1,160 @@ - + - - + + - + - + - - - + + + - + + + - - - + + + - + + + - - - + + + + - + + - + + + + - - + - + + + + - - + - + + + + - - + - + + + + - - + - + + + + - - + - + + + + - - + - + - + - + - + - + - + - + + - - - + + - + + - + - - + - + - - + - + - - + - + - - + - + - - + - + - - + - + - diff --git a/flax/dmxchanedit.py b/flax/dmxchanedit.py --- a/flax/dmxchanedit.py +++ b/flax/dmxchanedit.py @@ -34,7 +34,7 @@ class Onelevel(tk.Frame): # text description of channel self.desc_lab=tk.Label(self, text=Patch.get_channel_name(channelnum), - width=8, font=stdfont, anchor='w', + width=14, font=stdfont, anchor='w', padx=0, pady=0, bd=0, height=1, bg='black', fg='white') self.desc_lab.pack(side='left') diff --git a/flax/subs/song01 b/flax/subs/song01 deleted file mode 100644 --- a/flax/subs/song01 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.81 -10 : 0.81 -11 : 0.81 -12 : 0.405 -2 : 0.81 -3 : 0.81 -4 : 0.81 -42 : 0.45 -43 : 0.45 -47 : 0.0 -48 : 0.0 -49 : 0.2646 -5 : 0.81 -50 : 0.245 -51 : 0.2744 -52 : 0.3332 -53 : 0.343 -54 : 0.3724 -55 : 0.1078 -57 : 0.4312 -59 : 0.588 -62 : 0.196 -64 : 0.343 -65 : 0.4214 -66 : 0.4312 -67 : 0.0 -7 : 0.81 -8 : 0.81 -9 : 0.81 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.63 -oran2 : 0.63 -oran3 : 0.63 -oran4 : 0.63 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.0 -red2 : 0.0 -red3 : 0.0 -red4 : 0.0 -sidefill1 : 0.0 -sidefill2 : 0.0 -upfill1 : 0.0 -upfill2 : 0.68 -upfill3 : 0.68 -upfill4 : 0.0 diff --git a/flax/subs/song02 b/flax/subs/song02 deleted file mode 100644 --- a/flax/subs/song02 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.25 -10 : 0.25 -11 : 0.25 -12 : 0.125 -2 : 0.25 -3 : 0.25 -4 : 0.25 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.25 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.25 -8 : 0.25 -9 : 0.25 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.27 -oran2 : 0.27 -oran3 : 0.27 -oran4 : 0.27 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.81 -red2 : 0.81 -red3 : 0.81 -red4 : 0.81 -sidefill1 : 0.41 -sidefill2 : 0.41 -upfill1 : 0.0 -upfill2 : 0.28 -upfill3 : 0.28 -upfill4 : 0.0 diff --git a/flax/subs/song03 b/flax/subs/song03 deleted file mode 100644 --- a/flax/subs/song03 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.56 -10 : 0.56 -11 : 0.56 -12 : 0.28 -2 : 0.56 -3 : 0.56 -4 : 0.56 -42 : 0.46 -43 : 0.46 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.56 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.56 -8 : 0.56 -9 : 0.56 -blue1 : 1.0 -blue2 : 1.0 -blue3 : 1.0 -blue4 : 1.0 -gree1 : 0.19 -gree2 : 0.285 -gree3 : 0.855 -gree4 : 0.76 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.17 -oran2 : 0.17 -oran3 : 0.17 -oran4 : 0.17 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.55 -red2 : 0.55 -red3 : 0.55 -red4 : 0.55 -sidefill1 : 0.56 -sidefill2 : 0.56 -upfill1 : 0.0 -upfill2 : 0.0 -upfill3 : 0.0 -upfill4 : 0.0 diff --git a/flax/subs/song04 b/flax/subs/song04 deleted file mode 100644 --- a/flax/subs/song04 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.3 -10 : 0.3 -11 : 0.3 -12 : 0.15 -2 : 0.3 -3 : 0.3 -4 : 0.3 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.3 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.3 -8 : 0.3 -9 : 0.3 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.44 -oran2 : 0.44 -oran3 : 0.44 -oran4 : 0.44 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.84 -red2 : 0.84 -red3 : 0.84 -red4 : 0.84 -sidefill1 : 0.63 -sidefill2 : 0.63 -upfill1 : 0.0 -upfill2 : 0.25 -upfill3 : 0.25 -upfill4 : 0.0 diff --git a/flax/subs/song05 b/flax/subs/song05 deleted file mode 100644 --- a/flax/subs/song05 +++ /dev/null @@ -1,11 +0,0 @@ -1 : 1 -2 : 1 -3 : 1 -4 : 1 -5 : 1 -7 : 1 -8 : 1 -9 : 1 -10 : 1 -11 : 1 -12 : 0.5 diff --git a/flax/subs/song06 b/flax/subs/song06 deleted file mode 100644 --- a/flax/subs/song06 +++ /dev/null @@ -1,11 +0,0 @@ -1 : 1 -2 : 1 -3 : 1 -4 : 1 -5 : 1 -7 : 1 -8 : 1 -9 : 1 -10 : 1 -11 : 1 -12 : 0.5 diff --git a/flax/subs/song07 b/flax/subs/song07 deleted file mode 100644 --- a/flax/subs/song07 +++ /dev/null @@ -1,11 +0,0 @@ -1 : 1 -2 : 1 -3 : 1 -4 : 1 -5 : 1 -7 : 1 -8 : 1 -9 : 1 -10 : 1 -11 : 1 -12 : 0.5 diff --git a/flax/subs/song08 b/flax/subs/song08 deleted file mode 100644 --- a/flax/subs/song08 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.0 -10 : 0.0 -11 : 0.0 -12 : 0.0 -2 : 0.0 -3 : 0.0 -4 : 0.0 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.0 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 1.0 -7 : 0.0 -8 : 0.0 -9 : 0.0 -blue1 : 0.77 -blue2 : 0.77 -blue3 : 0.77 -blue4 : 0.77 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.77 -red2 : 0.77 -red3 : 0.77 -red4 : 0.77 -sidefill1 : 0.0 -sidefill2 : 0.0 -upfill1 : 0.0 -upfill2 : 0.0 -upfill3 : 0.0 -upfill4 : 0.0 diff --git a/flax/subs/song09 b/flax/subs/song09 deleted file mode 100644 --- a/flax/subs/song09 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.5 -10 : 0.5 -11 : 0.5 -12 : 0.25 -2 : 0.5 -3 : 0.5 -4 : 0.5 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.5 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.5 -8 : 0.5 -9 : 0.5 -blue1 : 1.0 -blue2 : 1.0 -blue3 : 1.0 -blue4 : 1.0 -gree1 : 0.068 -gree2 : 0.102 -gree3 : 0.306 -gree4 : 0.272 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.3 -oran2 : 0.3 -oran3 : 0.3 -oran4 : 0.3 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.0 -red2 : 0.0 -red3 : 0.0 -red4 : 0.0 -sidefill1 : 0.0 -sidefill2 : 0.0 -upfill1 : 0.0 -upfill2 : 0.0 -upfill3 : 0.0 -upfill4 : 0.0 diff --git a/flax/subs/song10 b/flax/subs/song10 deleted file mode 100644 --- a/flax/subs/song10 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.5 -10 : 0.5 -11 : 0.5 -12 : 0.25 -2 : 0.5 -3 : 0.5 -4 : 0.5 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.5 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.5 -8 : 0.5 -9 : 0.5 -blue1 : 1.0 -blue2 : 1.0 -blue3 : 1.0 -blue4 : 1.0 -gree1 : 0.068 -gree2 : 0.102 -gree3 : 0.306 -gree4 : 0.272 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.3 -oran2 : 0.3 -oran3 : 0.3 -oran4 : 0.3 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.0 -red2 : 0.0 -red3 : 0.0 -red4 : 0.0 -sidefill1 : 0.0 -sidefill2 : 0.0 -upfill1 : 0.0 -upfill2 : 0.0 -upfill3 : 0.0 -upfill4 : 0.0 diff --git a/flax/subs/song11 b/flax/subs/song11 deleted file mode 100644 --- a/flax/subs/song11 +++ /dev/null @@ -1,61 +0,0 @@ -1 : 0.35 -10 : 0.35 -11 : 0.35 -12 : 0.175 -2 : 0.35 -3 : 0.35 -4 : 0.35 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.35 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.35 -8 : 0.35 -9 : 0.35 -blue1 : 1.0 -blue2 : 1.0 -blue3 : 1.0 -blue4 : 1.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 1.0 -red2 : 1.0 -red3 : 1.0 -red4 : 1.0 -sidefill1 : 0.25 -sidefill2 : 0.25 -upfill1 : 0.0 -upfill2 : 0.4 -upfill3 : 0.4 -upfill4 : 0.0 diff --git a/flax/subs/song12 b/flax/subs/song12 deleted file mode 100644 --- a/flax/subs/song12 +++ /dev/null @@ -1,9 +0,0 @@ -main 2 : 0.43 -main 3 : 0.305 -main 4 : 1 -main 5 : 1 -main 7 : 0.835 -main 8 : 0.59 -main 9 : 1 -sidefill1 : 0.31 -sidefill2 : 0.06 diff --git a/flax/subs/song13 b/flax/subs/song13 deleted file mode 100644 --- a/flax/subs/song13 +++ /dev/null @@ -1,63 +0,0 @@ -1 : 0.79 -10 : 0.79 -11 : 0.79 -12 : 0.395 -2 : 0.79 -3 : 0.79 -4 : 0.79 -42 : 1.0 -43 : 1.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.79 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.79 -8 : 0.79 -9 : 0.79 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -main 8 : 0.0 -main 9 : 0.0 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.0 -red2 : 0.0 -red3 : 0.0 -red4 : 0.0 -sidefill1 : 0.62 -sidefill2 : 0.62 -upfill1 : 0.0 -upfill2 : 0.74 -upfill3 : 0.74 -upfill4 : 0.0 diff --git a/flax/subs/song14 b/flax/subs/song14 deleted file mode 100644 --- a/flax/subs/song14 +++ /dev/null @@ -1,63 +0,0 @@ -1 : 0.0 -10 : 0.0 -11 : 0.0 -12 : 0.0 -2 : 0.0 -3 : 0.0 -4 : 0.0 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.0 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.0 -8 : 0.0 -9 : 0.0 -blue1 : 0.93 -blue2 : 0.93 -blue3 : 0.93 -blue4 : 0.93 -gree1 : 0.026 -gree2 : 0.039 -gree3 : 0.117 -gree4 : 0.104 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.089225 -main 3 : 0.0632875 -main 4 : 0.2075 -main 5 : 0.2075 -main 7 : 0.1732625 -main 8 : 0.122425 -main 9 : 0.2075 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.1 -red2 : 0.1 -red3 : 0.1 -red4 : 0.1 -sidefill1 : 0.064325 -sidefill2 : 0.01245 -upfill1 : 0.0 -upfill2 : 0.0 -upfill3 : 0.0 -upfill4 : 0.0 diff --git a/flax/subs/song15 b/flax/subs/song15 deleted file mode 100644 --- a/flax/subs/song15 +++ /dev/null @@ -1,63 +0,0 @@ -1 : 0.66 -10 : 0.66 -11 : 0.66 -12 : 0.33 -2 : 0.66 -3 : 0.66 -4 : 0.66 -42 : 0.72 -43 : 0.72 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.66 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.66 -8 : 0.66 -9 : 0.66 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -main 8 : 0.0 -main 9 : 0.0 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.0 -red2 : 0.0 -red3 : 0.0 -red4 : 0.0 -sidefill1 : 0.0 -sidefill2 : 0.0 -upfill1 : 0.0 -upfill2 : 0.64 -upfill3 : 0.64 -upfill4 : 0.0 diff --git a/flax/subs/song16 b/flax/subs/song16 deleted file mode 100644 --- a/flax/subs/song16 +++ /dev/null @@ -1,63 +0,0 @@ -1 : 0.0 -10 : 0.0 -11 : 0.0 -12 : 0.0 -2 : 0.0 -3 : 0.0 -4 : 0.0 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.0 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.0 -8 : 0.0 -9 : 0.0 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.104 -gree2 : 0.156 -gree3 : 0.468 -gree4 : 0.416 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.3569 -main 3 : 0.25315 -main 4 : 0.83 -main 5 : 0.83 -main 7 : 0.69305 -main 8 : 0.4897 -main 9 : 0.83 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.4 -red2 : 0.4 -red3 : 0.4 -red4 : 0.4 -sidefill1 : 0.2573 -sidefill2 : 0.0498 -upfill1 : 0.0 -upfill2 : 0.0 -upfill3 : 0.0 -upfill4 : 0.0 diff --git a/flax/subs/song17 b/flax/subs/song17 deleted file mode 100644 --- a/flax/subs/song17 +++ /dev/null @@ -1,63 +0,0 @@ -1 : 0.69 -10 : 0.69 -11 : 0.69 -12 : 0.345 -2 : 0.69 -3 : 0.69 -4 : 0.69 -42 : 0.0 -43 : 0.0 -47 : 0.0 -48 : 0.0 -49 : 0.0 -5 : 0.69 -50 : 0.0 -51 : 0.0 -52 : 0.0 -53 : 0.0 -54 : 0.0 -55 : 0.0 -57 : 0.0 -59 : 0.0 -62 : 0.0 -64 : 0.0 -65 : 0.0 -66 : 0.0 -67 : 0.0 -7 : 0.69 -8 : 0.69 -9 : 0.69 -blue1 : 0.0 -blue2 : 0.0 -blue3 : 0.0 -blue4 : 0.0 -gree1 : 0.0 -gree2 : 0.0 -gree3 : 0.0 -gree4 : 0.0 -house : 0.0 -main 10 : 0.0 -main 11 : 0.0 -main 2 : 0.0 -main 3 : 0.0 -main 4 : 0.0 -main 5 : 0.0 -main 7 : 0.0 -main 8 : 0.0 -main 9 : 0.0 -oran1 : 0.0 -oran2 : 0.0 -oran3 : 0.0 -oran4 : 0.0 -patio1 : 0.0 -patio2 : 0.0 -red1 : 0.0 -red2 : 0.0 -red3 : 0.0 -red4 : 0.0 -sidefill1 : 0.0 -sidefill2 : 0.0 -upfill1 : 0.0 -upfill2 : 0.57 -upfill3 : 0.57 -upfill4 : 0.0 diff --git a/flax/subs/song18 b/flax/subs/song18 deleted file mode 100644 --- a/flax/subs/song18 +++ /dev/null @@ -1,11 +0,0 @@ -1 : 1 -2 : 1 -3 : 1 -4 : 1 -5 : 1 -7 : 1 -8 : 1 -9 : 1 -10 : 1 -11 : 1 -12 : 0.5 diff --git a/flax/subs/song19 b/flax/subs/song19 deleted file mode 100644 --- a/flax/subs/song19 +++ /dev/null @@ -1,11 +0,0 @@ -1 : 1 -2 : 1 -3 : 1 -4 : 1 -5 : 1 -7 : 1 -8 : 1 -9 : 1 -10 : 1 -11 : 1 -12 : 0.5 diff --git a/light8/dmxclient.py b/light8/dmxclient.py --- a/light8/dmxclient.py +++ b/light8/dmxclient.py @@ -20,7 +20,8 @@ def outputlevels(levellist): global _dmx,_id if _dmx is None: - _dmx=xmlrpclib.Server("http://dash:8030") + host = os.getenv('DMXHOST', 'localhost') + _dmx=xmlrpclib.Server("http://%s:8030" % host) try: _dmx.outputlevels(_id,levellist) @@ -31,3 +32,9 @@ def outputlevels(levellist): print "outputlevels had xml fault: %s" % e time.sleep(1) +dummy = os.getenv('DMXDUMMY') +if dummy: + print "dmxclient: DMX is in dummy mode." + def bogus(*args): + pass + outputlevels = bogus diff --git a/light8/patchdata.py b/light8/patchdata.py --- a/light8/patchdata.py +++ b/light8/patchdata.py @@ -3,55 +3,52 @@ patch = { ('side l','sidepost1') : 45, # posts ('side r','sidepost2') : 46, - 'sidefill1' : 13, - 'sidefill2' : 14, - - ('patio1','main 1',) : 1, - ('main 2',) : 2, - ('main 3',) : 3, - ('main 4',) : 4, - ('main 5',) : 5, - ('god','main 6') : 6, - ('main 7',) : 7, - ('main 8',) : 8, - ('main 9',) : 9, - ('main 10',) : 10, - ('main 11',):11, - ('patio2','main 12',):12, - 'hotback':19, - - 'cycleft' : 43, - 'cycright' : 42, + ('god',) : 6, - 'house':68, - ('desk1' ,'b11'):54, # left bank over house - ('marry1' ,'b12'):53, - ('b13',):52, - ('hotbox1' ,'b14'):51, - ('edge' ,'b15'):50, - ('phone','b16'):49, - ('cuba1' ,'b21'):55, # mid bank - ('b22',):56, - ('b23',):57, - ('b24'):58, - ('b25'):59, - ('desk2' ,'b26'):60, - ('rock','b31'):61, # right bank - ('b32',):62, - ('hotbox2' ,'b33'):63, - ('b34',):64, - ('marry2' ,'b35'):65, - ('cuba2' ,'b36'):66, + 'house': 68, + ('ramp1','dolly-ramp-l','b11',): 54, # left bank over house + ('main-l-blue', 'b12',): 53, + ('ramp2', 'b13',): 52, + ('main-lc-fill', 'b14',): 51, + ('main-c1', 'b15',): 50, + ('main-r-red','b16',): 49, + ('ramp6','b21',): 55, # mid bank + ('ramp5','b22',): 56, + ('ramp0-stairs','b23',): 57, + ('main-c2', 'b24',): 58, + ('ramp9-stairs', 'stairs-r', 'b25',): 59, + ('ramp3', 'b26',): 60, + ('ramp4', 'b31',): 61, # right bank + ('main-l-red', 'b32',): 62, + ('main-c3', 'b33',): 63, + ('main-r-blue', 'b34',): 64, + ('ramp8', 'dolly-ramp-r', 'b35',) : 65, + ('ramp7', 'b36',): 66, + 'oran1':21, 'oran2':25, 'oran3':29, 'oran4':33, 'gree1':22, 'gree2':26, 'gree3':30, 'gree4':34, 'blue1':23, 'blue2':27, 'blue3':31, 'blue4':35, 'red1' :24, 'red2' :28, 'red3' :32, 'red4' :36, - 'upfill1' : 40, - 'upfill2' : 38, - 'upfill3' : 37, - 'upfill4' : 39, - 'cafe1': 15, - 'cafe2': 16, - 'dream':17, - 'xmas':41, + + # hello dolly + 'f1' : 1, + 'f1.5' : 3, + 'f2' : 4, + 'f3' : 5, + 'f4' : 7, + 'f5' : 8, + 'diag' : 9, + 'f6' : 10, + 'diag-back' : 11, + 'f7' : 12, + + 'downfill-left' : 13, + 'downfill-right' : 14, + 'l-scp' : 40, + 'r-scp' : 37, + 'upstairs above' : 39, + 'upstairs front' : 15, + 'storefill' : 17, + 'dayback' : 41, + 'judge' : 19, }