0
|
1 Light 8 Lighting Control
|
|
2 ------------------------
|
|
3
|
|
4 Installation
|
|
5
|
|
6 You'll need Python 2.2, Tk 8.x. Depending on your platform, you might
|
|
7 need SWIG as well. We also assume you have the same hardware that
|
|
8 we built. It shouldn't be too hard to adapt it to another system,
|
|
9 but we leave that as an exercise to the reader.
|
|
10
|
|
11 1. SWIG the parallel port C code. (optional, depending on platform,
|
|
12 compiler, etc.)
|
|
13
|
|
14 First,
|
|
15
|
|
16 shell> make parport_wrap.c
|
|
17
|
|
18 Then,
|
|
19
|
|
20 shell> make parportmodule.so
|
|
21
|
|
22 2. Create the necessary preference files.
|
|
23
|
|
24 shell> touch /tmp/light9.prefs
|
|
25 shell> touch /tmp/light9.prefs.dummy
|
|
26
|
|
27 Sadly, we didn't have the 5 seconds to add this to the code.
|
|
28
|
|
29 3. You're done. Sadly, Light 8 needs to be run as root, due to the nature of
|
|
30 of the parallel port interface. However, you can run it in dummy mode
|
|
31 without being root.
|
|
32
|
|
33 Live mode:
|
|
34 shell> su
|
|
35 <enter password>
|
|
36 shell> python light8.py real
|
|
37
|
|
38 or
|
|
39
|
|
40 Dummy mode:
|
|
41 shell> python light8.py
|
|
42
|
|
43
|
|
44 Introduction and Usage
|
|
45
|
|
46 Light 8 is a quick-and-dirty hack to produce a working
|
|
47 DMX controller written in Python and Tk. Our website,
|
|
48 http://light9.bigasterisk.com/danceshow, has more information.
|
|
49 We hope to produce a more elegant and flexible solution, known as
|
|
50 Light 9. Nevertheless, we found Light 8 useful, and perhaps other
|
|
51 lighting designers will as well.
|
|
52
|
|
53 As an example, we have included the configuration files for the dance
|
|
54 show that we used Light 8 on. Light 8 has two modes, dummy and live.
|
|
55 Each has it's own configuration file. Dummy uses ConfigDummy.py and
|
|
56 live uses Config.py. Speaking of which, you need to add something
|
|
57 after the command line to enter real mode so that you don't accidently
|
|
58 run the show (this may seem silly, but we were developing it on two
|
|
59 computers and didn't want to accidentally run it on both).
|
|
60
|
|
61 Dummy mode:
|
|
62 shell> ./rsn.py
|
|
63
|
|
64 Real mode:
|
|
65 shell> ./rsn.py real
|
|
66
|
|
67 (you could actually type anything for 'real', it just counts
|
|
68 arguments)
|
|
69
|
|
70 Config must include several structures. patch is a dictionary,
|
|
71 mapping channels to dimmers. However, unlike most light boards,
|
|
72 Light 8 supports named channels. Additionally, channels may have
|
|
73 multiple names. Furthermore, there is a 1-to-1 patch of channels
|
|
74 to dimmers. Here's an example patch to illustrate:
|
|
75
|
|
76 patch = {
|
|
77 ('center neutral 1', 'main special') : 1,
|
|
78 'SL blue' : 3,
|
|
79 'SR blue' : 4,
|
|
80 }
|
|
81
|
|
82 In this patch, we can refer to dimmer 1 by two names, 'center
|
|
83 neutral 1' and 'main special'. We can also refer to it as '1' or 1
|
|
84 (either a Python string or int. Heck, maybe even a float, but I'm
|
|
85 not sure). Dimmer 2 can only be referred to as '2' or 2, since
|
|
86 the patch omits a name. Dimmer 3 can be referred to as 'SL blue',
|
|
87 '3', or 3. And so on...
|
|
88
|
|
89 Source file breakdown
|
|
90 ---------------------
|
|
91
|
|
92 rsn.py - Main loop, I/O, GUI, persistence, etc
|
|
93 Xfader.py - 2-group crossfader widget and algorithm
|
|
94 Patch.py - Manages DMX channel naming
|
|
95 util.py - Some cue arithmetic functions
|
|
96 Subs.py - Submaster object, including effects gui api,
|
|
97 Config.py - Show-specific names and effect code
|
|
98 ConfigDummy.py - Show-specific names and effect code for dummy site
|
|
99 parport* - Parallel port interface code
|