> Hi Jean, > > As always… remarkable. > > One question: How hard would it be to have this output more precise > timings (e.g., 1/4 or 1/10th or 1/100th of a second, or SMPTE timecode > in minutes:seconds:frames)? I could imagine this being *very* useful > for film/video/media composers.
To get 2-digit precision on the number of seconds, you can simply replace
(format #f "~as" (round rest))
with
(format #f "~,2fs" rest)
in the format-time function.
For seconds:frames at 24 frames/second, replace format-time with
(define (format-time seconds)
(let* ((minutes (euclidean-quotient seconds 60))
(rest (euclidean-remainder seconds 60))
(seconds (euclidean-quotient rest 1))
(rest (euclidean-remainder rest 1)))
(string-append (if (zero? minutes) "" (format #f "~a:" minutes))
(format #f "~a:~a" seconds (round (* rest 24))))))
Best,
Jean
signature.asc
Description: This is a digitally signed message part
