Re: Stopwatch time in markup

2009-01-26 Thread James E. Bailey
Am 26.01.2009 um 20:33 schrieb Tim Reeves: The long part, the definition, could even be hidden away in another file that you \include. That's a really useful aspect. That you can include the code in your init file, and just use it. Mind you, I could not have written that function, but I'

Re: Stopwatch time in markup

2009-01-26 Thread Carl D. Sorensen
Tom Hall ludions.com> writes: > > > OK, I'll do it this way, the arguments to the music-fn are now strings and not > integers, so no integer-> string conversion needed. It would be better to still > use integers and then pad a 0 where required, but I'm not sure how to do this. Use the format p

Re: Stopwatch time in markup

2009-01-26 Thread Tim Reeves
> Date: Sat, 24 Jan 2009 22:03:29 +0100 > From: "James E. Bailey" > Subject: Re: Stopwatch time in markup > To: Mark Polesky > Cc: lilypond-user@gnu.org, Tom Hall > Message-ID: <5c862e1f-ac50-4e7b-b7bb-30b3f4503...@googlemail.com> > Content-Type: text/pl

Re: Stopwatch time in markup

2009-01-26 Thread Wilbert Berendsen
Op zondag 25 januari 2009, schreef Tom Hall: > WOuld you know how to add to the func a way to pad a zero > in case of situations like the above? timestamp = #(define-music-function (parser location minutes seconds) (number? number?) (let ((min (number->string minutes)) (sec (format #f

Re: Stopwatch time in markup

2009-01-25 Thread Tom Hall
OK, I'll do it this way, the arguments to the music-fn are now strings and not integers, so no integer-> string conversion needed. It would be better to still use integers and then pad a 0 where required, but I'm not sure how to do this. stopwatch = #(define-music-function (parser location minu

Re: Stopwatch time in markup

2009-01-25 Thread Mark Polesky
Tom Hall wrote: > This works well for most times, except when secs <10 > > { c'1 \timestamp #4 #03 c' } > > Here 03 gets passed in as an integer of 3 I guess > so the result looks not so good: 4"3' > > WOuld you know how to add to the func a way to pad a zero > in case of situations like the ab

Re: Stopwatch time in markup

2009-01-25 Thread Tom Hall
Hello Mark Mark Polesky yahoo.com> writes: > Don't forget you can store all the formatting as a music-function: > > { c'1 \timestamp #4 #33 c' } This works well for most times, except when secs <10 { c'1 \timestamp #4 #03 c' } Here 03 gets passed in as an integer of 3 I guess so the result l

Re: Stopwatch time in markup

2009-01-24 Thread Tom Hall
Hello Mark Mark Polesky yahoo.com> writes: > Don't forget you can store all the formatting as a music-function: ... > { c'1 \timestamp #4 #33 c' } Thanks very much Mark, for this. I had been trying to make just such a function earlier today, after reading through 6.1.3 Paired substitution fun

Re: Stopwatch time in markup

2009-01-24 Thread James E. Bailey
See, that's just amazing. personally, I think \markup \concat {4\char ##x2032 " 33"\char##x2033 } is a little shorter, but it's kind of awesome that that can be done with all that stuff that apparently means something. Am 24.01.2009 um 21:49 schrieb Mark Polesky: Don't forget you can stor

Re: Stopwatch time in markup

2009-01-24 Thread Mark Polesky
Don't forget you can store all the formatting as a music-function: timestamp = #(define-music-function (parser location minutes seconds) (number? number?) (let ((min (number->string minutes)) (sec (number->string seconds))) #{ \mark \markup \rounded-box \small \concat { $min ′ $sec ″ } #}))

Re: Stopwatch time in markup

2009-01-24 Thread James E. Bailey
See http://code.google.com/p/lilypond/issues/detail?id=735&q=font that shows how to fix the font problem. Then you can compile with the prime and double-prime characters. You'll get the pango warning, but you can ignore that. Am 24.01.2009 um 12:45 schrieb Tom Hall: Ole Schmidt gmx.net> w

Re: Stopwatch time in markup

2009-01-24 Thread James E. Bailey
Yeah, the Pango warning is normal. that happens regardless. But there's an .scm file that needs to have 0 added to it in order to actually get output. Am 24.01.2009 um 12:45 schrieb Tom Hall: Ole Schmidt gmx.net> writes: when I move the brace: % \version "2.12.1" { \mark \mar

Re: Stopwatch time in markup

2009-01-24 Thread Tom Hall
Ole Schmidt gmx.net> writes: > > when I move the brace: > % > \version "2.12.1" > > { > \mark \markup { \rounded-box > \small \concat { 4' 33'' } > } c'2 > } > % > > it works but not with the prime and double prime characters copy and pasted in, that gives the Pango-WA

Re: Stopwatch time in markup

2009-01-24 Thread Ole Schmidt
when I move the brace: % \version "2.12.1" { \mark \markup { \rounded-box \small \concat { 4' 33'' } } c'2 } % it works ole Am 24.01.2009 um 11:31 schrieb James E. Bailey: That's odd, there are extra spaces in there too. What if you try just copying and pasting in th

Re: Stopwatch time in markup

2009-01-24 Thread James E. Bailey
That's odd, there are extra spaces in there too. What if you try just copying and pasting in the ′ and ″ characters? Or what about using \char ##x2032? Does that help? Am 24.01.2009 um 11:04 schrieb Ole Schmidt: when I compile your example, it comes out like this (see pdf), why?? I'am on Mac

Re: Stopwatch time in markup

2009-01-24 Thread Ole Schmidt
when I compile your example, it comes out like this (see pdf), why?? I'am on Mac OS 10.5.6 using the latest Lilypond... <> ole Am 23.01.2009 um 23:59 schrieb Mark Polesky: James E. Bailey wrote: Wow, that took me a minute to figure out. The quotes around 33" are the problem. That makes

Re: Stopwatch time in markup

2009-01-23 Thread Mark Polesky
James E. Bailey wrote: > Wow, that took me a minute to figure out. The quotes around 33" are > the problem. That makes it separate text. Putting the quotes around > the entire time fixes it. > { > \mark \markup \rounded-box { >\small { > "4'33\"" >} > } c'2 >

Re: Stopwatch time in markup

2009-01-23 Thread James E. Bailey
Wow, that took me a minute to figure out. The quotes around 33" are the problem. That makes it separate text. Putting the quotes around the entire time fixes it. { \mark \markup \rounded-box { \small { "4'33\"" } } c'2 } Am 23.01.2009 um 22:39 schrieb Tom Hall: Hel

Re: Stopwatch time in markup

2009-01-23 Thread Tom Hall
Hello Neil Neil Thornock gmail.com> writes: > See the change below: thanks for that, but it's the same difference here using your suggestion (Mac PPC X.4.11). Is it working for you? Regards Tom > > > > \version "2.12.1" > { >  \mark \markup \rounded-box { \small { 4'

Re: Stopwatch time in markup

2009-01-23 Thread Neil Thornock
See the change below: > > > > \version "2.12.1" > > { > \mark \markup \rounded-box { > \small { 4'"33\"" } > } > > c'2 > } > > > > > > > > > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > ht

Stopwatch time in markup

2009-01-23 Thread Tom Hall
Hello List I want to print stopwatch timings in a score, surrounded by a little box. I've been through the help files and the archives of this list, but since quotation marks are special characters, it's not straight-forward and I've not managed to get this right. I'm aiming for somthing like: