lilypond-devel
[Top][All Lists]
Advanced

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

Re: Using \with {...} {...} instead of << xxx.set ...=... {...} >> in th


From: Mats Bengtsson
Subject: Re: Using \with {...} {...} instead of << xxx.set ...=... {...} >> in the documentation?
Date: Mon, 29 Oct 2007 16:08:36 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

If you want the same setting in  all your TabStaff contexts in a .ly file
or in a set of .ly files, then the recommended solution is instead to redefine the default definition of TabStaff, see section "Changing context default settings" (such a definition can be put in a separate .ly file to be included whenever it's
needed, see section "Style sheets").

I'd say that the \with construct is in a way more advanced than using \set,
in general. At least if you consider how things are described currently
in the manual. You are right that the user in this particular case has to know
that things happen in the TabStaff context, but if you instead consider
the example in sect. "Selecting notation font size", it's easy even for the
beginner to come up with an example like
\relative c'{ \set fontSize = #-2 c d  e f }
whereas you have to know about explicitly instantiating voices to do
\new Voice \with {fontSize = #-2 } \relative c'{ c d e f }

  /Mats


Reinhold Kainhofer wrote:
Hi, Looking at the documentation for non-guitar tab staves (http://reinhold.kainhofer.com/~lilypond/Documentation/user/lilypond/Non_002dguitar-tablatures.html ), I realized that the example might be simplified. In particular, in the following snippet, both staves look exactly the same:

\version "2.11.34"

\new TabStaff \with { stringTunings = #'(-5 -10 -15 -20)} { a,4 c' a e' e c' a e' }

\new TabStaff <<
  \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
  { a,4 c' a e' e c' a e' }

I think the first one is much more natural, since it creates a TabStaff with a given tuning. For the second one, one needs to know abit more about the internals (i.e. you need to know that you are inside a TabStaff, and you need to create parallel music)... Is there any reason for the current (second) version, and is there any official preference for any of the two forms?

Cheers,
Reinhold

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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