lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tempoMark - documentation and use


From: Jonathan Kulp
Subject: Re: tempoMark - documentation and use
Date: Tue, 12 May 2009 00:22:44 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Graham Percival wrote:
> Yes, come up with another score marking.  Granted, it might get
[snip]

Before I make a bunch of replacements and a patch, can anyone see a potential problem with changing the example in LM 5.1.5 to use these functions instead:

%%%%%%

mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
  #:line(#:dynamic "mp" #:text #:italic "dolce" )))

inst = #(define-music-function (parser location string) (string?)
       (make-music
               'TextScriptEvent
               'direction UP
               'text (markup #:bold (#:box string))))

\relative c'' {
  \tempo 4=50
  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
  \once \override Score.RehearsalMark #'padding = #2.0
  \inst "clarinet"
  cis4.\< d8 e4 fis | g8(\! fis)-. e( d)-. cis2
}

%%%%%%

I got the "inst" function from the LSR and it seems like a good one to use in a discussion of stylesheets and storing variables in separate \include files. If it looks o.k. then I'll change all of the instances of the previous "tempoMark" to "inst" in LM 5.1.5.

Now there's also a "tempoMark" function defined in NR 6.1.2, Interfaces for programmers. My instinct is to leave this one alone--it is not obsolete, since the predefined \tempo command does not take a $padding argument like this bit of scheme does, right? Here's the code in question:

%%%%%%%

tempoMark = #(define-music-function (parser location padding marktext)
(number? string?)

#{
  \once \override Score . RehearsalMark #'padding = $padding
\once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
\mark \markup { \bold $marktext }
#})

\relative c'' {
  c2 e
  \tempoMark #3.0 #"Allegro"
  g c
}

%%%%%%


Am I right not to mess with this one?

Best,

Jon


On Mon, May 11, 2009 at 12:31:49PM -0500, Jonathan Kulp wrote:
I'm looking at this example now and am not sure what to do with it.  While it's
true that the tempoMark scheme function itself is not necessary now that \tempo
does the same thing, it's also true that the point of this passage in the LM
5.1.5 is to show how use definitions and to place them in separate \include
files, not to teach "how to display a tempo marking."  Maybe I should come up
with some other score marking that could be used instead of a tempo marking, or
do you think that whole macro can just be deleted from the example and the
"mpdolce" macro will suffice as an example to stick in a definitions file?
Trevor, do you have thoughts on this?  This example also occurs in NR 6.1.2,
Interfaces for programmers.

Jon

On Sun, May 10, 2009 at 8:55 AM, Graham Percival <address@hidden>
wrote:

    Where in the world is Carmen Sandi... oops, wrong example.

    If "the \tempoMark" exaple is in the NR, then Jonathan should
    figure out what you're talking about and prepare the patch.

    If "the \tempoMark" example is in the LM... then hey, this is
    simple enough, Jonathan should still prepare a patch.  Unless it'd
    destroy the continuity of the LM or something, in which case he
    should consult with Trevor.

    Cheers,
    - Graham


--
Jonathan Kulp
http://www.jonathankulp.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]