annotate light8/Config.py @ 85:174b35926067

converts subs from dicts to tab-sep-values and back again
author drewp
date Fri, 12 Jul 2002 12:07:38 +0000
parents 70bd142d72c2
children a995fd1a8f03
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
85
174b35926067 converts subs from dicts to tab-sep-values and back again
drewp
parents: 81
diff changeset
1 from __future__ import generators,division
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
2 from random import randrange
45b12307c695 Initial revision
drewp
parents:
diff changeset
3 from time import time
85
174b35926067 converts subs from dicts to tab-sep-values and back again
drewp
parents: 81
diff changeset
4 import os
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
5 from Subs import *
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
6 from Cue import *
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
7
64
871da71fc254 new config with a sub for each look
drewp
parents: 55
diff changeset
8 from Configeffects import *
871da71fc254 new config with a sub for each look
drewp
parents: 55
diff changeset
9
55
5e8c505bcc2c bad cues replaced with bogus ones that can't harm things
dmcc
parents: 53
diff changeset
10 f1 = Fade('bogus sub, i hope', 0, 2, 0.1)
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
11
55
5e8c505bcc2c bad cues replaced with bogus ones that can't harm things
dmcc
parents: 53
diff changeset
12 cues = [
5e8c505bcc2c bad cues replaced with bogus ones that can't harm things
dmcc
parents: 53
diff changeset
13 Cue("Seat filler", 0, 10, f1),
5e8c505bcc2c bad cues replaced with bogus ones that can't harm things
dmcc
parents: 53
diff changeset
14 ]
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
15
45b12307c695 Initial revision
drewp
parents:
diff changeset
16 patch = {
40
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
17
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
18 ('side l','sidepost1') : 45, # posts
81
70bd142d72c2 added a SerialPot io object and made the IO code much more elegant (in io.py)
drewp
parents: 72
diff changeset
19 ('side r','sidepost2') : 46,
40
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
20
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
21 'sidefill1' : 13,
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
22 'sidefill2' : 14,
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
23
40
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
24 ('patio1','main 1',) : 1,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
25 ('main 2',) : 2,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
26 ('main 3',) : 3,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
27 ('main 4',) : 4,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
28 ('main 5',) : 5,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
29 ('god','main 6') : 6,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
30 ('main 7',) : 7,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
31 ('main 8',) : 8,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
32 ('main 9',) : 9,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
33 ('main 10',) : 10,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
34 ('main 11',):11,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
35 ('patio2','main 12',):12,
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
36 'hotback':19,
40
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
37
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
38 'cycleft' : 43,
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
39 'cycright' : 42,
40
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
40
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
41 'house':68,
40
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
42 ('desk1' ,'b11'):54, # left bank over house
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
43 ('marry1' ,'b12'):53,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
44 ('b13',):52,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
45 ('hotbox1' ,'b14'):51,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
46 ('edge' ,'b15'):50,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
47 ('phone','b16'):49,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
48 ('cuba1' ,'b21'):55, # mid bank
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
49 ('b22',):56,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
50 ('b23',):57,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
51 ('b24'):58,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
52 ('b25'):59,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
53 ('desk2' ,'b26'):60,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
54 ('rock','b31'):61, # right bank
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
55 ('b32',):62,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
56 ('hotbox2' ,'b33'):63,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
57 ('b34',):64,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
58 ('marry2' ,'b35'):65,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
59 ('cuba2' ,'b36'):66,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
60 'oran1':21, 'oran2':25, 'oran3':29, 'oran4':33,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
61 'gree1':22, 'gree2':26, 'gree3':30, 'gree4':34,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
62 'blue1':23, 'blue2':27, 'blue3':31, 'blue4':35,
f3d65ae17a8f these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents: 4
diff changeset
63 'red1' :24, 'red2' :28, 'red3' :32, 'red4' :36,
53
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
64 'upfill1' : 40,
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
65 'upfill2' : 38,
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
66 'upfill3' : 37,
032b2b67bc10 result of July 7th on-site editing
dmcc
parents: 51
diff changeset
67 'upfill4' : 39,
69
ab0be21b549b result of 7.9.2002 rehearsal
dmcc
parents: 68
diff changeset
68 'cafe1': 15,
ab0be21b549b result of 7.9.2002 rehearsal
dmcc
parents: 68
diff changeset
69 'cafe2': 16,
ab0be21b549b result of 7.9.2002 rehearsal
dmcc
parents: 68
diff changeset
70 'dream':17,
ab0be21b549b result of 7.9.2002 rehearsal
dmcc
parents: 68
diff changeset
71 'xmas':41,
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
72 }
45b12307c695 Initial revision
drewp
parents:
diff changeset
73
45b12307c695 Initial revision
drewp
parents:
diff changeset
74 from util import maxes,scaledict
45b12307c695 Initial revision
drewp
parents:
diff changeset
75 FL=100
45b12307c695 Initial revision
drewp
parents:
diff changeset
76 def fulls(chans):
45b12307c695 Initial revision
drewp
parents:
diff changeset
77 # pass a list or multiple args
45b12307c695 Initial revision
drewp
parents:
diff changeset
78 return dict([(c,FL) for c in chans])
45b12307c695 Initial revision
drewp
parents:
diff changeset
79 def levs(chans,levs):
45b12307c695 Initial revision
drewp
parents:
diff changeset
80 return dict([(c,v) for c,v in zip(chans,levs)])
45b12307c695 Initial revision
drewp
parents:
diff changeset
81
69
ab0be21b549b result of 7.9.2002 rehearsal
dmcc
parents: 68
diff changeset
82
85
174b35926067 converts subs from dicts to tab-sep-values and back again
drewp
parents: 81
diff changeset
83 # instead of import, we exec to maintain a single namespace
174b35926067 converts subs from dicts to tab-sep-values and back again
drewp
parents: 81
diff changeset
84 the_dir_of_this_module=os.path.dirname(__file__)
174b35926067 converts subs from dicts to tab-sep-values and back again
drewp
parents: 81
diff changeset
85 execfile(os.path.join(the_dir_of_this_module,"Configsubs.py"))
174b35926067 converts subs from dicts to tab-sep-values and back again
drewp
parents: 81
diff changeset
86