]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh://jeancharlesm@git.sv.gnu.org/srv/git/lilypond
authorJean-Charles Malahieude <lolyfan@wanadoo.fr>
Tue, 12 Aug 2008 12:59:19 +0000 (14:59 +0200)
committerJean-Charles Malahieude <lolyfan@wanadoo.fr>
Tue, 12 Aug 2008 12:59:19 +0000 (14:59 +0200)
Documentation/user/changing-defaults.itely
Documentation/user/chords.itely
Documentation/user/fretted-strings.itely
Documentation/user/simultaneous.itely
Documentation/user/world.itely
scm/music-functions.scm
scm/translation-functions.scm

index 9008885014bd3daa22b4c3c2433bca2f8cef63d9..719e0fb89858001f83577a77649676040c8846f2 100644 (file)
@@ -40,6 +40,8 @@ LilyPond.  It is written as a HTML document, which is available
 @uref{http://@/lilypond@/.org/@/doc/@/stable/@/Documentation/@/user/@/lilypond@/-internals/,on@/-line},
 but is also included with the LilyPond documentation package.
 
+@c TODO The following is at variance to what actually follows.  Fix -td
+
 There are four areas where the default settings may be changed:
 
 @itemize
@@ -1857,6 +1859,8 @@ a1
 @node Using break-visibility
 @unnumberedsubsubsec Using break-visibility
 
+@c TODO Add making other objects breakable
+
 @cindex break-visibility
 
 Most layout objects are printed only once, but some like
@@ -1878,19 +1882,20 @@ of the next line and a cautionary time signature will be printed
 at the end of the previous line as well.
 
 This behaviour is controlled by the @code{break-visibility}
-property, which is explained in @rlearning{Visibility and color of
-objects}.  This property takes a vector of three booleans which,
-in order, determine whether the object is printed at the end of,
-within the body of, or at the beginning of a line.  Or to be more
-precise, before a line break, where there is no line break, or
-after a line break.
+property, which is explained in
+@c Leave this ref on a newline - formats incorrectly otherwise -td
+@rlearning{Visibility and color of objects}.  This property takes
+a vector of three booleans which, in order, determine whether the
+object is printed at the end of, within the body of, or at the
+beginning of a line.  Or to be more precise, before a line break,
+where there is no line break, or after a line break.
 
 Alternatively, seven of the eight combinations may be specified
 by pre-defined functions, defined in @file{scm/output-lib.scm},
 where the last three columns indicate whether the layout objects
 will be visible in the positions shown at the head of the columns:
 
-@multitable @columnfractions .40 .15 .15 .15 .15
+@multitable @columnfractions .40 .15 .1 .1 .1
 @c TODO check these more carefully
 @headitem Function                   @tab Vector                  @tab Before @tab At no    @tab After
 @headitem form                       @tab form                    @tab break  @tab break    @tab break
@@ -2247,7 +2252,65 @@ Internals Reference: @rinternals{TextSpanner},
 @node Rotating objects
 @subsection Rotating objects
 
-@c FIXME Write this section
+Both layout objects and elements of markup text can be rotated by
+any angle about any point, but the method of doing so differs.
+
+@menu
+* Rotating layout objects::
+* Rotating markup::
+@end menu
+
+@node Rotating layout objects
+@unnumberedsubsubsec Rotating layout objects
+
+@cindex rotating objects
+@cindex objects, rotating
+
+All layout objects which support the @code{grob-interface} can be
+rotated by setting their @code{rotation} property.  This takes a
+list of three items: the angle of rotation counter-clockwise,
+and the x and y coordinates of the point relative to the object's
+reference point about which the rotation is to be performed.  The
+angle of rotation is specified in degrees and the coordinates in
+staff-spaces.
+
+The angle of rotation and the coordinates of the rotation point must
+be determined by trial and error.
+
+@cindex hairpins, angled
+@cindex angled hairpins
+
+There are only a few situations where the rotation of layout
+objects is useful; the following example shows one situation where
+they may be:
+
+@lilypond[quote,verbatim,relative=1]
+g4\< e' d' f\!
+\override Hairpin #'rotation = #'(20 -1 0)
+g,,4\< e' d' f\!
+@end lilypond
+
+@node Rotating markup
+@unnumberedsubsubsec Rotating markup
+
+All markup text can be rotated to lie at any angle by prefixing it
+with the @code{\rotate} command.  The command takes two arguments:
+the angle of rotation in degrees counter-clockwise and the text to
+be rotated.  The extents of the text are not rotated: they take
+their values from the extremes of the x and y coordinates of the
+rotated text.  In the following example the
+@code{outside-staff-priority} property for text is set to @code{#f}
+to disable the automatic collision avoidance, which would push some
+of the text too high.
+
+@lilypond[quote,verbatim,relative=1]
+\override TextScript #'outside-staff-priority = ##f
+g4^\markup { \rotate #30 "a G" }
+b^\markup { \rotate #30 "a B" }
+des^\markup { \rotate #30 "a D-Flat" }
+fis^\markup { \rotate #30 "an F-Sharp" }
+@end lilypond
+
 
 @node Aligning objects
 @subsection Aligning objects
index e6c2ab52912643c32e361f1226fa14e0533bbfd7..e9f5f52c7b35dc9167e448201dc2c05a6bf58207 100644 (file)
@@ -14,8 +14,9 @@
 
 @lilypondfile[quote]{chords-headword.ly}
 
-Chords can be entered in chord mode, which recognizes some traditional European chord naming conventions.  Chord names can also
-be displayed.  In addition, figured bass notation can be displayed.
+Chords can be entered either as normal notes or in chord mode and displayed
+using a variety of traditional European chord naming conventions.  Chord
+names and figured bass notation can also be displayed.
 
 @menu
 * Chord mode::
@@ -502,15 +503,15 @@ traditions use different names for the same set of chords.  There
 are also different symbols displayed for a given chord name.   The
 names and symbols displayed for chord names are customizable.
 
-@cindex Banter
 @cindex jazz chords
 @cindex chords, jazz
 
-The default chord name layout is a system for Jazz music, proposed
-by Klaus Ignatzek (see @ref{Literature list}).  There are also two
-other chord name schemes implemented: an alternate Jazz chord
-notation, and a systematic scheme called Banter chords.  The
-alternate Jazz notation is also shown on the chart in @ref{Chord
+The basic chord name layout is a system for Jazz music, proposed
+by Klaus Ignatzek (see @ref{Literature list}).  The chord naming
+system can be modified as described below.  An alternate jazz
+chord system has been developed using these modifications.
+The Ignatzek and alternate
+Jazz notation are shown on the chart in @ref{Chord
 name chart}.
 
 @c TODO --  Change this so we don't have a non-verbatim example.
@@ -525,7 +526,7 @@ The effect is demonstrated here:
 
 @lilypondfile[ragged-right]{chord-names-languages.ly}
 
-If none of the default settings give the desired output, the chord
+If none of the existing settings give the desired output, the chord
 name display can be tuned through the following properties.
 
 @table @code
index 8b6beef4f59431cae504a6a377258a7faddb0768..60394cd626b10f5dac35fd0fd2b45e133de10c12 100644 (file)
@@ -878,7 +878,7 @@ commands:
 
 @lilypond[quote,ragged-right,verbatim]
 
-\storePredefinedDiagram <c\5 e g c' e'>
+\storePredefinedDiagram <c e g c' e'>
                         #guitar-tuning
                         #"x;3-1-(;5-2;5-3;5-4;3-1-1);"
 <<
@@ -888,25 +888,27 @@ commands:
      }
   }
   \context FretBoards {
-    <c\5 e g c' e'>1
+    <c e g c' e'>1
     \predefinedFretboardsOff
-    <c\5 e g c' e'>
+    <c e g c' e'>
     \predefinedFretboardsOn
-    <c\5 e g c' e'>
+    <c e g c' e'>
   }
   \context Staff {
     \clef "treble_8"
-    <c\5 e g c' e'>1
-    <c\5 e g c' e'>
-    <c\5 e g c' e'>
+    <c e g c' e'>1
+    <c e g c' e'>
+    <c e g c' e'>
   }  
 >>
 @end lilypond
 
   
 
-Notes can be explicitly placed on a string.  It is often enough
-to place only the lowest note on an explicit string; the rest of 
+Sometimes the fretboard calculator will be unable to find
+an accceptable diagram.  This can often be remedied by
+manually assigning a note to a string.  In many cases, only one
+note need be manually placed on a string; the rest of 
 the notes will then be placed appropriately by the @code{FretBoards}
 context.
 
@@ -914,21 +916,17 @@ context.
 <<
   \context ChordNames {
      \chordmode { 
-       c1 c d:m d:m    
+       c1 c 
      }
   }
   \context FretBoards {
-    < c e g c' e' > 1
-    < c\5 e g c' e' > 1
-    < d a d' f'>
-    < d\4 a d' f'>
+    < c g c' e' g'> 1
+    < c g\4 c' e' g'> 1
   }
   \context Staff {
     \clef "treble_8"
-    < c e g c' e' > 1
-    < c e g c' e' > 1
-    < d a d' f'>
-    < d a d' f'>
+    < c g c' e' g'> 1
+    < c g c' e' g'> 1
   }  
 >>
 @end lilypond
@@ -943,8 +941,8 @@ Fingerings can be added to FretBoard fret diagrams.
      }
   }
   \context FretBoards {
-    < c\5-3 e-2 g c'-1 e' > 1
-    < d\4 a-2 d'-3 f'-1>
+    < c-3 e-2 g c'-1 e' > 1
+    < d a-2 d'-3 f'-1>
   }
   \context Staff {
     \clef "treble_8"
@@ -954,6 +952,30 @@ Fingerings can be added to FretBoard fret diagrams.
 >>
 @end lilypond
 
+The minimum fret to be used in calculating strings and frets for
+the FretBoard context can be set with the @code{minimumFret}
+property.
+
+@lilypond[quote, verbatim]
+<<
+  \context ChordNames {
+     \chordmode {
+       d1:m d:m
+     }
+  }
+  \context FretBoards {
+    < d a d' f'>
+    \set FretBoards.minimumFret = #5
+    < d a d' f'>
+  }
+  \context Staff {
+    \clef "treble_8"
+    < d a d' f'>
+    < d a d' f'>
+  }
+>>
+@end lilypond
+
 The strings and frets for the @code{FretBoards} context depend
 on the @code{stringTunings} property, which has the same meaning
 as in the TabStaff context.  See @ref{Custom tablatures} for 
@@ -965,15 +987,6 @@ Details are found at @rinternals{fret-diagram-interface}.  For a
 @code{FretBoards} fret diagram, the interface properties belong to 
 @code{FretBoards.FretBoard}.
 
-@snippets
-The minimum fret to be used in calculating strings and frets for
-the FretBoard context can be set with the @code{minimumFret}
-property.
-
-@c TODO -- snippet showing minimum fret.
-
-@c TODO -- snippet for using StringTunings
-
 @predefined
 \predefinedFretboardsOff,
 \predefinedFretboardsOn.
index 39e7cd0897eda94bb753cd1547817ace0dbbc08b..2ed0418bbbeb4f9b395e078a34b79308a29aad3c 100644 (file)
@@ -183,18 +183,18 @@ place, so it becomes voice three which has the stems up as desired.
 Spacing rests are often used to avoid too many rests, as seen in the
 example above.
 
-The method exposed creates two new voices when the @code{<<@{...@} \\
-@{...@}>>} construction is found in the code; to temporally add only
-one additional voice to an existing one, it is necessary to
-instantiate that voice explicitly. For these purposes, the
-@code{\voiceOne} ... @code{\voiceFour}, and @code{\oneVoice} commands
-can be used:
+Each music expression in the @code{<<{...} \\ {...}>>} construct
+is placed in a new voice, distinct from the voice for single-voice
+music; to temporarily add only one additional voice to an existing
+one, it is necessary to instantiate that voice explicitly.  For
+these purposes, the @code{\voiceOne} ... @code{\voiceFour}, and
+@code{\oneVoice} commands can be used:
 
 @example
 << @{ \voiceOne ... @} \new Voice @{ \voiceTwo ... @} >> \oneVoice
 @end example
 
-This is a better construction to keep the control of the voices, for
+This is a better construct to keep the control of the voices, for
 example, to ease a consistent assign of lyrics to the proper voice
 context.
 
index 9490c227bf45dd9207c3caf8d854709b42e262f5..6538ad949c229c93276a36c2226276028fe50c6b 100644 (file)
@@ -276,8 +276,7 @@ beat, but in a manner that is difficult to match by adjusting
 automatic beaming.  You can override this by switching off
 automatic beaming and beaming the notes manually.  Where matching
 existing typeset music is not an issue, you may still want to
-adjust the beaming behaviour and/or using compound time
-signatures.
+adjust the beaming behaviour and/or use compound time signatures.
 
 @snippets
 
index 5ca4d309afd66e9b3335713bf06720a9bc10065f..7b2cc3404f6d27e5b90e1821b98381b24fa5db9e 100644 (file)
@@ -689,7 +689,6 @@ SkipEvent. Useful for extracting parts from crowded scores"
       ((< i 0))
     (f (vector-ref v i))))
 
-;; TODO:  make a remove-grace-property too.
 (define-public (add-grace-property context-name grob sym val)
   "Set SYM=VAL for GROB in CONTEXT-NAME. "
   (define (set-prop context)
@@ -700,6 +699,25 @@ SkipEvent. Useful for extracting parts from crowded scores"
       (ly:context-set-property! where 'graceSettings new-settings)))
   (ly:export (context-spec-music (make-apply-context set-prop) 'Voice)))
 
+(define-public (remove-grace-property context-name grob sym)
+  "Remove all SYM for GROB in CONTEXT-NAME. "
+  (define (sym-grob-context? property sym grob context-name)
+    (and (eq? (car property) context-name)
+         (eq? (cadr property) grob)
+         (eq? (caddr property) sym)))
+  (define (delete-prop context)
+    (let* ((where (ly:context-property-where-defined context 'graceSettings))
+          (current (ly:context-property where 'graceSettings))
+           (prop-settings (filter 
+                            (lambda(x) (sym-grob-context? x sym grob context-name))
+                            current)) 
+          (new-settings current))
+      (for-each (lambda(x) 
+                 (set! new-settings (delete x new-settings)))
+               prop-settings)
+      (ly:context-set-property! where 'graceSettings new-settings)))
+  (ly:export (context-spec-music (make-apply-context delete-prop) 'Voice)))
+
 
 
 (defmacro-public def-grace-function (start stop)
index d4c84caf612f0cf1fff05b8fc766034c2411a78e..79a924812ab224c6804b1ae938a18607e05c41db 100644 (file)
      (if (note-string note)
         (set-fret note (note-string note))
         (let*
-            ((string (find (lambda (string) (string-qualifies string
-                                                              (note-pitch note)))
-                             (reverse free-strings))))
-          (if string
-              (set-fret note string)
-              (ly:warning "No string for pitch ~a (given frets ~a)" (note-pitch note)
+            ((fit-string (find (lambda (string) 
+                               (string-qualifies string (note-pitch note)))
+                           free-strings)))
+          (if fit-string
+              (set-fret note fit-string)
+              (ly:warning "No string for pitch ~a (given frets ~a)" 
+                           (note-pitch note)
                           specified-frets))
                           
               )))