]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/music-functions-init.ly
Remove from header too.
[lilypond.git] / ly / music-functions-init.ly
index 718615a7e1ffd7bfdc779d50ec7f75eb789a4da5..71a834ba2d718fc1e704cec22fda84fc1aa1f881 100644 (file)
@@ -1,3 +1,21 @@
+%%%% This file is part of LilyPond, the GNU music typesetter.
+%%%%
+%%%% Copyright (C) 2003--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+%%%%                          Jan Nieuwenhuizen <janneke@gnu.org>
+%%%%
+%%%% LilyPond is free software: you can redistribute it and/or modify
+%%%% it under the terms of the GNU General Public License as published by
+%%%% the Free Software Foundation, either version 3 of the License, or
+%%%% (at your option) any later version.
+%%%%
+%%%% LilyPond is distributed in the hope that it will be useful,
+%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%%%% GNU General Public License for more details.
+%%%%
+%%%% You should have received a copy of the GNU General Public License
+%%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+
 % -*-Scheme-*-
 
 \version "2.12.0"
@@ -130,7 +148,7 @@ balloonGrobText =
 #(define-music-function (parser location grob-name offset text)
                        (symbol? number-pair? markup?)
   (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
-(use like @code{\\once})")
+use like @code{\\once})")
     (make-music 'AnnotateOutputEvent
                'symbol grob-name
                'X-offset (car offset)
@@ -169,7 +187,20 @@ bendAfter =
 #(define-music-function (parser location delta) (real?)
   (_i "Create a fall or doit of pitch interval @var{delta}.")
   (make-music 'BendAfterEvent
-   'delta-step delta))
+              'delta-step delta))
+
+bookOutputName =
+#(define-music-function (parser location newfilename) (string?)
+  (_i "Direct output for the current book block to @var{newfilename}.")
+  (set! book-filename newfilename)
+  (make-music 'SequentialMusic 'void #t))
+
+bookOutputSuffix =
+#(define-music-function (parser location newsuffix) (string?)
+  (_i "Set the output filename suffix for the current book block to
+@var{newsuffix}.")
+  (set! book-output-suffix newsuffix)
+  (make-music 'SequentialMusic 'void #t))
 
 %% why a function?
 breathe =
@@ -348,7 +379,8 @@ makeClusters =
 
 musicMap =
 #(define-music-function (parser location proc mus) (procedure? ly:music?)
-            (music-map proc mus))
+    (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
+    (music-map proc mus))
 
 
 
@@ -449,7 +481,7 @@ or @code{\"GrobName\"}")
 %% because music identifiers are not allowed at top-level.
 pageBreak =
 #(define-music-function (location parser) ()
-   (_i "Force a page break. May be used at toplevel (ie between scores or
+   (_i "Force a page break. May be used at toplevel (i.e. between scores or
 markups), or inside a score.")
    (make-music 'EventChord
               'page-marker #t
@@ -584,52 +616,54 @@ parenthesize =
 
 partcombine =
 #(define-music-function (parser location part1 part2) (ly:music? ly:music?)
-               (make-part-combine-music parser
-                                        (list part1 part2)))
+   (_i "Take the music in @var{part1} and @var{part2} and typeset so that they share a staff.")
+   (make-part-combine-music parser
+                            (list part1 part2)))
 
 pitchedTrill =
 #(define-music-function
    (parser location main-note secondary-note)
    (ly:music? ly:music?)
-   (let*
-       ((get-notes (lambda (ev-chord)
-                    (filter
-                     (lambda (m) (eq? 'NoteEvent (ly:music-property m 'name)))
-                     (ly:music-property ev-chord 'elements))))
-       (sec-note-events (get-notes secondary-note))
-       (trill-events (filter (lambda (m) (music-has-type m 'trill-span-event))
-                             (ly:music-property main-note 'elements))))
+   (_i "Print a trill with @var{main-note} as the main note of the trill and
+print @var{secondary-note} as a stemless note head in parentheses.")
+   (let* ((get-notes (lambda (ev-chord)
+                       (filter
+                        (lambda (m) (eq? 'NoteEvent (ly:music-property m 'name)))
+                        (ly:music-property ev-chord 'elements))))
+          (sec-note-events (get-notes secondary-note))
+          (trill-events (filter (lambda (m) (music-has-type m 'trill-span-event))
+                                (ly:music-property main-note 'elements))))
 
      (if (pair? sec-note-events)
-        (begin
-          (let*
-              ((trill-pitch (ly:music-property (car sec-note-events) 'pitch))
-               (forced (ly:music-property (car sec-note-events ) 'force-accidental)))
-
-            (if (ly:pitch? trill-pitch)
-                (for-each (lambda (m) (ly:music-set-property! m 'pitch trill-pitch))
-                          trill-events)
-                (begin
-                  (ly:warning (_ "Second argument of \\pitchedTrill should be single note: "))
-                  (display sec-note-events)))
-
-            (if (eq? forced #t)
-                (for-each (lambda (m) (ly:music-set-property! m 'force-accidental forced))
-                          trill-events)))))
+         (begin
+           (let* ((trill-pitch (ly:music-property (car sec-note-events) 'pitch))
+                  (forced (ly:music-property (car sec-note-events) 'force-accidental)))
+
+             (if (ly:pitch? trill-pitch)
+                 (for-each (lambda (m)
+                             (ly:music-set-property! m 'pitch trill-pitch)) trill-events)
+                 (begin
+                   (ly:warning (_ "Second argument of \\pitchedTrill should be single note: "))
+                   (display sec-note-events)))
+
+             (if (eq? forced #t)
+                 (for-each (lambda (m)
+                             (ly:music-set-property! m 'force-accidental forced))
+                           trill-events)))))
      main-note))
 
-
-
 quoteDuring =
 #(define-music-function
-  (parser location what main-music)
-  (string? ly:music?)
-  (make-music 'QuoteMusic
-             'element main-music
-             'quoted-music-name what
-             'origin location))
-
-
+   (parser location what main-music)
+   (string? ly:music?)
+   (_i "Indicate a section of music to be quoted.  @var{what} indicates the name
+of the quoted voice, as specified in an @code{\\addQuote} command.
+@var{main-music} is used to indicate the length of music to be quoted;
+usually contains spacers or multi-measure rests.")
+   (make-music 'QuoteMusic
+               'element main-music
+               'quoted-music-name what
+               'origin location))
 
 removeWithTag =
 #(define-music-function
@@ -741,7 +775,11 @@ styledNoteHeads =
    (_i "Set @var{heads} in @var{music} to @var{style}.")
    (style-note-heads heads style music))
 
-
+tabChordRepetition =
+#(define-music-function (parser location) ()
+   (_i "Include the string information in a chord repetition.")
+   (ly:parser-set-repetition-function parser tab-repeat-chord)
+   (make-music 'SequentialMusic 'void #t))
 
 tag =
 #(define-music-function (parser location tag arg)
@@ -803,7 +841,10 @@ tweak =
 
 unfoldRepeats =
 #(define-music-function (parser location music) (ly:music?)
-                 (unfold-repeats music))
+   (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or
+@code{\\repeat percent} commands in @var{music} to be interpreted
+as @code{\\repeat unfold}.")
+   (unfold-repeats music))