lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem with remove bar number/ why I'm not upgrading to the new sta


From: james
Subject: Re: Problem with remove bar number/ why I'm not upgrading to the new stable version
Date: Sat, 27 Oct 2012 11:20:55 +0200


On Oct 26, 2012, at 8:15 PM, Werner LEMBERG wrote:
It would be very helpful to us if you can find some time to *exactly*
point out what background knowledge you are missing.  

Knowing what you don't know is always difficult. However, here's an example where the answer to my question was a bit above my level of understanding. Granted, the question was a bit above my level of understanding…

On Sep 7, 2012, at 1:48 AM, David Nalesnik wrote:

Hi James,

On Thu, Sep 6, 2012 at 5:00 PM, james <address@hidden> wrote:
I don't really understand it, but I can modify the examples of how to create custom dynamics to get what I want.
I have a document with several examples like:
rinforzamf = #(
 make-dynamic-script (
    markup #:line (
    #:left-align
    #:normal-text
    #:whiteout
    #:italic "rinforza"
    #:hspace 0
    #:whiteout
    #:dynamic "mf"
    )
)
)
And a macro that left-aligns it:
leftalign = { \once \override Dynamics.DynamicText #'self-alignment-X = #-1 }

Heretofore, I've just been manually adding the \leftalign before the \rinforzamf (for example). Is there a way to get both of these in one command?


With the following definitions, you can get what you want with a
single command.  Also, you can define other such combinations.

(BTW, I commented out two lines in the markup definition which I don't
think are needed.)

HTH,
David

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.17.1"

#(define (rinforza text)
(let* ((text
      (markup
        #:line (
          ;#:left-align
          #:normal-text
          #:whiteout
          #:italic "rinforza"
          ;#:hspace 0
          #:whiteout
          #:dynamic text)))
      (my-dyn (make-music 'AbsoluteDynamicEvent
                          'text text)))
(set! (ly:music-property my-dyn 'tweaks)
        (acons 'self-alignment-X -1
                   (ly:music-property my-dyn 'tweaks)))
my-dyn))

rinforzamf = #(rinforza "mf")
rinforzap = #(rinforza "p")

\score {
\new Staff <<
{ c'1 d' c' d' }
\new Dynamics {
  s1*2\rinforzamf
  s1*2\rinforzap
}

}

Hello, I'm having some difficulty understanding how to integrate this into my document. Is is possible to just add  (acons 'self-alignment-X -1 into the existing structure, and if so, where? Or does that not work?

While LilyPond
can't give a detailed introduction into Scheme, the example code is
intended to be understandable in most cases even by people who don't
have experience with Scheme.

I understand the bits that are clearly markup modifiers, but everything else is greek to me.

Maybe examples can be extended and/or reduced to make them easier to
comprehend.

It's not the examples in the documentation, or at least, I understand all of the documentation except for the introduction to scheme, which is fine for me, since I don't use scheme.

reply via email to

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