]> git.donarmstrong.com Git - lilypond.git/commitdiff
(Difficult tweaks):
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 9 Feb 2006 13:43:46 +0000 (13:43 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 9 Feb 2006 13:43:46 +0000 (13:43 +0000)
remove applyOutput example.
(Objects connected to the input): document \tweak, \parenthesize

ChangeLog
Documentation/user/changing-defaults.itely
make/lilypond-vars.make

index 1cd6a8138693edcf7908b092875e7b9013f7ab3c..9ae9bcf632e5a94bb2b53875bbd59322721ffa15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2006-02-09  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * Documentation/user/changing-defaults.itely (Difficult tweaks):
+       remove applyOutput example.
+       (Objects connected to the input): document \tweak, \parenthesize
+
        * lily/relocate.cc (prefix_relocation): allow "current"
        iso. TOPLEVEL_VERSION for share/lilypond/ suffix. This makes
        changing VERSION in a lily tree less painful.
index b1d66dea4ff9d355911ee4427894d7d8694fdcfe..0bd06f099525d08f015155495b1596a1b46d14ec 100644 (file)
@@ -1232,50 +1232,59 @@ the @internalsref{Fingering_engraver} plug-in says
 Fingering_engraver is part of contexts: @dots{} @b{@internalsref{Voice}}
 @end quotation
 
+@node Objects connected to the input
+@subsection Objects connected to the input
+
+In some cases, it is possible to take a short-cut for tuning graphical
+objects. For objects that result directly from a piece of the input,
+you can use the @code{\tweak} function, for example
+
+@lilypond[relative=2,fragment,verbatim,ragged-right]
+<
+  c
+  \tweak #'color #red d
+  g
+  \tweak #'duration-log #1  a
+>4-\tweak #'padding #10 -. 
+@end lilypond
+
+As you can see, properties are set directly in the objects directly,
+without mentioning the grob name or context where this should be
+applied.
+
+This technique only works for objects that are directly connected to
+an @internalsref{event} from the input, for example
+
+@itemize @bullet
+@item note heads, caused by chord-pitch.
+@item articulation signs, caused by articulation instructions
+@end itemize
+
+It notably does not work for stems and accidentals (these are caused
+by note heads, not by music events), clefs (these are not caused by
+music inputs, but rather by the change of a property value).
+In a similar vein, objects may be parenthesized by prefixing
+@code{\parenthesize} to the music event, 
+
+@lilypond[relative=2,fragment,verbatim,ragged-right]
+<
+  c
+  \parenthesize  d
+  g
+>4-\parenthesize -. 
+@end lilypond
+
+
+
+
 @node Difficult tweaks
 @subsection Difficult tweaks
 
 There are a few classes of difficult adjustments.  
 
 @itemize @bullet
-First, when there are
-several of the same objects at one point, and you want to adjust only
-one.  
-
-For example, if you want to change only one note head in a chord.
-
-In this case, the @code{\applyOutput} function must be used.  The
-next example defines a Scheme function @code{set-position-font-size}
-that sets the @code{font-size} property, but only  
-on objects that have @internalsref{note-head-interface} and are at the
-right Y-position.
-
-@lilypond[quote,verbatim]
-#(define ((set-position-font-size pos size) grob origin current)
-  (let*
-      ((meta (ly:grob-property grob 'meta))
-       (interfaces (cdr (assoc 'interfaces meta)))
-       (position (ly:grob-property grob 'staff-position)))
-   (if (and
-        ; is this a note head?
-        (memq 'note-head-interface interfaces)
-
-        ; is the Y coordinate right?
-        (= pos position))
-
-      ; then do it.
-      (set! (ly:grob-property grob 'font-size) size))))
-
-\relative {
-  c
-  \applyOutput #(set-position-font-size -2 4)
-  <c e g>
-}
-@end lilypond
 
-@noindent
-A similar technique can be used for accidentals.  In that case, the
-function should check for @code{accidental-interface}.
 
 @item
 Another difficult adjustment is the appearance of spanner objects,
index bd8d172f2e5bd0764ac2a9dd5a74466c1d442c81..23d39b8a41e309a550fc426cabd13a322c88721f 100644 (file)
@@ -3,8 +3,8 @@
 ifeq ($(LILYPOND_EXTERNAL_BINARY),)
 # environment settings.
 export PATH:=$(top-build-dir)/lily/$(outconfbase):$(top-build-dir)/buildscripts/$(outconfbase):$(top-build-dir)/scripts/$(outconfbase):$(PATH):
-export LILYPONDPREFIX:=$(build_lilypond_datadir)/$(TOPLEVEL_VERSION)
-export DVIPSHEADERS:=$(top-build-dir)/mf/out::
+export LILYPONDPREFIX:=$(build_lilypond_datadir)/current
+bexport DVIPSHEADERS:=$(top-build-dir)/mf/out::
 export LILYPOND_BINARY=$(top-build-dir)/lily/$(outconfbase)/lilypond
 else