diff --git a/bin/curvecalc b/bin/curvecalc --- a/bin/curvecalc +++ b/bin/curvecalc @@ -228,6 +228,7 @@ class Output: self.send_dmx(t) def send_dmx(self,t): + dispatcher.send("curves to sliders", t=t) scaledsubs=[] for st in self.subterms: scl = st.scaled(t) @@ -355,7 +356,11 @@ toplevelat("curvecalc",root) root.tk_focusFollowsMouse() parser = optparse.OptionParser() -options,args = parser.parse_args() +parser.add_option("--sliders", action='store_true', + help='use hardware sliders') +parser.add_option("--skip-music", action='store_true', + help="ignore music and smooth_music curve files") +opts, args = parser.parse_args() try: song = URIRef(args[0]) @@ -368,8 +373,8 @@ music=Music() zc = Zoomcontrol(root) zc.pack(side='top',fill='x') -curveset = Curveset() -csv = Curvesetview(root,curveset) +curveset = Curveset(sliders=opts.sliders) +csv = Curvesetview(root, curveset) csv.pack(side='top',fill='both',exp=1) ssv = SubtermSetView(root) @@ -387,7 +392,8 @@ maxtime = wavelength(musicfilename) dispatcher.send("max time",maxtime=maxtime) dispatcher.connect(lambda: maxtime, "get max time",weak=0) curveset.load(basename=os.path.join(showconfig.curvesDir(), - showconfig.songFilenameFromURI(song))) + showconfig.songFilenameFromURI(song)), + skipMusic=opts.skip_music) subterms = [] sub_commands_tk(root, curveset, subterms, root, ssv, graph).pack(side='top',fill='x')