Changeset - fb888a771b42
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 17 years ago 2008-06-15 23:11:48
drewp@bigasterisk.com
curvecalc now starts up showing the whole time range
3 files changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -433,6 +433,7 @@ musicfilename = showconfig.songOnDisk(so
 
maxtime = wavelength(musicfilename)
 
dispatcher.send("max time",maxtime=maxtime)
 
dispatcher.connect(lambda: maxtime, "get max time",weak=0)
 
dispatcher.send("show all")
 
curveset.load(basename=os.path.join(showconfig.curvesDir(),
 
                                    showconfig.songFilenameFromURI(song)),
 
              skipMusic=opts.skip_music)
 
@@ -461,7 +462,7 @@ root.bind("<Control-Key-s>",savekey)
 
root.bind("<Control-Key-r>", lambda evt: dispatcher.send('reload all subs'))
 

	
 
create_status_lines(root)
 
for helpline in ["Bindings: C-s save subterms;  Esc see current time; S-Esc see curtime to end; Mousewheel zoom; C-p play/pause music at mouse",
 
for helpline in ["Bindings: C-s save subterms;  Esc see current time; S-Esc see curtime to end; C-Esc show all; Mousewheel zoom; C-p play/pause music at mouse",
 
                 "Curve point bindings: B1 drag point; C-B1 curve add point; S-B1 sketch points; Del selected points; 1..5 add point at time; B1 drag select points",
 
                 "Available in functions: nsin/ncos period=amp=1; within(a,b) bef(x) aft(x) compare to time; smoove(x) cubic smoothstep; chan(name); curvename(t) eval curve"]:
 
    tk.Label(root,text=helpline, font="Helvetica -12 italic",
light9/curve.py
Show inline comments
 
@@ -183,6 +183,7 @@ class Curveview(tk.Canvas):
 
        self.bind("<Shift-Escape>", lambda ev:
 
                  dispatcher.send("see time until end",
 
                                  t=self.current_time()))
 
        self.bind("<Control-Escape>", lambda ev: dispatcher.send("show all"))
 
        self.bind("<Control-p>", lambda ev:
 
                  dispatcher.send("music seek",
 
                                  t=self.world_from_screen(ev.x,0)[0]))
light9/zoomcontrol.py
Show inline comments
 
@@ -81,6 +81,7 @@ class Zoomcontrol(object,tk.Canvas):
 
        dispatcher.connect(self.zoom_about_mouse, "zoom about mouse")
 
        dispatcher.connect(self.see_time, "see time")
 
        dispatcher.connect(self.see_time_until_end, "see time until end")
 
        dispatcher.connect(self.show_all, "show all")
 
        dispatcher.connect(self.zoom_to_range, "zoom to range")
 
        self.created=1
 
    def zoom_to_range(self,start,end):
 
@@ -88,6 +89,11 @@ class Zoomcontrol(object,tk.Canvas):
 
        self.end = end
 
        self.redrawzoom()
 

	
 
    def show_all(self):
 
        self.start = self.mintime
 
        self.end = self.maxtime
 
        self.redrawzoom()
 

	
 
    def zoom_about_mouse(self,t,factor):
 
        self.start = t - factor*(t-self.start)
 
        self.end = t + factor*(self.end-t)
0 comments (0 inline, 0 general)