Mercurial > code > home > repos > light9
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 |
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 | 2 from random import randrange |
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 | 5 from Subs import * |
53 | 6 from Cue import * |
0 | 7 |
64 | 8 from Configeffects import * |
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 | 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 | 15 |
16 patch = { | |
40
f3d65ae17a8f
these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents:
4
diff
changeset
|
17 |
53 | 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 | 21 'sidefill1' : 13, |
22 'sidefill2' : 14, | |
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 | 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 | 39 'cycright' : 42, |
40
f3d65ae17a8f
these are mostly replaced with guys&dolls material (effects were not touched)
drewp
parents:
4
diff
changeset
|
40 |
0 | 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 | 64 'upfill1' : 40, |
65 'upfill2' : 38, | |
66 'upfill3' : 37, | |
67 'upfill4' : 39, | |
69 | 68 'cafe1': 15, |
69 'cafe2': 16, | |
70 'dream':17, | |
71 'xmas':41, | |
0 | 72 } |
73 | |
74 from util import maxes,scaledict | |
75 FL=100 | |
76 def fulls(chans): | |
77 # pass a list or multiple args | |
78 return dict([(c,FL) for c in chans]) | |
79 def levs(chans,levs): | |
80 return dict([(c,v) for c,v in zip(chans,levs)]) | |
81 | |
69 | 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 |