diff bin/curvecalc @ 362:fc87327e29c4

CC now attaches to hardware sliders and knobs. tres cool. KC gets a --sliders option to enable the sliders
author Drew Perttula <drewp@bigasterisk.com>
date Fri, 15 Jun 2007 06:04:55 +0000
parents ff914126f3ea
children c43691ddd39e
line wrap: on
line diff
--- a/bin/curvecalc	Fri Jun 15 04:29:44 2007 +0000
+++ b/bin/curvecalc	Fri Jun 15 06:04:55 2007 +0000
@@ -228,6 +228,7 @@
         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 @@
 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 @@
 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 @@
 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')