[frogs] my contribution: barCheckNumber to endSpanners |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
Please find my contribution from barCheckNumber to endSpanners.
Some remarks:
- I cannot check if my modifications do not break anything because it seems that (_i ...) is not recognized (and is removed from the distribution?).
for example I obtain the following message:
Processing `barNumberCheck_exemple.ly'
Parsing...d:/Softs/LilyPond/usr/share/lilypond/current/ly/music-functions-init.ly:129:3: In procedure string? in _expression_ (string?):
d:/Softs/LilyPond/usr/share/lilypond/current/ly/music-functions-init.ly:129:3: Wrong number of arguments to #<primitive-procedure string?>
I imagine I would need a kind of a compilation to remove the (_i ...)
- there are plenty of tabulations in music-functions-init.ly and indentation is some times 2 spaces, some times 3...
- I have mainly copied documentation from the Notation Manual. Would be better to enter the documentation only once because if the function changes, we have to change the doc. at two locations.
- I do not know if the doc string should go after of before (ly:music?); is this code part of the function signature?
with my best wishes,
Frédéric Bron
diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
index a112b67..1ccf650 100644
--- a/ly/music-functions-init.ly
+++ b/ly/music-functions-init.ly
@@ -126,6 +126,8 @@ bar =
barNumberCheck =
#(define-music-function (parser location n) (integer?)
+ (string?)
+ (_i "Print a warning if the current bar number is not @var{n}.")
(make-music 'ApplyContext
'origin location
'procedure
@@ -139,13 +141,19 @@ barNumberCheck =
bendAfter =
#(define-music-function (parser location delta) (real?)
-
+ (string?)
+ (_i "Falls and doits can be added to notes using the this command.
+ The direction of the fall or doit is indicated with a plus or minus (up or down).
+ The number @var{delta} indicates the pitch interval that the fall or doit will extend beyond the main note.")
(make-music 'BendAfterEvent
'delta-step delta))
%% why a function?
breathe =
#(define-music-function (parser location) ()
+ (string?)
+ (_i "Insert a breath mark.
+ The glyph of the breath mark can be tuned by overriding the text property of the @code{BreathingSign} layout object with any markup text.")
(make-music 'EventChord
'origin location
'elements (list (make-music 'BreathingEvent))))
@@ -153,15 +161,19 @@ breathe =
clef =
#(define-music-function (parser location type)
- (string?)
- (_i "Set the current clef.")
-
+ (string?)
+ (_i "Set the current clef. Main values for @var{type} are @code{treble}, @code{alto}, @code{tenor} and @code{bass}.")
(make-clef-set type))
cueDuring =
#(define-music-function
(parser location what dir main-music)
+ (string?)
+ (_i "This command copies the corresponding measures from @var{what} into a @code{CueVoice} context.
+ The @code{CueVoice} is created implicitly, and occurs simultaneously with music, which creates a polyphonic situation.
+ The @var{dir} argument determines whether the cue notes should be notated as a first or second voice;
+ @code{UP} corresponds to the first voice, and @code{DOWN} corresponds to the second.")
(string? ly:dir? ly:music?)
(make-music 'QuoteMusic
'element main-music
@@ -173,12 +185,20 @@ cueDuring =
displayLilyMusic =
#(define-music-function (parser location music) (ly:music?)
+ (string?)
+ (_i "Display a music expression in LilyPond notation.
+ By default, LilyPond prints these messages to the console along with all the other messages.
+ To split up these messages and save the results, the output should be redirected to a file.")
(newline)
(display-lily-music music parser)
music)
displayMusic =
#(define-music-function (parser location music) (ly:music?)
+ (string?)
+ (_i "Display the internal representation of a music expression (useful when writing a music function.
+ By default, LilyPond prints these messages to the console along with all the other messages.
+ To split up these messages and save the results, the output should be redirected to a file.")
(newline)
(display-scheme-music music)
music)
@@ -186,6 +206,12 @@ displayMusic =
endSpanners =
#(define-music-function (parser location music) (ly:music?)
+ (string?)
+ (_i "Terminate the spanner which starts on the immediately following note prematurely.
+ It is terminated after exactly one note,
+ or at the following bar line if @code{to-barline} is @code{true} and a bar line occurs before the next note.
+ When using @code{\\endSpanners} it is not necessary to close @code{\\startTextSpan} with @code{\\stopTextSpan},
+ nor is it necessary to close hairpins with @code{\\!}.")
(if (eq? (ly:music-property music 'name) 'EventChord)
(let*
((elts (ly:music-property music 'elements))