annotate light8/rsn.py @ 271:97c08a1c4351

gyrocontroller: remap buttons, fix keep mode Also, solo mode is now default, colors are brighter, numeric names for subs are converted to subs with only that channel up, send zeroes when exiting
author David McClosky <dmcc@bigasterisk.com>
date Fri, 17 Jun 2005 04:23:07 +0000
parents 7d768d04b9f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
117
c071ada6ae2b removed an extra import
drewp
parents: 112
diff changeset
1 #!/usr/bin/python
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
2 from __future__ import nested_scopes
45b12307c695 Initial revision
drewp
parents:
diff changeset
3
51
71489bb71528 - Meet Fader. He is going to grow up and be a crossfader some day
dmcc
parents: 49
diff changeset
4 from Tix import *
35
3cbe7110d8f7 cleanup imports, fix backwards colors in changing level direction
dmcc
parents: 34
diff changeset
5 from signal import signal, SIGINT
12
7adc65771676 big restructuring - moved lots of things (including most panels) to other files
drewp
parents: 4
diff changeset
6 from uihelpers import *
51
71489bb71528 - Meet Fader. He is going to grow up and be a crossfader some day
dmcc
parents: 49
diff changeset
7 from Fader import Fader
56
2af6698b0566 pulled Lightboard out of rsn.py (and fixed all the dependency problems i could find)
drewp
parents: 54
diff changeset
8 from Lightboard import Lightboard
137
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
9 import time # time is on our side
56
2af6698b0566 pulled Lightboard out of rsn.py (and fixed all the dependency problems i could find)
drewp
parents: 54
diff changeset
10
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
11 if len(sys.argv) >= 2:
45b12307c695 Initial revision
drewp
parents:
diff changeset
12 DUMMY = 0
102
e04f7b552bcd - scroll wheel works everywhere
dmcc
parents: 101
diff changeset
13 print "Light 8.8: This is the real thing, baby"
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
14 window_title = "Light 8.8 (On Air)"
45b12307c695 Initial revision
drewp
parents:
diff changeset
15 else:
45b12307c695 Initial revision
drewp
parents:
diff changeset
16 DUMMY = 1
102
e04f7b552bcd - scroll wheel works everywhere
dmcc
parents: 101
diff changeset
17 print "Light 8.8: Dummy mode"
0
45b12307c695 Initial revision
drewp
parents:
diff changeset
18 window_title = "Light 8.8 (Bogus)"
45b12307c695 Initial revision
drewp
parents:
diff changeset
19
45b12307c695 Initial revision
drewp
parents:
diff changeset
20 root = Tk()
45b12307c695 Initial revision
drewp
parents:
diff changeset
21 root.wm_title(window_title)
30
e9d2e7754fd9 sideways subs, new x/y buttons (which don't draw right, but they work)
drewp
parents: 29
diff changeset
22 root.wm_geometry('+462+470')
19
6284a812da50 makefile - add link to ../Widgets/FlyingFader.py
dmcc
parents: 17
diff changeset
23 root.tk_focusFollowsMouse()
4
f974a462133f added light8 from the posted light8-1.0.tgz
drewp
parents: 0
diff changeset
24
102
e04f7b552bcd - scroll wheel works everywhere
dmcc
parents: 101
diff changeset
25
81
70bd142d72c2 added a SerialPot io object and made the IO code much more elegant (in io.py)
drewp
parents: 69
diff changeset
26 if not DUMMY:
70bd142d72c2 added a SerialPot io object and made the IO code much more elegant (in io.py)
drewp
parents: 69
diff changeset
27 # this turns the parportdmx from dummy to live
102
e04f7b552bcd - scroll wheel works everywhere
dmcc
parents: 101
diff changeset
28 print "Light 8.8: Preparing DMX interface..."
81
70bd142d72c2 added a SerialPot io object and made the IO code much more elegant (in io.py)
drewp
parents: 69
diff changeset
29 parportdmx.golive()
4
f974a462133f added light8 from the posted light8-1.0.tgz
drewp
parents: 0
diff changeset
30
102
e04f7b552bcd - scroll wheel works everywhere
dmcc
parents: 101
diff changeset
31 print "Light 8.8: And this...is Mr. Lightboard"
112
afbdae5e1359 dmx light output is now via a separate process which light8 talks to.
drewp
parents: 102
diff changeset
32 mr_lightboard = Lightboard(root,DUMMY)
101
a995fd1a8f03 result of 7.12 performance
dmcc
parents: 90
diff changeset
33 # root.tk_setPalette('gray40')
4
f974a462133f added light8 from the posted light8-1.0.tgz
drewp
parents: 0
diff changeset
34
26
219d6fcbc28d Reclassification, minor cleanups
dmcc
parents: 19
diff changeset
35 signal(SIGINT, mr_lightboard.quit)
59
001646cd5349 all mousewheel events everywhere will now pass up the tree to be caught by
drewp
parents: 57
diff changeset
36
90
d34a4956417a rsn has a separate thread that receives rlslider connections from a potserver.py process,
drewp
parents: 81
diff changeset
37 #
d34a4956417a rsn has a separate thread that receives rlslider connections from a potserver.py process,
drewp
parents: 81
diff changeset
38 # start net slider server in separate thread
d34a4956417a rsn has a separate thread that receives rlslider connections from a potserver.py process,
drewp
parents: 81
diff changeset
39 #
137
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
40 print "Light 8.8: External input server DELETED!"
127
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
41 #import ExternalInput, thread
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
42 #thread.start_new_thread(ExternalInput.start_server,())
90
d34a4956417a rsn has a separate thread that receives rlslider connections from a potserver.py process,
drewp
parents: 81
diff changeset
43
26
219d6fcbc28d Reclassification, minor cleanups
dmcc
parents: 19
diff changeset
44 bindkeys(root,'<Escape>', mr_lightboard.quit)
4
f974a462133f added light8 from the posted light8-1.0.tgz
drewp
parents: 0
diff changeset
45
59
001646cd5349 all mousewheel events everywhere will now pass up the tree to be caught by
drewp
parents: 57
diff changeset
46 root.bind_class("all","<ButtonPress-4>",lambda ev: eventtoparent(ev,"<ButtonPress-4>"))
001646cd5349 all mousewheel events everywhere will now pass up the tree to be caught by
drewp
parents: 57
diff changeset
47 root.bind_class("all","<ButtonPress-5>",lambda ev: eventtoparent(ev,"<ButtonPress-5>"))
57
eaf60f5dce86 rm'd unneeded imports
drewp
parents: 56
diff changeset
48
102
e04f7b552bcd - scroll wheel works everywhere
dmcc
parents: 101
diff changeset
49 print 'Light 8.8: "Uh...Shiny McShine?"'
137
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
50 root.update_idletasks()
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
51
127
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
52 if 1:
137
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
53 while 1:
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
54 root.update() # Receiver switches main
7d768d04b9f0 tiny changes, probably "not necessary!"
dmcc
parents: 127
diff changeset
55 time.sleep(0.01)
127
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
56 else:
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
57 sys.path.append("/home/drewp/projects/editor/pour")
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
58 from utils import runstats
fae7751d9760 disabled external sliders reading
drewp
parents: 117
diff changeset
59 runstats("root.mainloop()")
57
eaf60f5dce86 rm'd unneeded imports
drewp
parents: 56
diff changeset
60
eaf60f5dce86 rm'd unneeded imports
drewp
parents: 56
diff changeset
61 #import profile
eaf60f5dce86 rm'd unneeded imports
drewp
parents: 56
diff changeset
62 #profile.run("root.mainloop()","profile/idlemanysubs")