|
|
hi,
"Dave Blandston" <nomail@nomail> wrote:
> ... The time display is in milliseconds
> which is plenty accurate. Unfortunately there are many hundreds of musical
> events that I will have to log by hand.
don't you own a computer? :-)
anyway, reading this I (may have) got carried away and wrote a few lines of
script[*] over lunch (can't tell what OS you're running from the screenshot,
however, if you haven't Tcl/Tk installed, it is freely available on all
platforms). run it, right-click to start, left-click or 'b' key each beat, then
right-click again to stop; 'q' at any time to abandon. the only thing left to
do, as exercise for the interested reader ;-), is subtracting the initial mark
from all subsequent ones, and writing them to file. hope you'll enjoy it, I
certainly did.
[*] hack. :-)
regards, jr.
# ------------------------------------------------------------------------
#!/usr/bin/env wish
proc doStuff {} {
global T
set a [lsort -integer [array names T]]
set from [lindex $a 0]
set to [lindex $a end]
set n [llength $a]
set s [format {recorded %d beats, total ms: %d} $n [expr {$to - $from}]]
tk_dialog .dlg foobar $s info 0 ok
return
}
proc rightClick {} {
global rt T
if {!$rt(run)} {
set rt(run) true
set rt(begin) [clock milliseconds]
} \
else {
unset rt(run)
if {![array exists T]} {exit 99}
doStuff
destroy .
}
return
}
proc leftClick {} {
global rt T
if {$rt(run)} {
set T([clock milliseconds]) {}
}
return
}
set rt(run) false
label .lbl -padx 2cm -pady 2cm
pack .lbl
bind . <KeyPress-q> [list destroy .]
bind . <KeyPress-b> leftClick
bind . <ButtonRelease-1> leftClick
bind . <ButtonRelease-3> rightClick
# ------------------------------------------------------------------------
Post a reply to this message
|
|