Changeset - 8a1ec8aca432
[Not reviewed]
default
0 5 0
drewp@bigasterisk.com - 18 years ago 2007-06-10 03:27:16
drewp@bigasterisk.com
more rdf updates
5 files changed with 26 insertions and 22 deletions:
0 comments (0 inline, 0 general)
bin/ascoltami
Show inline comments
 
@@ -495,7 +495,7 @@ def main():
 
    goStatus.config(bg='#800000', fg='white', relief='ridge')
 
    goStatus.pack(side='left', expand=True, fill='x')
 

	
 
    go = GoButton(player, goStatus, songfiles)
 
    go = GoButton(player, goStatus, songs)
 
    
 
    buts = ControlButtons(root, go, player, root)
 

	
bin/curvecalc
Show inline comments
 
@@ -15,6 +15,7 @@ except ImportError:
 
from twisted.internet import reactor,tksupport
 
import twisted
 
from twisted.web.xmlrpc import Proxy
 
from rdflib import Literal, URIRef
 
import logging
 
log = logging.getLogger()
 
logging.basicConfig(format="%(asctime)s %(levelname)-5s %(name)s %(filename)s:%(lineno)d: %(message)s")
 
@@ -27,6 +28,7 @@ from light9.zoomcontrol import Zoomcontr
 
from light9.curve import Curve, Curveview, Curveset, Curvesetview
 
from light9.wavelength import wavelength
 
from light9.uihelpers import toplevelat
 
from light9.namespaces import L9
 

	
 
import light9.Effects
 
fx_dict = light9.Effects.__dict__
 
@@ -272,11 +274,12 @@ class SubtermSetView(tk.Frame):
 
        if self.cur_col == 0:
 
            self.cur_row += 1
 

	
 
def add_one_subterm(subname, curveset, subterms, root, ssv, expr=None):
 
def add_one_subterm(graph, sub, curveset, subterms, root, ssv, expr=None):
 
    subname = graph.label(sub)
 
    if expr is None:
 
        expr = '%s(t)' % subname
 

	
 
    term = Subterm(Submaster.Submaster(subname), Subexpr(curveset,expr))
 
    term = Subterm(Submaster.Submaster(sub), Subexpr(curveset,expr))
 
    subterms.append(term)
 

	
 
    stv=Subtermview(ssv,term)
 
@@ -306,18 +309,10 @@ def sub_commands_tk(master, curveset, su
 

	
 
    return f
 

	
 
def add_subterms_from_file(filename, curveset, subterms, root, ssv):
 
    for line in file(filename):
 
        try:
 
            subname,expr = line.strip().split(" ",1)
 
        except ValueError:
 
            subname = line.strip()
 
            expr = ""
 

	
 
        term = add_one_subterm(subname, curveset, subterms, root, ssv, expr)
 

	
 
        # stv=Subtermview(root,term)
 
        # stv.pack(side='top',fill='x')
 
def add_subterms_for_song(graph, song, curveset, subterms, root, ssv):
 
    for st in graph.objects(song, L9['subterm']):
 
        add_one_subterm(graph, graph.value(st, L9['sub']), curveset, subterms,
 
                        root, ssv, graph.value(st, L9['expression']))
 

	
 
#######################################################################
 
root=tk.Tk()
 
@@ -329,7 +324,7 @@ parser = optparse.OptionParser()
 
options,args = parser.parse_args()
 

	
 
try:
 
    song = args[0]
 
    song = URIRef(args[0])
 
except IndexError:
 
    raise SystemExit("song name is required, e.g. '05-mix'")
 

	
 
@@ -346,9 +341,10 @@ csv.pack(side='top',fill='both',exp=1)
 
ssv = SubtermSetView(root)
 
ssv.pack(side='top', fill='x')
 

	
 
root.title("Curvemaster 3000MX - %s" % song)
 
graph = showconfig.getGraph()
 
root.title("Curvemaster 3000MX - %s" % graph.label(song))
 

	
 
musicfilename = showconfig.songFilename(song)
 
musicfilename = showconfig.songOnDisk(song)
 
maxtime = wavelength(musicfilename)
 
dispatcher.send("max time",maxtime=maxtime)
 
dispatcher.connect(lambda: maxtime, "get max time",weak=0)
 
@@ -357,8 +353,7 @@ curveset.load(basename=os.path.join(show
 
subterms = []
 
sub_commands_tk(root, curveset, subterms, root, ssv).pack(side='top',fill='x')
 

	
 
add_subterms_from_file(showconfig.subtermsForSong(song),
 
                       curveset, subterms, root, ssv)
 
add_subterms_for_song(graph, song, curveset, subterms, root, ssv)
 

	
 
log.debug("output")
 
out = Output(subterms, music)
light9/Submaster.py
Show inline comments
 
@@ -12,7 +12,12 @@ except ImportError:
 

	
 
class Submaster:
 
    "Contain a dictionary of levels, but you didn't need to know that"
 
    def __init__(self, name, leveldict=None, temporary=0):
 
    def __init__(self,
 
                 name=None,
 
                 graph=None, sub=None,
 
                 leveldict=None, temporary=0):
 
        if sub is not None:
 
            name = graph.label(sub)
 
        self.name = name
 
        self.temporary = temporary
 
        if leveldict:
 
@@ -23,6 +28,8 @@ class Submaster:
 
        if not self.temporary:
 
            dispatcher.connect(self.reload, 'reload all subs')
 
    def reload(self, quiet=False):
 
        print "no submaster reload"
 
        return
 
        if self.temporary:
 
            return
 
        try:
light9/io/__init__.py
Show inline comments
 
@@ -58,6 +58,8 @@ class UsbDMX(BaseIO):
 
    dimmers = 512
 
    def __init__(self):
 
        BaseIO.__init__(self)
 
        if self.dummy:
 
            return
 
        sys.path.append("/home/drewp/dmx_usb_module")
 
        from dmx import Dmx
 
        self.out = Dmx()
light9/networking.py
Show inline comments
 
@@ -12,7 +12,7 @@ def dmxServerPort():
 
    return 8030
 
    
 
def musicUrl():
 
    return "http://score:%s" % musicPort()
 
    return "http://localhost:%s" % musicPort()
 

	
 
def musicPort():
 
    return 8040
0 comments (0 inline, 0 general)