Issues that only affect specific operating systems.
+@subheading Patch (optional)
+
+@itemize
+
+@item
+Patch-new: the patch has not been checked for @qq{obvious}
+mistakes. When in doubt, use this tag.
+
+@item
+Patch-review: the patch has no @qq{obvious} mistakes (as checked
+by the Patch Meister), and is ready for review from main
+developers.
+
+Developers with git push ability can use this category, skipping
+over @code{patch-new}.
+
+@item
+Patch-needs_work: a developer has some concerns about the patch.
+This does not necessarily mean that the patch must be changed; in
+some cases, the developer's concerns can be resolved simply by
+discussion the situation or providing notation examples.
+
+If the patch is updated, the category should be changed to
+@code{patch-new} (for normal contributors) or @code{patch-new}
+(for developers who are very confident about their patch).
+
+@item
+Patch-abandoned: the author has not responded to review comments
+for a few months.
+
+@end itemize
@subheading Other items (optional)
In particular, anything that breaks a regression test is a
regression.
-@item
-Patch: a patch to fix an issue is attached.
-
@item
Frog: the fix is believed to be suitable for a new contributor
(does not require a great deal of knowledge about LilyPond). The
email should contain a link to the issue you just added.
-
@node Summary of project status
@section Summary of project status
-The best overview of our current status is given by the grid view:
+@subsubheading Project overview
+
+Grid view provides the best overview:
@example
@uref{http://code.google.com/p/lilypond/issues/list?mode=grid&y=Priority&x=Type&cells=ids}
@end example
-Also of interest might be the issues hindering future development:
+@subsubheading Hindering development
+
+These issues stop or slow development work:
@example
@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:Maintainability&mode=grid&y=Priority&x=Type&cells=ids}
@end example
-Finally, issues tagged with @code{Frog} indicates a task suitable
-for a relatively new contributor. The time given is a quick
+@subsubheading Easy tasks
+
+Issues tagged with @code{Frog} indicates a task suitable for a
+relatively new contributor. The time given is a quick
(inaccurate) estimate of the time required for somebody who is
familiar with material in this manual, but does not know anything
else about LilyPond development.
@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:Frog&mode=grid&y=Priority&x=Type&cells=ids}
@end example
+@subsubheading Patches to review
+
+Patches which have no @qq{obvious} problems:
+
+@example
+@uref{http://code.google.com/p/lilypond/issues/list?can=2&q=label:patch-review}
+@end example
+
+
* Manual syllable durations::
* Multiple syllables to one note::
* Multiple notes to one syllable::
-* Skipping notes::
* Extenders and hyphens::
@end menu
It is possible to have ties, slurs and manual beams in the melody
without their indicating melismata. To do this, set
-@code{melismaBusyProperties} and indicate the melismata with single
-underscores in the lyrics, one underscore for each extra note:
+@code{melismaBusyProperties}:
@lilypond[relative=1,verbatim,quote]
<<
\time 3/4
\set melismaBusyProperties = #'()
c4 d ( e )
- g8 [ f ] f4( e)
- d e ~ e
+ g8 [ f ] f4 ~ f
}
\new Lyrics \lyricsto "melody" {
- Ky -- _ _ _ _ ri -- _ _ e __ _
+ Ky -- ri -- e e -- le -- i -- son
}
>>
@end lilypond
Other settings for @code{melismaBusyProperties} can be used to
-include or exclude ties, slurs, and beams from the automatic
-detection of melismata; see @code{melismaBusyProperties} in
-@rinternals{Tunable context properties}.
+selectively include or exclude ties, slurs, and beams from the
+automatic detection of melismata; see @code{melismaBusyProperties}
+in @rinternals{Tunable context properties}.
+
+Alternatively, if all melismata indications are to be ignored,
+@code{ignoreMelismata} may be set true;
+see @ref{Stanzas with different rhythms}.
+
+If a melisma is required during a passage in which
+@code{melismaBusyProperties} is active, it may be indicated by
+placing a single underscore in the lyrics for each note which
+should be included in the melisma:
+
+@lilypond[relative=1,verbatim,quote]
+<<
+ \new Voice = "melody" {
+ \time 3/4
+ \set melismaBusyProperties = #'()
+ c4 d ( e )
+ g8 [ f ] ~ f4 ~ f
+ }
+ \new Lyrics \lyricsto "melody" {
+ Ky -- ri -- _ e __ _ _ _
+ }
+>>
+@end lilypond
+
@predefined
Notation Reference:
@ref{Aligning lyrics to a melody},
@ref{Automatic syllable durations},
-@ref{Setting automatic beam behavior}.
+@ref{Setting automatic beam behavior},
+@ref{Stanzas with different rhythms}.
Internals Reference:
@rinternals{Tunable context properties}.
Extender lines under melismata are not created automatically; they
must be inserted manually with a double underscore.
-@node Skipping notes
-@unnumberedsubsubsec Skipping notes
-
-Making a lyric line run slower than the melody can be achieved by
-inserting @code{\skip}s into the lyrics. For every @code{\skip},
-the text will be delayed by another note. The @code{\skip} command
-must be followed by a valid duration, but this is ignored when
-@code{\skip} is used in lyrics which derive their durations from the
-notes in an associated melody through @code{\addlyrics} or
-@code{\lyricsto}.
-
-@lilypond[verbatim,ragged-right,quote]
-\relative c' { c c g' }
-\addlyrics {
- twin -- \skip 4
- kle
-}
-@end lilypond
-
@node Extenders and hyphens
@unnumberedsubsubsec Extenders and hyphens
}
@end lilypond
-@cindex lyric skip
-@funindex \skip
-
When the words to a repeated volta section are different, the words
-to each repeat must be entered in separate @code{Lyrics} contexts.
-Earlier unrepeated sections must be skipped in the second and
-subsequent repeats. The easiest way to skip several notes is to
-use @code{\repeat unfold} around the @code{\skip} command.
-
-Note: do not use an underscore, @code{_}, to skip notes in this
-particular case. As this syntax indicates a melisma, it will cause
-the preceding syllable to be left-aligned.
-
-@warning{The @code{@bs{}skip} command must be followed by a number,
-but this number is ignored in lyrics which derive their durations
-from the notes in an associated melody through @code{\addlyrics} or
-@code{\lyricsto}. Each @code{@bs{}skip} skips a single note of any
-value, irrespective of the value of the following number.}
+to each repeat must be entered in separate @code{Lyrics} contexts,
+correctly nested in parallel sections:
@lilypond[verbatim,quote]
\score {
}
}
}
- \new Lyrics {
- \lyricsto "melody" {
- Not re -- peat -- ed.
- The first time words.
- }
- }
- \new Lyrics {
- \lyricsto "melody" {
- % skip 4 notes of any duration
- \repeat unfold 4 { \skip 1 }
- Sec -- ond time words.
- }
+ \new Lyrics \lyricsto "melody" {
+ Not re -- peat -- ed.
+ <<
+ { The first time words. }
+ \new Lyrics {
+ \set associatedVoice = "melody"
+ Sec -- ond time words.
+ }
+ >>
}
>>
}
@end lilypond
-@cindex lyrics, repeating with a temporary voice
+More verses may be added in a similar way:
-An alternative way, which avoids skips and having to count notes,
-is to use a temporary voice for the repeated section. This may be
-preferable if the earlier sections are still subject to change. A
-temporary voice can be inserted anywhere in the main music stream
-in parallel with it, as shown below, but it may be necessary to
-keep the main voice alive in complex scores when using this
-technique; see @ref{Keeping contexts alive}.
-
-@lilypond[verbatim,quote,ragged-right]
+@lilypond[verbatim,quote]
\score {
<<
\new Staff {
\new Voice = "singleVoice" {
- \relative c'' { a4 a a a }
- \new Voice = "repeatVoice" {
- \relative c'' \repeat volta 3 { b4 b b b }
- }
- \relative c'' { c4 c c c }
- }
- }
- \new Lyrics <<
- \lyricsto "singleVoice" {
- Not re -- peat -- ed.
- The end sec -- tion.
- }
- \lyricsto "repeatVoice" {
- The first time words.
- }
- >>
- \new Lyrics {
- \lyricsto "repeatVoice" {
- Sec -- ond time words.
+ \relative c'' {
+ a4 a a a
+ \repeat volta 3 { b4 b b b }
+ c4 c c c
+ }
}
}
- \new Lyrics {
- \lyricsto "repeatVoice" {
- The third time words.
- }
+ \new Lyrics \lyricsto "singleVoice" {
+ Not re -- peat -- ed.
+ <<
+ { The first time words. }
+ \new Lyrics {
+ \set associatedVoice = "singleVoice"
+ Sec -- ond time words.
+ }
+ \new Lyrics {
+ \set associatedVoice = "singleVoice"
+ The third time words.
+ }
+ >>
+ The end sec -- tion.
}
>>
}
@end lilypond
-@c TODO lowering a common line of lyrics
+
+@c TODO positioning a common line of lyrics
@subheading Repeats with alternative endings
}
@end lilypond
+@funindex \skip
+@cindex skipping notes in lyrics
+@cindex lyrics, skipping notes
+
But when the repeated section has different words, a repeat
construct cannot be used around the words and @code{\skip} commands
-have to be inserted manually as described in the previous section to
-skip over the notes in the alternative sections which do not apply.
+have to be inserted manually to skip over the notes in the
+alternative sections which do not apply.
+
+Note: do not use an underscore, @code{_}, to skip notes -- an
+underscore indicates a melisma, causing the preceding syllable
+to be left-aligned.
+
+@warning{The @code{@bs{}skip} command must be followed by a number,
+but this number is ignored in lyrics which derive their durations
+from the notes in an associated melody through @code{\addlyrics} or
+@code{\lyricsto}. Each @code{@bs{}skip} skips a single note of any
+value, irrespective of the value of the following number.}
@lilypond[verbatim,quote,ragged-right]
\score {
% generated from Documentation/snippets/new
% This file is in the public domain.
%% Note: this file works from version 2.13.47
-\version "2.13.47"\r
-\r
-\header {\r
- lsrtags = "vocal-music"\r
- texidoc = "\r
-The vertical spacing engine changed for version 2.14. This can\r
-cause lyrics to be spaced differently. It is possible to set\r
-properties for @code{Lyric} and @code{Staff} contexts to get the\r
-spacing engine to behave as it did in version 2.12.\r
-"\r
-}\r
-\r
-global = {\r
- \key d \major\r
- \time 3/4\r
-}\r
-\r
-sopMusic = \relative c' {\r
- % VERSE ONE\r
- fis4 fis fis | \break\r
- fis4. e8 e4\r
-}\r
-\r
-altoMusic = \relative c' {\r
- % VERSE ONE\r
- d4 d d |\r
- d4. b8 b4 |\r
-}\r
-\r
-tenorMusic = \relative c' {\r
- a4 a a |\r
- b4. g8 g4 |\r
-}\r
-\r
-bassMusic = \relative c {\r
- d4 d d |\r
- g,4. g8 g4 |\r
-}\r
-\r
-words = \lyricmode {\r
- Great is Thy faith- ful- ness,\r
-}\r
-\r
-\score {\r
- \new ChoirStaff <<\r
- \new Lyrics = sopranos\r
- \new Staff = women <<\r
- \new Voice = "sopranos" {\r
- \voiceOne\r
- \global \sopMusic\r
- }\r
- \new Voice = "altos" {\r
- \voiceTwo\r
- \global \altoMusic\r
- }\r
- >>\r
- \new Lyrics = "altos"\r
- \new Lyrics = "tenors"\r
- \new Staff = men <<\r
- \clef bass\r
- \new Voice = "tenors" {\r
- \voiceOne\r
- \global \tenorMusic\r
- }\r
- \new Voice = "basses" {\r
- \voiceTwo \global \bassMusic\r
- }\r
- >>\r
- \new Lyrics = basses\r
- \context Lyrics = sopranos \lyricsto sopranos \words\r
- \context Lyrics = altos \lyricsto altos \words\r
- \context Lyrics = tenors \lyricsto tenors \words\r
- \context Lyrics = basses \lyricsto basses \words\r
- >>\r
- \layout {\r
- \context {\r
- \Lyrics\r
- \override VerticalAxisGroup #'staff-affinity = ##f\r
- \override VerticalAxisGroup #'staff-staff-spacing =\r
- #'((basic-distance . 0)\r
- (minimum-distance . 2)\r
- (padding . 2))\r
- }\r
- \context {\r
- \Staff\r
- \override VerticalAxisGroup #'staff-staff-spacing =\r
- #'((basic-distance . 0)\r
- (minimum-distance . 2)\r
- (padding . 2))\r
- }\r
- }\r
-}\r
-\r
+\version "2.13.47"
+
+\header {
+ lsrtags = "vocal-music"
+
+ doctitle = "Obtaining 2.12 lyrics spacing in newer versions"
+
+ texidoc = "
+The vertical spacing engine changed for version 2.14. This can
+cause lyrics to be spaced differently. It is possible to set
+properties for @code{Lyric} and @code{Staff} contexts to get the
+spacing engine to behave as it did in version 2.12.
+"
+} % begin verbatim
+
+
+global = {
+ \key d \major
+ \time 3/4
+}
+
+sopMusic = \relative c' {
+ % VERSE ONE
+ fis4 fis fis | \break
+ fis4. e8 e4
+}
+
+altoMusic = \relative c' {
+ % VERSE ONE
+ d4 d d |
+ d4. b8 b4 |
+}
+
+tenorMusic = \relative c' {
+ a4 a a |
+ b4. g8 g4 |
+}
+
+bassMusic = \relative c {
+ d4 d d |
+ g,4. g8 g4 |
+}
+
+words = \lyricmode {
+ Great is Thy faith- ful- ness,
+}
+
+\score {
+ \new ChoirStaff <<
+ \new Lyrics = sopranos
+ \new Staff = women <<
+ \new Voice = "sopranos" {
+ \voiceOne
+ \global \sopMusic
+ }
+ \new Voice = "altos" {
+ \voiceTwo
+ \global \altoMusic
+ }
+ >>
+ \new Lyrics = "altos"
+ \new Lyrics = "tenors"
+ \new Staff = men <<
+ \clef bass
+ \new Voice = "tenors" {
+ \voiceOne
+ \global \tenorMusic
+ }
+ \new Voice = "basses" {
+ \voiceTwo \global \bassMusic
+ }
+ >>
+ \new Lyrics = basses
+ \context Lyrics = sopranos \lyricsto sopranos \words
+ \context Lyrics = altos \lyricsto altos \words
+ \context Lyrics = tenors \lyricsto tenors \words
+ \context Lyrics = basses \lyricsto basses \words
+ >>
+ \layout {
+ \context {
+ \Lyrics
+ \override VerticalAxisGroup #'staff-affinity = ##f
+ \override VerticalAxisGroup #'staff-staff-spacing =
+ #'((basic-distance . 0)
+ (minimum-distance . 2)
+ (padding . 2))
+ }
+ \context {
+ \Staff
+ \override VerticalAxisGroup #'staff-staff-spacing =
+ #'((basic-distance . 0)
+ (minimum-distance . 2)
+ (padding . 2))
+ }
+ }
+}
+
-\version "2.13.47"\r
-\r
-\header {\r
- lsrtags = "vocal-music"\r
- texidoc = "\r
-The vertical spacing engine changed for version 2.14. This can\r
-cause lyrics to be spaced differently. It is possible to set\r
-properties for @code{Lyric} and @code{Staff} contexts to get the\r
-spacing engine to behave as it did in version 2.12.\r
-"\r
-}\r
-\r
-global = {\r
- \key d \major\r
- \time 3/4\r
-}\r
-\r
-sopMusic = \relative c' {\r
- % VERSE ONE\r
- fis4 fis fis | \break\r
- fis4. e8 e4\r
-}\r
-\r
-altoMusic = \relative c' {\r
- % VERSE ONE\r
- d4 d d |\r
- d4. b8 b4 |\r
-}\r
-\r
-tenorMusic = \relative c' {\r
- a4 a a |\r
- b4. g8 g4 |\r
-}\r
-\r
-bassMusic = \relative c {\r
- d4 d d |\r
- g,4. g8 g4 |\r
-}\r
-\r
-words = \lyricmode {\r
- Great is Thy faith- ful- ness,\r
-}\r
-\r
-\score {\r
- \new ChoirStaff <<\r
- \new Lyrics = sopranos\r
- \new Staff = women <<\r
- \new Voice = "sopranos" {\r
- \voiceOne\r
- \global \sopMusic\r
- }\r
- \new Voice = "altos" {\r
- \voiceTwo\r
- \global \altoMusic\r
- }\r
- >>\r
- \new Lyrics = "altos"\r
- \new Lyrics = "tenors"\r
- \new Staff = men <<\r
- \clef bass\r
- \new Voice = "tenors" {\r
- \voiceOne\r
- \global \tenorMusic\r
- }\r
- \new Voice = "basses" {\r
- \voiceTwo \global \bassMusic\r
- }\r
- >>\r
- \new Lyrics = basses\r
- \context Lyrics = sopranos \lyricsto sopranos \words\r
- \context Lyrics = altos \lyricsto altos \words\r
- \context Lyrics = tenors \lyricsto tenors \words\r
- \context Lyrics = basses \lyricsto basses \words\r
- >>\r
- \layout {\r
- \context {\r
- \Lyrics\r
- \override VerticalAxisGroup #'staff-affinity = ##f\r
- \override VerticalAxisGroup #'staff-staff-spacing =\r
- #'((basic-distance . 0)\r
- (minimum-distance . 2)\r
- (padding . 2))\r
- }\r
- \context {\r
- \Staff\r
- \override VerticalAxisGroup #'staff-staff-spacing =\r
- #'((basic-distance . 0)\r
- (minimum-distance . 2)\r
- (padding . 2))\r
- }\r
- }\r
-}\r
-\r
+\version "2.13.47"
+
+\header {
+ lsrtags = "vocal-music"
+
+ doctitle = "Obtaining 2.12 lyrics spacing in newer versions"
+
+ texidoc = "
+The vertical spacing engine changed for version 2.14. This can
+cause lyrics to be spaced differently. It is possible to set
+properties for @code{Lyric} and @code{Staff} contexts to get the
+spacing engine to behave as it did in version 2.12.
+"
+}
+
+global = {
+ \key d \major
+ \time 3/4
+}
+
+sopMusic = \relative c' {
+ % VERSE ONE
+ fis4 fis fis | \break
+ fis4. e8 e4
+}
+
+altoMusic = \relative c' {
+ % VERSE ONE
+ d4 d d |
+ d4. b8 b4 |
+}
+
+tenorMusic = \relative c' {
+ a4 a a |
+ b4. g8 g4 |
+}
+
+bassMusic = \relative c {
+ d4 d d |
+ g,4. g8 g4 |
+}
+
+words = \lyricmode {
+ Great is Thy faith- ful- ness,
+}
+
+\score {
+ \new ChoirStaff <<
+ \new Lyrics = sopranos
+ \new Staff = women <<
+ \new Voice = "sopranos" {
+ \voiceOne
+ \global \sopMusic
+ }
+ \new Voice = "altos" {
+ \voiceTwo
+ \global \altoMusic
+ }
+ >>
+ \new Lyrics = "altos"
+ \new Lyrics = "tenors"
+ \new Staff = men <<
+ \clef bass
+ \new Voice = "tenors" {
+ \voiceOne
+ \global \tenorMusic
+ }
+ \new Voice = "basses" {
+ \voiceTwo \global \bassMusic
+ }
+ >>
+ \new Lyrics = basses
+ \context Lyrics = sopranos \lyricsto sopranos \words
+ \context Lyrics = altos \lyricsto altos \words
+ \context Lyrics = tenors \lyricsto tenors \words
+ \context Lyrics = basses \lyricsto basses \words
+ >>
+ \layout {
+ \context {
+ \Lyrics
+ \override VerticalAxisGroup #'staff-affinity = ##f
+ \override VerticalAxisGroup #'staff-staff-spacing =
+ #'((basic-distance . 0)
+ (minimum-distance . 2)
+ (padding . 2))
+ }
+ \context {
+ \Staff
+ \override VerticalAxisGroup #'staff-staff-spacing =
+ #'((basic-distance . 0)
+ (minimum-distance . 2)
+ (padding . 2))
+ }
+ }
+}
+
#include <typeinfo>
using namespace std;
-#define classname(class_ptr) demangle_classname (typeid (* (class_ptr)))
-
-char const *
-demangle_classname (type_info const &);
/*
+++ /dev/null
-#include <cctype>
-using namespace std;
-
-#include "virtual-methods.hh"
-
-char const *
-demangle_classname (type_info const &t)
-{
- char const *s = t.name ();
- while (isdigit (*s))
- s++;
- return s;
-}
@unnumbered Introduction
This document presents proofs for
-LilyPond @lilypondversion). When the
+LilyPond @lilypondversion. When the
text corresponds with the shown notation, we consider LilyPond Officially
BugFree (tm). This document is intended for finding bugs and for
documenting bugfixes.
-In the web version of this document, you can click on the file name
+In the web version of this document, you can click on the file name
or figure for each example to see the corresponding input file.
TODO: order of tests (file names!), test only one feature per test.
--- /dev/null
+\version "2.13.47"
+
+\header {
+ texidoc = "Text that can spread over pages is entered with the
+@code{\\markuplines} command. It can be assigned to a variable and inserted
+at top-level with or without preceding it by @code{\\markuplines}."
+}
+
+#(set-default-paper-size "a6")
+
+mytext = \markuplines {
+ \justified-lines {
+ Lorem ipsum dolor sit amet, consectetur adipisici elit, sed
+ eiusmod tempor incidunt ut labore et dolore magna aliqua. ...
+ }
+}
+
+\markuplines \mytext
+\mytext
#define MLP_BREVIS 0x04 // mensural brevis head
#define MLP_LONGA 0x08 // mensural brevis head with right cauda
#define MLP_MAXIMA 0x10 // mensural maxima head without stem
-#define MLP_FLEXA 0x20 // mensural flexa-like shape
+#define MLP_FLEXA_BEGIN 0x20 // start of obliqua
+#define MLP_FLEXA_END 0x40 // end of obliqua
#define MLP_STEM (MLP_UP | MLP_DOWN)
#define MLP_SINGLE_HEAD (MLP_BREVIS | MLP_LONGA | MLP_MAXIMA)
+#define MLP_FLEXA (MLP_FLEXA_BEGIN | MLP_FLEXA_END)
#define MLP_ANY (MLP_FLEXA | MLP_SINGLE_HEAD)
struct Mensural_ligature
#include "international.hh"
-#include "ligature-engraver.hh"
+#include "engraver.hh"
#include "note-column.hh"
#include "tuplet-bracket.hh"
#include "spanner.hh"
#include "stream-event.hh"
-#include "spanner.hh"
#include "item.hh"
#include "translator.icc"
}
int pitch = unsmob_pitch (nr->get_property ("pitch"))->steps ();
- int delta_pitch = 0;
+ int prim = 0;
if (at_beginning)
{
}
else
{
- delta_pitch = pitch - prev_pitch;
- if (delta_pitch == 0)
+ if (pitch == prev_pitch)
{
nr->origin ()->warning
(_ ("prime interval within ligature -> skipping"));
at_beginning = true;
- primitive->set_property ("primitive",
- scm_from_int (MLP_NONE));
+ prim = MLP_NONE;
continue;
}
}
{
nr->origin ()->warning
(_ ("mensural ligature: duration none of Mx, L, B, S -> skipping"));
- primitive->set_property ("primitive",
- scm_from_int (MLP_NONE));
+ prim = MLP_NONE;
at_beginning = true;
continue;
}
- // apply_transition replacement begins
bool general_case = true;
+ bool make_flexa = false;
+ bool allow_flexa = true;
// first check special cases
// 1. beginning
// a. semibreves
if (duration_log == 0)
{
- primitive->set_property ("primitive",
- scm_from_int (MLP_UP | MLP_BREVIS));
- prev_semibrevis = prev_brevis_shape = true;
+ prim = MLP_UP | MLP_BREVIS;
general_case = false;
}
// b. descendens longa or brevis
&& duration_log > -3)
{
int left_stem = duration_log == -1 ? MLP_DOWN : 0;
-
- primitive->set_property ("primitive",
- scm_from_int (left_stem | MLP_BREVIS));
- prev_brevis_shape = true;
- prev_semibrevis = general_case = false;
+ prim = left_stem | MLP_BREVIS;
+ general_case = false;
}
}
// 2. initial semibrevis must be followed by another one
prev_semibrevis = false;
if (duration_log == 0)
{
- primitive->set_property ("primitive", scm_from_int (MLP_BREVIS));
+ prim = MLP_BREVIS;
general_case = false;
}
else
{
nr->origin ()->warning
(_ ("semibrevis must be followed by another one -> skipping"));
- primitive->set_property ("primitive",
- scm_from_int (MLP_NONE));
+ prim = MLP_NONE;
at_beginning = true;
continue;
}
nr->origin ()->warning
(_ ("semibreves can only appear at the beginning of a ligature,\n"
"and there may be only zero or two of them"));
- primitive->set_property ("primitive",
- scm_from_int (MLP_NONE));
+ prim = MLP_NONE;
at_beginning = true;
continue;
}
// 4. end, descendens
- else if (i == s - 1 && delta_pitch < 0)
+ else if (i == s - 1 && pitch < prev_pitch)
{
// brevis; previous note must be turned into flexa
if (duration_log == -1)
{
if (prev_brevis_shape)
{
- prev_primitive->set_property
- ("primitive",
- scm_from_int
- (MLP_FLEXA
- | (scm_to_int (prev_primitive->get_property ("primitive"))
- & MLP_DOWN)));
- primitive->set_property ("primitive", scm_from_int (MLP_NONE));
- break; // no more notes, no join
+ make_flexa = true;
+ general_case = false;
}
else
{
"when the last note is a descending brevis,\n"
"the penultimate note must be another one,\n"
"or the ligatura must be LB or SSB"));
- primitive->set_property ("primitive", scm_from_int (MLP_NONE));
+ prim = MLP_NONE;
break;
}
}
// longa
else if (duration_log == -2)
{
- primitive->set_property ("primitive", scm_from_int (MLP_BREVIS));
- general_case = false;
+ prim = MLP_BREVIS;
+ general_case = allow_flexa = false;
}
- // else maxima; fall through regular case below
+ // else maxima; fall through to regular case below
}
+ if (allow_flexa
+ && to_boolean (primitive->get_property ("ligature-flexa")))
+ {
+ /*
+ flexa requested, check whether allowed:
+ - there should be a previous note
+ - both of the notes must be of brevis shape
+ (i.e. can't be maxima or flexa;
+ longa is forbidden as well - it's nonexistent anyway)
+ - no compulsory flexa for the next note,
+ i.e. it's not an ultimate descending breve
+ */
+ make_flexa = !at_beginning && prev_brevis_shape && duration_log > -2;
+ if (make_flexa && i == s - 2)
+ {
+ /*
+ check last condition: look ahead to next note
+ */
+ Grob_info next_info = primitives[i + 1];
+ Item *next_primitive = dynamic_cast<Item *> (next_info.grob ());
+ if (Rhythmic_head::duration_log (next_primitive) == -1)
+ {
+ /*
+ breve: check whether descending
+ */
+ int const next_pitch = unsmob_pitch
+ (next_info.event_cause ()->get_property ("pitch"))->steps ();
+ if (next_pitch < pitch)
+ /*
+ sorry, forbidden
+ */
+ make_flexa = false;
+ }
+ }
+ }
+
if (general_case)
{
- static int const shape[3] = {MLP_MAXIMA, MLP_LONGA, MLP_BREVIS};
+ static int const shape[3] = {MLP_MAXIMA, MLP_LONGA, MLP_BREVIS};
- primitive->set_property ("primitive",
- scm_from_int (shape[duration_log + 3]));
- prev_brevis_shape = duration_log == -1;
+ prim = shape[duration_log + 3];
}
+ if (make_flexa)
+ {
+ /*
+ turn the note with the previous one into a flexa
+ */
+ prev_primitive->set_property
+ ("primitive",
+ scm_from_int
+ (MLP_FLEXA_BEGIN
+ | (scm_to_int (prev_primitive->get_property ("primitive"))
+ & MLP_STEM)));
+ prev_primitive->set_property
+ ("flexa-interval", scm_from_int (pitch - prev_pitch));
+ prim = MLP_FLEXA_END;
+ primitive->set_property
+ ("flexa-interval", scm_from_int (pitch - prev_pitch));
+ }
+
// join_primitives replacement
- if (!at_beginning)
- {
- /*
- if the previous note is longa-shaped and this note is lower,
- then the joining line may hide the stem, so it is made longer
- to serve as stem as well
- */
- if (delta_pitch < 0
- && (scm_to_int (prev_primitive->get_property ("primitive"))
- & MLP_LONGA))
- {
- delta_pitch -= 6;
- // instead of number 6
- // the legth of the longa stem should be queried something like
- // Font_interface::get_default_font (ligature)->find_by_name
- // ("noteheads.sM2mensural").extent (Y_AXIS).length ()
- }
- prev_primitive->set_property ("join-right-amount",
- scm_from_int (delta_pitch));
- // perhaps set add-join as well
- }
+ if (!(at_beginning || make_flexa))
+ prev_primitive->set_property ("add-join", ly_bool2scm (true));
+
at_beginning = false;
prev_primitive = primitive;
prev_pitch = pitch;
- // apply_transition replacement ends
+ primitive->set_property ("primitive", scm_from_int (prim));
+ prev_brevis_shape = (prim & MLP_BREVIS) != 0;
+ prev_semibrevis = (prim & MLP_UP) != 0;
}
}
Real head_width
= Font_interface::get_default_font (ligature)->
find_by_name ("noteheads.sM1mensural").extent (X_AXIS).length ();
- Real flexa_width
- = robust_scm2double (ligature->get_property ("flexa-width"), 2);
Real maxima_head_width
= Font_interface::get_default_font (ligature)->
- find_by_name ("noteheads.sM1neomensural").extent (X_AXIS).length ();
-
- flexa_width *= Staff_symbol_referencer::staff_space (ligature);
-
- Real half_flexa_width = 0.5 * (flexa_width + thickness);
+ find_by_name ("noteheads.sM3ligmensural").extent (X_AXIS).length ();
+ Item *prev_primitive = NULL;
for (vsize i = 0; i < primitives.size (); i++)
{
Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
primitive->set_property ("thickness",
scm_from_double (thickness));
- switch (output & MLP_ANY)
- {
- case MLP_NONE:
- primitive->set_property ("head-width",
- scm_from_double (half_flexa_width));
- break;
- case MLP_BREVIS:
- case MLP_LONGA:
- primitive->set_property ("head-width",
- scm_from_double (head_width));
- break;
- case MLP_MAXIMA:
- primitive->set_property ("head-width",
- scm_from_double (maxima_head_width));
- break;
- case MLP_FLEXA:
- primitive->set_property ("head-width",
- scm_from_double (half_flexa_width));
- primitive->set_property ("flexa-width",
- scm_from_double (flexa_width));
- break;
- default:
- programming_error (_ ("unexpected case fall-through"));
- break;
- }
+ switch (output & MLP_ANY) {
+ case MLP_BREVIS:
+ case MLP_LONGA:
+ primitive->set_property ("head-width", scm_from_double (head_width));
+ break;
+ case MLP_MAXIMA:
+ primitive->set_property ("head-width",
+ scm_from_double (maxima_head_width));
+ break;
+ case MLP_FLEXA_BEGIN:
+ /*
+ the next note (should be MLP_FLEXA_END) will handle this one
+ */
+ break;
+ case MLP_FLEXA_END:
+ {
+ SCM flexa_scm = primitive->get_property ("flexa-width");
+ Real const flexa_width = robust_scm2double (flexa_scm, 2.0);
+ SCM head_width = scm_from_double (0.5 * (flexa_width + thickness));
+ primitive->set_property ("head-width", head_width);
+ prev_primitive->set_property ("head-width", head_width);
+ prev_primitive->set_property ("flexa-width", flexa_scm);
+ }
+ break;
+ default:
+ programming_error (_ ("unexpected case fall-through"));
+ break;
+ }
+
+ prev_primitive = primitive;
}
}
{
Item *first = 0;
Real distance = 0.0;
- Real dot_shift = 0.0;
+ Real staff_space = 0.0;
+ Real thickness = 0.0;
+
for (vsize i = 0; i < primitives.size (); i++)
{
Item *current = dynamic_cast<Item *> (primitives[i].grob ());
if (i == 0)
{
first = current;
- dot_shift = 1.5 * Staff_symbol_referencer::staff_space (first);
+ staff_space = Staff_symbol_referencer::staff_space (first);
+ thickness = scm_to_double (current->get_property ("thickness"));
}
move_related_items_to_column (current, first->get_column (),
distance);
- distance
- += scm_to_double (current->get_property ("head-width"))
- - scm_to_double (current->get_property ("thickness"));
+ Real head_width = scm_to_double (current->get_property ("head-width"));
+ distance += head_width - thickness;
if (Rhythmic_head::dot_count (current) > 0)
- // Move dots above/behind the ligature.
+ /*
+ Move dots above/behind the ligature.
+ dots should also avoid staff lines.
+ */
{
+ Grob *dot_gr = Rhythmic_head::get_dots (current);
+
+ bool const on_line = Staff_symbol_referencer::on_line
+ (current,
+ robust_scm2int (current->get_property ("staff-position"), 0));
+ Real vert_shift = on_line ? staff_space * 0.5 : 0.0;
+ bool const flexa_begin =
+ scm_to_int (current->get_property ("primitive"))
+ & MLP_FLEXA_BEGIN;
+
if (i + 1 < primitives.size ())
- // dot in the midst => move above head
+ /*
+ dot in the midst => avoid next note;
+ what to avoid and where depends on
+ being on a line or between lines
+ */
{
- // FIXME: Amount of vertical dot-shift should depend on
- // pitch.
- //
- // FIXME: dot placement is horizontally slightly off.
- Rhythmic_head::get_dots (current)->translate_axis (dot_shift, Y_AXIS);
- }
- else
- // trailing dot => move behind head
- {
- double head_width =
- scm_to_double (current->get_property ("head-width"));
- Rhythmic_head::get_dots (current)->
- translate_axis (head_width, X_AXIS);
+ int const delta =
+ scm_to_int (current->get_property ("delta-position"));
+ if (flexa_begin)
+ vert_shift += delta < 0
+ ? staff_space : (on_line ? -2.0 : -1.0) * staff_space;
+ else if (on_line)
+ {
+ if (0 < delta && delta < 3)
+ vert_shift -= staff_space;
+ }
+ else if (delta == 1 || delta == -1)
+ vert_shift -= delta * staff_space;
}
+
+ dot_gr->translate_axis (vert_shift, Y_AXIS);
+
+ /*
+ move all dots behind head
+ */
+ dot_gr->translate_axis
+ ((flexa_begin ? staff_space * 0.6 : head_width) - 2.0*thickness, X_AXIS);
}
}
}
#include "warn.hh"
/*
+ draws one half a flexa, i.e. a portion corresponding to a single note.
+ this way coloration of the two notes building up the flexa can be
+ handled independently.
+
* TODO: divide this function into mensural and neo-mensural style.
*
* TODO: move this function to class Lookup?
*/
Stencil
brew_flexa (Grob *me,
- Real interval,
bool solid,
Real width,
- Real vertical_line_thickness)
+ Real thickness,
+ bool begin)
{
Real staff_space = Staff_symbol_referencer::staff_space (me);
+
+ /*
+ The thickness of the horizontal lines of the flexa shape
+ should be equal to that of the horizontal lines of the
+ neomensural brevis note head (see mf/parmesan-heads.mf).
+ */
+ Real const horizontal_line_thickness = staff_space * 0.35;
+
+ // URGH! vertical_line_thickness is adjustable (via thickness
+ // property), while horizontal_line_thickness is constant.
+ // Maybe both should be adjustable independently?
+
+ Real height = staff_space - horizontal_line_thickness;
+ Stencil stencil;
+ Real const interval =
+ robust_scm2double (me->get_property ("flexa-interval"), 0.0);
Real slope = (interval / 2.0 * staff_space) / width;
// Compensate optical illusion regarding vertical position of left
Real slope_correction = 0.2 * staff_space * sign (slope);
Real corrected_slope = slope + slope_correction / width;
- Stencil stencil;
if (solid) // colorated flexae
{
- Stencil solid_head
- = Lookup::beam (corrected_slope, width, staff_space, 0.0);
- stencil.add_stencil (solid_head);
+ stencil = Lookup::beam (corrected_slope, width * 0.5, staff_space, 0.0);
}
else // outline
{
- /*
- The thickness of the horizontal lines of the flexa shape
- should be equal to that of the horizontal lines of the
- neomensural brevis note head (see mf/parmesan-heads.mf).
- */
- Real const horizontal_line_thickness = staff_space * 0.35;
-
- // URGH! vertical_line_thickness is adjustable (via thickness
- // property), while horizontal_line_thickness is constant.
- // Maybe both should be adjustable independently?
-
- Real height = staff_space - horizontal_line_thickness;
-
- Stencil left_edge
- = Lookup::beam (corrected_slope, vertical_line_thickness, height, 0.0);
- stencil.add_stencil (left_edge);
-
- Stencil right_edge
- = Lookup::beam (corrected_slope, vertical_line_thickness, height, 0.0);
- right_edge.translate_axis (width - vertical_line_thickness, X_AXIS);
- right_edge.translate_axis ((width - vertical_line_thickness) *
- corrected_slope, Y_AXIS);
- stencil.add_stencil (right_edge);
-
- Stencil bottom_edge
- = Lookup::beam (corrected_slope, width,
- horizontal_line_thickness, 0.0);
- bottom_edge.translate_axis (-0.5 * height, Y_AXIS);
+ stencil = Lookup::beam (corrected_slope, thickness, height, 0.0);
+ if (!begin)
+ {
+ stencil.translate_axis (width*0.5 - thickness, X_AXIS);
+ stencil.translate_axis (corrected_slope * (width*0.5 - thickness),
+ Y_AXIS);
+ }
+
+ Stencil bottom_edge =
+ Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
+ 0.0);
+ bottom_edge.translate_axis (-0.5*height, Y_AXIS);
stencil.add_stencil (bottom_edge);
- Stencil top_edge
- = Lookup::beam (corrected_slope, width,
- horizontal_line_thickness, 0.0);
- top_edge.translate_axis (+0.5 * height, Y_AXIS);
+ Stencil top_edge =
+ Lookup::beam (corrected_slope, width * 0.5, horizontal_line_thickness,
+ 0.0);
+ top_edge.translate_axis (+0.5*height, Y_AXIS);
stencil.add_stencil (top_edge);
}
- stencil.translate_axis (ypos_correction, Y_AXIS);
+
+ if (begin)
+ stencil.translate_axis (ypos_correction, Y_AXIS);
+ else
+ {
+ stencil.translate_axis (0.5 * thickness, X_AXIS);
+
+ stencil.translate_axis (interval / -4.0 * staff_space, Y_AXIS);
+ }
+
return stencil;
}
int primitive = scm_to_int (primitive_scm);
Stencil out;
- int delta_pitch = 0;
Real thickness = 0.0;
Real width = 0.0;
+ Real flexa_width = 0.0;
Real staff_space = Staff_symbol_referencer::staff_space (me);
- if (primitive & MLP_ANY)
- thickness = robust_scm2double (me->get_property ("thickness"), .14);
- if (primitive & MLP_FLEXA)
+ bool const color =
+ me->get_property ("style") == ly_symbol2scm ("blackpetrucci");
+ bool const semi =
+ me->get_property ("style") == ly_symbol2scm ("semipetrucci");
+
+ if (primitive & MLP_ANY)
{
- delta_pitch = robust_scm2int (me->get_property ("delta-position"),
- 0);
- width
- = robust_scm2double (me->get_property ("flexa-width"), 2.0 * staff_space);
+ thickness = robust_scm2double (me->get_property ("thickness"), .14);
+ width = robust_scm2double (me->get_property ("head-width"), staff_space);
}
- if (primitive & MLP_SINGLE_HEAD)
- width = robust_scm2double (me->get_property ("head-width"), staff_space);
+ if (primitive & MLP_FLEXA)
+ flexa_width = robust_scm2double (me->get_property ("flexa-width"), 2.0)
+ * staff_space;
+
+ int const note_shape = primitive & MLP_ANY;
- switch (primitive & MLP_ANY)
+ switch (note_shape)
{
case MLP_NONE:
return Lookup::blank (Box (Interval (0, 0), Interval (0, 0)));
case MLP_LONGA: // mensural brevis head with right cauda
out = Font_interface::get_default_font (me)->find_by_name
- ("noteheads.sM2mensural");
+ (color ? "noteheads.sM2blackmensural" :
+ semi ? "noteheads.sM2semimensural" : "noteheads.sM2mensural");
break;
case MLP_BREVIS: // mensural brevis head
out = Font_interface::get_default_font (me)->find_by_name
- ("noteheads.sM1mensural");
+ (color ? "noteheads.sM1blackmensural" :
+ semi ? "noteheads.sM1semimensural" : "noteheads.sM1mensural");
break;
case MLP_MAXIMA: // should be mensural maxima head without stem
out = Font_interface::get_default_font (me)->find_by_name
- ("noteheads.sM1neomensural");
+ (color ? "noteheads.sM3blackligmensural" :
+ semi ? "noteheads.sM3semiligmensural" : "noteheads.sM3ligmensural");
break;
- case MLP_FLEXA:
- out = brew_flexa (me, delta_pitch, false, width, thickness);
+ case MLP_FLEXA_BEGIN:
+ case MLP_FLEXA_END:
+ out = brew_flexa (me, color, flexa_width, thickness,
+ note_shape == MLP_FLEXA_BEGIN);
break;
default:
programming_error (_ ("Mensural_ligature:"
out.add_stencil (join);
}
- SCM join_right_scm = me->get_property ("join-right-amount");
-
- if (scm_is_number (join_right_scm))
+ if (to_boolean (me->get_property ("add-join")))
{
- int join_right = scm_to_int (join_right_scm);
+ int join_right = scm_to_int (me->get_property ("delta-position"));
if (join_right)
{
Real y_top = join_right * 0.5 * staff_space;
{
y_bottom = y_top;
y_top = 0.0;
+
+ /*
+ if the previous note is longa-shaped,
+ the joining line may hide the stem, so made it longer
+ to serve as stem as well
+ */
+ if (primitive & MLP_LONGA)
+ /*
+ instead of 3.0 the length of a longa stem should be used
+ Font_interface::get_default_font (???)->find_by_name
+ ("noteheads.s-2mensural").extent (Y_AXIS).length () * 0.5
+ */
+ y_bottom -= 3.0 * staff_space;
}
Interval x_extent (width - thickness, width);
/* properties */
"delta-position "
- "flexa-width "
+ "ligature-flexa "
"head-width "
- "join-right-amount "
+ "add-join "
+ "flexa-interval "
"primitive "
"thickness "
);
-
return buffer;
}
else
- programming_error (_f ("Free type error: %s",
+ programming_error (_f ("FreeType error: %s",
freetype_error_string (error_code).c_str ()
));
%token <scm> MARKUP_FUNCTION
%token <scm> MARKUP_LIST_FUNCTION
%token <scm> MARKUP_IDENTIFIER
+%token <scm> MARKUPLINES_IDENTIFIER
%token <scm> MUSIC_FUNCTION
%token <scm> MUSIC_IDENTIFIER
%token <scm> NOTENAME_PITCH
| full_markup {
$$ = $1;
}
+ | full_markup_list {
+ $$ = $1;
+ }
| DIGIT {
$$ = scm_from_int ($1);
}
;
full_markup_list:
- MARKUPLINES
+ MARKUPLINES_IDENTIFIER {
+ $$ = $1;
+ }
+ | MARKUPLINES
{ PARSER->lexer_->push_markup_state (); }
markup_list {
$$ = $3;
;
markup_list:
- markup_composed_list {
+ MARKUPLINES_IDENTIFIER {
+ $$ = $1;
+ }
+ | markup_composed_list {
$$ = $1;
}
| markup_braced_list {
if (is_lyric_state ())
return LYRIC_MARKUP_IDENTIFIER;
return MARKUP_IDENTIFIER;
+ } else if (Text_interface::is_markup_list (sid)) {
+ *destination = sid;
+ return MARKUPLINES_IDENTIFIER;
}
return -1;
#(define-music-function (parser location proc) (procedure?)
(_i "Modify context properties with Scheme procedure @var{proc}.")
(make-music 'ApplyContext
- 'origin location
'procedure proc))
applyMusic =
#(define-music-function (parser location ctx proc) (symbol? procedure?)
(_i "Apply function @code{proc} to every layout object in context @code{ctx}")
(make-music 'ApplyOutputEvent
- 'origin location
'procedure proc
'context-type ctx))
#(define-music-function (parser location n) (integer?)
(_i "Print a warning if the current bar number is not @var{n}.")
(make-music 'ApplyContext
- 'origin location
'procedure
(lambda (c)
(let ((cbn (ly:context-property c 'currentBarNumber)))
#(define-music-function (parser location pitch-note) (ly:music?)
(_i "Octave check.")
(make-music 'RelativeOctaveCheck
- 'origin location
'pitch (pitch-of-note pitch-note)))
ottava =
(set! context-name (string->symbol (list-ref name-components 0)))))
(make-music 'ApplyOutputEvent
- 'origin location
'context-type context-name
'procedure
(lambda (grob orig-context context)
usually contains spacers or multi-measure rests.")
(make-music 'QuoteMusic
'element main-music
- 'quoted-music-name what
- 'origin location))
+ 'quoted-music-name what))
removeWithTag =
#(define-music-function (parser location tag music) (symbol? ly:music?)
'quoted-context-id "cue"
'quoted-music-name what
'quoted-voice-direction dir
- 'quoted-transposition (pitch-of-note pitch-note)
- 'origin location))
+ 'quoted-transposition (pitch-of-note pitch-note)))
transposition =
#(define-music-function (parser location pitch-note) (ly:music?)
### only update this when the language compiles correctly!
# LANGUAGES = (site, de, es, fr, hu, it, ja, nl)
-WEB_LANGS = es fr it nl de hu
+WEB_LANGS = es fr it nl de hu ja
TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
dalpha = direction * alpha;
if staffline_adjustment = between_staff_lines:
- stem_ht# = 1.00 staff_space#;
+ stem_ht# = 2.00 staff_space#;
elseif staffline_adjustment = on_staff_line:
- stem_ht# = 1.50 staff_space#;
+ stem_ht# = 2.50 staff_space#;
else: % staffline_adjustment = anywhere
- stem_ht# = 1.25 staff_space#;
+ stem_ht# = 2.25 staff_space#;
fi;
define_pixels (ht, wd, stem_ht);
%
%
-def draw_neomensural_brevis (expr brevwid) =
+def draw_neomensural_brevis (expr brevwid, open, full) =
save beamheight, head_width;
save holeheight, stem_width;
save serif_size, serif_protrude;
penpos4 (beamheight, 90);
penpos5 (stem_width, 180);
- save pat_in, pat_out;
- path pat_in, pat_out;
+ save pat_out;
+ path pat_out;
pat_out := z4l
-- z3l{left}
-- cycle;
fill pat_out;
- pat_in := z4r
- -- z3r{left}
- .. z2r{up}
- -- z1r;
- pat_in := pat_in
- -- reverse pat_in yscaled -1;
- pat_in := pat_in
- -- reverse pat_in shifted (-x4r, 0)
- xscaled -1
- shifted (x4l, 0)
- -- cycle;
- unfill pat_in;
+ if open:
+ save pat_in;
+ path pat_in;
+
+ pat_in := z4r
+ -- z3r{left}
+ .. z2r{up}
+ -- z1r;
+ pat_in := pat_in
+ -- reverse pat_in yscaled -1;
+ if full:
+ pat_in := pat_in
+ -- reverse pat_in shifted (-x4r, 0)
+ xscaled -1
+ shifted (x4l, 0);
+ fi;
+ pat_in := pat_in
+ -- cycle;
+ unfill pat_in;
+ fi;
penlabels (1, 2, 3, 4, 5);
enddef;
%%% This head does not seem to be used anywhere. Junk me? -- jr
def draw_neomensural_left_stemmed_head (expr wid) =
- draw_neomensural_brevis (wid);
+ draw_neomensural_brevis (wid, true, true);
x6 = x7 = stem_width / 2;
y6 = y5;
% the left, some say right. Right wins democratically.
%
def draw_neomensural_longa (expr wid) =
- draw_neomensural_brevis (wid);
+ draw_neomensural_brevis (wid, true, true);
save theta;
fet_beginchar ("Neo-mensural brevis notehead", "sM1neomensural");
- draw_neomensural_brevis (2 staff_space#);
+ draw_neomensural_brevis (2 staff_space#, true, true);
fet_endchar;
fet_endchar;
-def draw_mensural_brevis (expr wid) =
+def draw_mensural_brevis (expr wid, open, full) =
% TODO. For the moment, fall back to draw_neomensural_brevis.
- draw_neomensural_brevis (wid);
+ draw_neomensural_brevis (wid, open, full);
enddef;
%%% This head does not seem to be used anywhere. Junk me? -- jr
-def draw_mensural_left_stemmed_head (expr wid) =
- draw_mensural_brevis (wid);
+def draw_mensural_left_stemmed_head (expr wid, open, full) =
+ draw_mensural_brevis (wid, open, full);
x6 = x7 = stem_width / 2;
y6 = y5;
enddef;
-def draw_mensural_longa (expr wid) =
- draw_mensural_brevis (wid);
+def draw_mensural_longa (expr wid, open, full) =
+ draw_mensural_brevis (wid, open, full);
x6 = x7 = head_width - stem_width / 2;
y6 = y5;
%%% This head does not seem to be used anywhere. Junk me? -- jr
fet_beginchar ("Mensural left stemmed notehead", "slmensural");
- draw_mensural_left_stemmed_head (staff_space#);
+ draw_mensural_left_stemmed_head (staff_space#, true, true);
fet_endchar;
fet_beginchar ("Mensural maxima notehead", "sM3mensural");
- draw_mensural_longa (2.0 staff_space#);
+ draw_mensural_longa (2.0 staff_space#, true, true);
+fet_endchar;
+
+
+fet_beginchar ("Mensural maxima notehead in ligaturae", "sM3ligmensural");
+ draw_mensural_brevis (2.0 staff_space#, true, true);
fet_endchar;
fet_beginchar ("Mensural longa notehead", "sM2mensural");
- draw_mensural_longa (staff_space#);
+ draw_mensural_longa (staff_space#, true, true);
fet_endchar;
fet_beginchar ("Mensural brevis notehead", "sM1mensural");
- draw_mensural_brevis (staff_space#);
+ draw_mensural_brevis (staff_space#, true, true);
+fet_endchar;
+
+
+fet_beginchar ("Black mensural maxima notehead", "sM3blackmensural");
+ draw_mensural_longa (2.0 staff_space#, false, false);
+fet_endchar;
+
+
+fet_beginchar ("Black mensural maxima notehead in ligaturae", "sM3blackligmensural");
+ draw_mensural_brevis (2.0 staff_space#, false, false);
+fet_endchar;
+
+
+fet_beginchar ("Black mensural longa notehead", "sM2blackmensural");
+ draw_mensural_longa (staff_space#, false, false);
+fet_endchar;
+
+
+fet_beginchar ("Black mensural brevis notehead", "sM1blackmensural");
+ draw_mensural_brevis (staff_space#, false, false);
+fet_endchar;
+
+
+fet_beginchar ("Semi-colored mensural maxima notehead", "sM3semimensural");
+ draw_mensural_longa (2.0 staff_space#, true, false);
+fet_endchar;
+
+
+fet_beginchar ("Semi-colored mensural maxima notehead in ligaturae", "sM3semiligmensural");
+ draw_mensural_brevis (2.0 staff_space#, true, false);
+fet_endchar;
+
+
+fet_beginchar ("Semi-colored mensural longa notehead", "sM2semimensural");
+ draw_mensural_longa (staff_space#, true, false);
+fet_endchar;
+
+
+fet_beginchar ("Semi-colored mensural brevis notehead", "sM1semimensural");
+ draw_mensural_brevis (staff_space#, true, false);
fet_endchar;
fet_endchar;
+fet_beginchar ("Black mensural semibrevis head", "s0blackmensural");
+ draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
+fet_endchar;
+
+
fet_beginchar ("Petrucci semibrevis head", "s0petrucci");
% draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
fet_endchar;
+fet_beginchar ("Petrucci colored semibrevis head", "s0blackpetrucci");
+% draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
+ draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
+fet_endchar;
+
+
+fet_beginchar ("Petrucci colored minima head", "s1blackpetrucci");
+% draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
+ draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
+fet_endchar;
+
+
+fet_beginchar ("Petrucci colored semiminima head", "s2blackpetrucci");
+% draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
+ draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
+fet_endchar;
+
+
%%%%%%%%
%
%
(throw 'ly-file-failed)))))
(define-public (sanitize-command-option str)
- "Kill dubious shell quoting"
+ "Kill dubious shell quoting."
(string-append
"\""
(filter (lambda (x) (not (pred? x))) lst))
(define-public (font-name-split font-name)
- "Return (FONT-NAME . DESIGN-SIZE) from FONT-NAME string or #f."
+ "Return @code{(FONT-NAME . DESIGN-SIZE)} from @var{font-name} string
+or @code{#f}."
(let ((match (regexp-exec (make-regexp "(.*)-([0-9]*)") font-name)))
(if (regexp-match? match)
(cons (match:substring match 1) (match:substring match 2))
;; Example of a pango-physical-font
;; ("Emmentaler-11" "/home/janneke/vc/lilypond/out/share/lilypond/current/fonts/otf/emmentaler-11.otf" 0)
(define-public (pango-pf-font-name pango-pf)
- "Return the font-name of the pango physical font PANGO-PF."
+ "Return the font-name of the pango physical font @var{pango-pf}."
(list-ref pango-pf 0))
(define-public (pango-pf-file-name pango-pf)
- "Return the file-name of the pango physical font PANGO-PF."
+ "Return the file-name of the pango physical font @var{pango-pf}."
(list-ref pango-pf 1))
(define-public (pango-pf-fontindex pango-pf)
- "Return the fontindex of the pango physical font PANGO-PF."
+ "Return the fontindex of the pango physical font @var{pango-pf}."
(list-ref pango-pf 2))
(define (pango-font-name pango-font)
"")))
(define-public (define-fonts paper define-font define-pango-pf)
- "Return a string of all fonts used in PAPER, invoking the functions
-DEFINE-FONT DEFINE-PANGO-PF for producing the actual font definition."
+ "Return a string of all fonts used in @var{paper}, invoking the functions
+@var{define-font} and @var{define-pango-pf} for producing the actual font
+definition."
(let* ((font-list (ly:paper-fonts paper))
(pango-fonts (filter ly:pango-font? font-list))
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
(define-public (construct-chord-elements root duration modifications)
- " Build a chord on root using modifiers in MODIFICATIONS. NoteEvents
-have duration DURATION.
+ "Build a chord on root using modifiers in @var{modifications}.
+@code{NoteEvents} have duration @var{duration}.
-Notes: natural 11 is left from chord if not explicitly specified.
+Notes: Natural 11 is left from chord if not explicitly specified.
-Entry point for the parser.
-"
+Entry point for the parser."
(let* ((flat-mods (flatten-list modifications))
(base-chord (stack-thirds (ly:make-pitch 0 4 0) the-canonical-chord))
(complete-chord '())
(start-additions #t))
(define (interpret-inversion chord mods)
- "Read /FOO part. Side effect: INVERSION is set."
+ "Read /FOO part. Side effect: INVERSION is set."
(if (and (> (length mods) 1) (eq? (car mods) 'chord-slash))
(begin
(set! inversion (cadr mods))
(interpret-bass chord mods))
(define (interpret-bass chord mods)
- "Read /+FOO part. Side effect: BASS is set."
+ "Read /+FOO part. Side effect: BASS is set."
(if (and (> (length mods) 1) (eq? (car mods) 'chord-bass))
(begin
(set! bass (cadr mods))
(interpret-inversion chord mods)))
(define (interpret-additions chord mods)
- "Interpret additions. TODO: should restrict modifier use?"
+ "Interpret additions. TODO: should restrict modifier use?"
(cond ((null? mods) chord)
((ly:pitch? (car mods))
(if (= (pitch-step (car mods)) 11)
'(1 3 5 7 9 11 13)))
(define (stack-thirds upper-step base)
- "Stack thirds listed in BASE until we reach UPPER-STEP. Add
+ "Stack thirds listed in BASE until we reach UPPER-STEP. Add
UPPER-STEP separately."
(cond ((null? base) '())
((> (ly:pitch-steps upper-step) (ly:pitch-steps (car base)))
(define-public (ugh-compat-double-plus-new-chord->markup
style pitches bass inversion context options)
- "Entry point for New_chord_name_engraver.
+ "Entry point for @code{New_chord_name_engraver}.
FIXME: func, options/context have changed
- See
-double-plus-new-chord-name.scm for the signature of STYLE. PITCHES,
-BASS and INVERSION are lily pitches. OPTIONS is an alist-alist (see
-input/test/dpncnt.ly).
- "
+
+See @file{double-plus-new-chord-name.scm} for the signature of @var{style}.
+@var{pitches}, @var{bass}, and @var{inversion} are lily pitches.
+@var{options} is an alist-alist (see @file{input/test/dpncnt.ly})."
(define (step-nr pitch)
(let* ((pitch-nr (+ (* 7 (ly:pitch-octave pitch))
;; todo: naming is confusing: steps (0 based) vs. steps (1 based).
(define (pitch-step p)
- "Musicological notation for an interval. Eg. C to D is 2."
+ "Musicological notation for an interval. Eg. C to D is 2."
(+ 1 (ly:pitch-steps p)))
(define (get-step x ps)
bass-pitch
lowercase-root?)
- "Format for the given (lists of) pitches. This is actually more
+ "Format for the given (lists of) pitches. This is actually more
work than classifying the pitches."
(define (filter-main-name p)
))))
(define-public (note-name->markup pitch lowercase?)
- "Return pitch markup for PITCH."
+ "Return pitch markup for @var{pitch}."
(make-line-markup
(list
(make-simple-markup
(list-ref '("eses" "es" "" "is" "isis") (+ 2 (cdr n-a)))))))))
(define-public ((chord-name->italian-markup re-with-eacute) pitch lowercase?)
- "Return pitch markup for PITCH, using italian/french note names.
- If re-with-eacute is set to #t, french 'ré' is returned for D instead of 're'
-"
+ "Return pitch markup for @var{pitch}, using italian/french note names.
+If @var{re-with-eacute} is set to @code{#t}, french `ré' is returned for
+pitch@tie{}D instead of `re'."
+
(let* ((name (ly:pitch-notename pitch))
(alt (ly:pitch-alteration pitch)))
(make-line-markup
;; but let's leave that for future extensions.
;;
(define-public (system-clipped-x-extent system-grob clip-region)
- "Return the X-extent of the SYSTEM-GROB when clipped with
-CLIP-REGION. Return #f if not appropriate."
+ "Return the X-extent of @var{system-grob} when clipped with
+@var{clip-region}. Return @code{#f} if not appropriate."
(let*
((region-start (car clip-region))
@item symbol
The symbol is the name of the context in which the following rules are to be
-applied. For example, if @var{context} is @rinternals{Score} then all
+applied. For example, if @var{context} is @rinternals{Score} then all
staves share accidentals, and if @var{context} is @rinternals{Staff} then
all voices in the same staff share accidentals, but staves do not.
@end table
-The procedure returns a pair of booleans. The first states whether an extra
-natural should be added. The second states whether an accidental should be
-printed. @code{(#t . #f)} does not make sense.
+The procedure returns a pair of booleans. The first states whether an extra
+natural should be added. The second states whether an accidental should be
+printed. @code{(#t . #f)} does not make sense.
@end table")
(autoBeamCheck ,procedure? "A procedure taking three
symbol)
;; put this in an alist?
-(define-public
- all-user-grob-properties
-
+(define-public all-user-grob-properties
(map
(lambda (x)
(apply define-grob-property x))
(flexa-height ,ly:dimension? "The height of a flexa shape in a ligature
grob (in @code{staff-space} units).")
+ (flexa-interval ,integer? "The interval spanned by the two notes of a
+flexa shape (1 is a second, 7 is an octave).")
(flexa-width ,ly:dimension? "The width of a flexa shape in a
ligature grob in (in @code{staff-space} units).")
+ (ligature-flexa ,boolean? "request joining note to the previous one
+in a flexa.")
(inclinatum ,boolean? "Is this neume an inclinatum?")
- (join-right-amount ,number? "A length used for calculating the
-Y-extent of mensural ligatures.")
(linea ,boolean? "Attach vertical lines to this neume?")
(MensuralLigature
. (
- (flexa-width . 2.0)
(stencil . ,ly:mensural-ligature::print)
(thickness . 1.4)
(meta . ((class . Spanner)
(NoteHead
. (
+ (flexa-width . 2.0)
(duration-log . ,note-head::calc-duration-log)
(extra-spacing-height . ,ly:note-head::include-ledger-line-height)
(glyph-name . ,note-head::calc-glyph-name)
+ (ligature-flexa . #f)
(stem-attachment . ,ly:note-head::calc-stem-attachment)
(stencil . ,ly:note-head::print)
(X-offset . ,ly:note-head::stem-x-shift)
;;;
(define-public (markup->lily-string markup-expr)
- "Return a string describing, in LilyPond syntax, the given markup expression."
+ "Return a string describing, in LilyPond syntax, the given markup
+expression."
(define (proc->command proc)
(let ((cmd-markup (symbol->string (procedure-name proc))))
(substring cmd-markup 0 (- (string-length cmd-markup)
;;; \clef
(define clef-name-alist #f)
(define-public (memoize-clef-names clefs)
- "Initialize `clef-name-alist', if not already set."
+ "Initialize @code{clef-name-alist}, if not already set."
(if (not clef-name-alist)
(set! clef-name-alist
(map (lambda (name+vals)
clefs))))
(define-extra-display-method ContextSpeccedMusic (expr parser)
- "If `expr' is a clef change, return \"\\clef ...\"
-Otherwise, return #f."
+ "If @var{expr} is a clef change, return \"\\clef ...\".
+Otherwise, return @code{#f}."
(with-music-match (expr (music 'ContextSpeccedMusic
context-type 'Staff
element (music 'SequentialMusic
(ly:message (_ "Using `~a' note names...") str))
(set! pitchnames alist)
(ly:parser-set-note-names parser alist))
- (ly:warning (_ "Could not find language `~a'. Ignoring.") str))))
+ (ly:warning (_ "Could not find language `~a'. Ignoring.") str))))
(define-public (ly:all-stencil-commands)
"Return the list of stencil commands that can be
-defined in the output modules (output-*.scm)"
+defined in the output modules (@file{output-*.scm})."
'(beam
bezier-sandwich
blank
(define-public (ly:all-output-backend-commands)
"Return the list of extra output backend commands that
-are used internally in lily/stencil-interpret.cc."
+are used internally in @file{lily/stencil-interpret.cc}."
'(color
combine-stencil
delay-stencil-evaluation
;; Utility functions
(define-public (symbol-concatenate . names)
- "Like string-concatenate, but for symbols"
+ "Like @code{string-concatenate}, but for symbols."
(string->symbol (apply string-append (map symbol->string names))))
(define-public (function-chain arg function-list)
- "Applies a list of functions in function list to arg.
- Each element of function list is structured (cons function '(arg2 arg3 ...))
- If function takes arguments besides arg, they are provided in function list.
- For example:
- @code{guile> (function-chain 1 `((,+ 1) (,- 2) (,+ 3) (,/)))}
- @code{1/3}"
+ "Applies a list of functions in @var{function-list} to @var{arg}.
+Each element of @var{function-list} is structured @code{(cons function
+'(arg2 arg3 ...))}. If function takes arguments besides @var{arg}, they
+are provided in @var{function-list}.
+
+Example: Executing @samp{(function-chain 1 `((,+ 1) (,- 2) (,+ 3) (,/)))}
+returns @samp{1/3}."
(if (null? function-list)
arg
(function-chain
(define-macro (define-display-method music-type vars . body)
"Define a display method for a music type and store it in the
`display-methods' property of the music type entry found in the
-`music-name-to-property-table' hash table. Print methods previously
+`music-name-to-property-table' hash table. Print methods previously
defined for that music type are lost.
Syntax: (define-display-method MusicType (expression parser)
...body...))"
method))
(define-macro (define-extra-display-method music-type vars . body)
- "Add a display method for a music type. A primary display method
+ "Add a display method for a music type. A primary display method
is supposed to have been previously defined with `define-display-method'.
-This new method should return a string or #f. If #f is returned, the next
+This new method should return a string or #f. If #f is returned, the next
display method will be called."
`(let* ((type-props (hashq-ref music-name-to-property-table
',music-type '()))
(ly:music-property expr 'tags))))
(define-public (music->lily-string expr parser)
- "Print expr, a music expression, in LilyPond syntax"
+ "Print @var{expr}, a music expression, in LilyPond syntax."
(if (ly:music? expr)
(let* ((music-type (ly:music-property expr 'name))
(procs (assoc-ref (hashq-ref music-name-to-property-table
elements-list))))
(define-macro (with-music-match music-expr+pattern . body)
- "If `music-expr' matches `pattern', call `body'. `pattern' should look like:
+ "If `music-expr' matches `pattern', call `body'. `pattern' should look like:
'(music <MusicType>
property value
property ?var1
keyword), then all music expression found in its properties (such as 'element
or 'elements).
When ?var is found instead of a property value, ?var is bound that property value,
-as read inside `music-expr'. ?var may also be used to refere to a whole music
-expression inside an elements list for instance. These bindings are accessible
+as read inside `music-expr'. ?var may also be used to refere to a whole music
+expression inside an elements list for instance. These bindings are accessible
inside body."
(let ((music-expr (first music-expr+pattern))
(pattern (second music-expr+pattern))
instrument, invoke @code{(print-keys-verbose 'instrument)}.
Lastly, substituting an empty list for the pressed-key alist will result in
-a diagram with all of the keys drawn but none filled. ie...
+a diagram with all of the keys drawn but none filled, for example:
@example
\\markup \\woodwind-diagram #'oboe #'()
name)
(define (ref-ify x)
- "Return @ref{X}. If mapping ref-ify to a list that needs to be sorted,
+ "Return @ref{X}. If mapping ref-ify to a list that needs to be sorted,
sort the list first."
(string-append "@ref{" x "}"))
(define-public (decode-byte-string str)
"Return vector of glyphname symbols that correspond to string,
-assuming that STR is byte-coded using ENCODING-NAME."
+assuming that @var{str} is byte-coded using latin-1 encoding."
(let* ((len (string-length str))
(output-vector (make-vector len '.notdef)))
(define-public (no-flag stem-grob)
- "No flag: Simply return empty stencil"
+ "No flag: Simply return empty stencil."
empty-stencil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define-public (add-stroke-straight stencil stem-grob dir log stroke-style offset length thickness stroke-thickness)
+(define-public (add-stroke-straight stencil stem-grob dir log stroke-style
+ offset length thickness stroke-thickness)
"Add the stroke for acciaccatura to the given flag stencil.
- The stroke starts for up-flags at upper-end-of-flag+(0,length/2) and
- ends at (0, vertical-center-of-flag-end) - (flag-x-width/2, flag-x-width + flag-thickness).
- Here length is the whole length, while flag-x-width is just the
- x-extent and thus depends on the angle! Other combinations don't look as
- good... For down-stems the y-coordinates are simply mirrored."
+The stroke starts for up-flags at `upper-end-of-flag + (0,length/2)'
+and ends at `(0, vertical-center-of-flag-end) -
+(flag-x-width/2, flag-x-width + flag-thickness)'. Here `length' is the
+whole length, while `flag-x-width' is just the x-extent and thus depends on
+the angle! Other combinations don't look as good.
+
+For down-stems the y-coordinates are simply mirrored."
(let* ((start (offset-add offset (cons 0 (* (/ length 2) dir))))
(end (offset-add (cons 0 (cdr offset))
(cons (- (/ (car offset) 2)) (* (- (+ thickness (car offset))) dir))))
flag-stencil))
(define-public (straight-flag flag-thickness flag-spacing
- upflag-angle upflag-length
- downflag-angle downflag-length)
- "Create a stencil for a straight flag.
- flag-thickness, -spacing are given in staff spaces,
- *flag-angle is given in degree, *flag-length is given in staff spaces.
- All lengths will be scaled according to the font size of the note."
+ upflag-angle upflag-length
+ downflag-angle downflag-length)
+ "Create a stencil for a straight flag. @var{flag-thickness} and
+@var{flag-spacing} are given in staff spaces, @var{upflag-angle} and
+@var{downflag-angle} are given in degrees, and @var{upflag-length} and
+@var{downflag-length} are given in staff spaces.
+
+All lengths are scaled according to the font size of the note."
+
(lambda (stem-grob)
(let* ((log (ly:grob-property stem-grob 'duration-log))
(dir (ly:grob-property stem-grob 'direction))
(define-public (modern-straight-flag stem-grob)
"Modern straight flag style (for composers like Stockhausen, Boulez, etc.).
- The angles are 18 and 22 degrees and thus smaller than for the ancient style
- of Bach etc."
+The angles are 18 and 22 degrees and thus smaller than for the ancient style
+of Bach, etc."
((straight-flag 0.55 1 -18 1.1 22 1.2) stem-grob))
(define-public (old-straight-flag stem-grob)
- "Old straight flag style (for composers like Bach). The angles of the flags
- are both 45 degrees."
+ "Old straight flag style (for composers like Bach). The angles of the
+flags are both 45 degrees."
((straight-flag 0.55 1 -45 1.2 45 1.4) stem-grob))
(define-public (add-stroke-glyph stencil stem-grob dir stroke-style flag-style)
"Load and add a stroke (represented by a glyph in the font) to the given
- flag stencil"
+flag stencil."
(if (not (string? stroke-style))
stencil
; Otherwise: look up the stroke glyph and combine it with the flag
(define-public (retrieve-glyph-flag flag-style dir dir-modifier stem-grob)
- "Load the correct flag glyph from the font"
+ "Load the correct flag glyph from the font."
(let* ((log (ly:grob-property stem-grob 'duration-log))
(font (ly:grob-default-font stem-grob))
(font-char (string-append "flags." flag-style dir dir-modifier (number->string log)))
(define-public (create-glyph-flag flag-style dir-modifier stem-grob)
- "Create a flag stencil by looking up the glyph from the font"
+ "Create a flag stencil by looking up the glyph from the font."
(let* ((dir (if (eqv? (ly:grob-property stem-grob 'direction) UP) "u" "d"))
(flag (retrieve-glyph-flag flag-style dir dir-modifier stem-grob))
(stroke-style (ly:grob-property stem-grob 'stroke-style)))
(define-public (mensural-flag stem-grob)
"Mensural flags: Create the flag stencil by loading the glyph from the font.
- Flags are always aligned with staff lines, so we need to check the end point
- of the stem: For stems ending on staff lines, use different flags than for
- notes between staff lines. The idea is that flags are always vertically
- aligned with the staff lines, regardless of whether the note head is on a
- staff line or between two staff lines. In other words, the inner end of
- a flag always touches a staff line."
+Flags are always aligned with staff lines, so we need to check the end point
+of the stem: For stems ending on staff lines, use different flags than for
+notes between staff lines. The idea is that flags are always vertically
+aligned with the staff lines, regardless of whether the note head is on a
+staff line or between two staff lines. In other words, the inner end of
+a flag always touches a staff line."
(let* ((adjust #t)
(stem-end (inexact->exact (round (ly:grob-property stem-grob 'stem-end-position))))
(define-public ((glyph-flag flag-style) stem-grob)
- "Simulates the default way of generating flags: look up glyphs
- flags.style[ud][1234] from the feta font and use it for the flag stencil."
+ "Simulatesthe default way of generating flags: Look up glyphs
+@code{flags.style[ud][1234]} from the feta font and use it for the flag
+stencil."
(create-glyph-flag flag-style "" stem-grob))
(define-public (normal-flag stem-grob)
- "Create a default flag"
+ "Create a default flag."
(create-glyph-flag "" "" stem-grob))
(define-public (default-flag stem-grob)
- "Create a flag stencil for the stem. Its style will be derived from the
- @code{'flag-style} Stem property. By default, @code{lilypond} uses a
- C++ Function (which is slightly faster) to do exactly the same as this
- function. However, if one wants to modify the default flags, this function
- can be used to obtain the default flag stencil, which can then be modified
- at will. The correct way to do this is:
+ "Create a flag stencil for the stem. Its style will be derived from the
+@code{'flag-style} Stem property. By default, @code{lilypond} uses a
+C++ Function (which is slightly faster) to do exactly the same as this
+function. However, if one wants to modify the default flags, this function
+can be used to obtain the default flag stencil, which can then be modified
+at will. The correct way to do this is:
+
@example
\\override Stem #'flag = #default-flag
\\override Stem #'flag-style = #'mensural
"Set up music fonts.
Arguments:
- NODE the font tree to modify.
- NAME is the basename for the music font. NAME-DESIGNSIZE.otf should be the music font,
- NAME-brace.otf should have piano braces.
- DESIGN-SIZE-ALIST is a list of (ROUNDED . DESIGN-SIZE). ROUNDED is
- a suffix for font filenames, while DESIGN-SIZE should be the actual
- design size. The latter is used for text fonts loaded through
- pango/fontconfig
- FACTOR is a size factor relative to the default size that is being used.
- This is used to select the proper design size for the text fonts.
-"
+@itemize
+@item
+@var{node} is the font tree to modify.
+
+@item
+@var{name} is the basename for the music font.
+@file{@var{name}-<designsize>.otf} should be the music font,
+@file{@var{name}-brace.otf} should have piano braces.
+
+@item
+@var{family} is the family name of the music font.
+
+@item
+@var{design-size-alist} is a list of @code{(rounded . designsize)}.
+@code{rounded} is a suffix for font filenames, while @code{designsize}
+should be the actual design size. The latter is used for text fonts
+loaded through pango/fontconfig.
+
+@item
+@var{factor} is a size factor relative to the default size that is being
+used. This is used to select the proper design size for the text fonts.
+@end itemize"
(for-each
(lambda (x)
(add-font node
(define-public (dump-stencil-as-EPS-with-bbox paper dump-me filename
load-fonts
bbox)
- "Create an EPS file from stencil DUMP-ME to FILENAME. BBOX has
-format (left-x, lower-y, right x, up-y). If LOAD-FONTS set, include
-fonts inline."
+ "Create an EPS file from stencil @var{dump-me} to @var{filename}.
+@var{bbox} has format @code{(left-x, lower-y, right-x, upper-y)}. If
+@var{load-fonts} set, include fonts inline."
(define (to-rounded-bp-box box)
"Convert box to 1/72 inch with rounding to enlarge the box."
(let* ((scale (ly:output-def-lookup paper 'output-scale))
(define (merge-details key alist-list . default)
"Return @code{alist-list} entries for @code{key}, in one combined alist.
-There can be two @code{alist-list} entries for a given key. The first
+There can be two @code{alist-list} entries for a given key. The first
comes from the override-markup function, the second comes
from property settings during a regular override.
This is necessary because some details can be set in one
"Draw the string lines for a fret diagram with
@var{string-count} strings and frets as indicated in @var{fret-range}.
Line thickness is given by @var{th}, fret & string spacing by
-@var{size}. Orientation is determined by @var{orientation}. "
+@var{size}. Orientation is determined by @var{orientation}."
(define (helper x)
(if (null? (cdr x))
"Draw the fret lines for a fret diagram with
@var{string-count} strings and frets as indicated in @var{fret-range}.
Line thickness is given by @var{th}, fret & string spacing by
-@var{size}. Orientation is given by @var{orientation}."
+@var{size}. Orientation is given by @var{orientation}."
(define (helper x)
(if (null? (cdr x))
(fret-stencil (car x))
@end table
The function also checks if the string has the typical form of three
-pedals, then the divider and then the remaining four pedals. If not it
-prints out a warning. However, in any case, it will also print each symbol
-in the order as given. This means you can place the divider (even multiple
+pedals, then the divider and then the remaining four pedals. If not it
+prints out a warning. However, in any case, it will also print each symbol
+in the order as given. This means you can place the divider (even multiple
dividers) anywhere you want, but you'll have to live with the warnings.
The appearance of the diagram can be tweaked inter alia using the size property
of the TextScript grob (@code{\\override Voice.TextScript #'size = #0.3}) for
the overall, the thickness property
(@code{\\override Voice.TextScript #'thickness = #3}) for the line thickness of
-the horizontal line and the divider. The remaining configuration (box sizes,
+the horizontal line and the divider. The remaining configuration (box sizes,
offsets and spaces) is done by the harp-pedal-details list of properties
(@code{\\override Voice.TextScript #'harp-pedal-details #'box-width = #1}).
It contains the following settings: @code{box-offset} (vertical shift of the
(if (null? (cdr info))
(ly:warning "Harp pedal diagram does not contain a divider (usually after third pedal).")
(if (not (equal? (cdr info) '(3)))
- (ly:warning "Harp pedal diagram contains dividers at positions ~a. Normally, there is only one divider after the third pedal." (cdr info))))))
+ (ly:warning "Harp pedal diagram contains dividers at positions ~a. Normally, there is only one divider after the third pedal." (cdr info))))))
;; parser <-> output hooks.
(define-public (collect-bookpart-for-book parser book-part)
- "Toplevel book-part handler"
+ "Toplevel book-part handler."
(define (add-bookpart book-part)
(ly:parser-define!
parser 'toplevel-bookparts
(score-handler (scorify-music music parser)))))
(define-public (collect-music-for-book parser music)
- "Top-level music handler"
+ "Top-level music handler."
(collect-music-aux (lambda (score)
(collect-scores-for-book parser score))
parser
music))
(define-public (collect-book-music-for-book parser book music)
- "Book music handler"
+ "Book music handler."
(collect-music-aux (lambda (score)
(ly:book-add-score! book score))
parser
music))
(define-public (scorify-music music parser)
- "Preprocess MUSIC."
+ "Preprocess @var{music}."
(for-each (lambda (func)
(set! music (func music parser)))
(map-alist-vals func (cdr list)))))
(define (map-alist-keys func list)
- "map FUNC over the keys of an alist LIST, leaving the vals. "
+ "map FUNC over the keys of an alist LIST, leaving the vals."
(if (null? list)
'()
(cons (cons (func (caar list)) (cdar list))
(map-alist-keys func (cdr list)))))
(define-public (first-member members lst)
- "Return first successful MEMBER of member from MEMBERS in LST."
+ "Return first successful member (of member) from @var{members} in
+@var{lst}."
(if (null? members)
#f
(let ((m (member (car members) lst)))
(if m m (first-member (cdr members) lst)))))
(define-public (first-assoc keys lst)
- "Return first successful ASSOC of key from KEYS in LST."
+ "Return first successful assoc of key from @var{keys} in @var{lst}."
(if (null? keys)
#f
(let ((k (assoc (car keys) lst)))
(assoc-crawler key '() alist))
(define-public (map-selected-alist-keys function keys alist)
- "Returns alist with function applied to all of the values in list keys.
- For example:
- @code{guile> (map-selected-alist-keys - '(a b) '((a . 1) (b . -2) (c . 3) (d . 4)))}
- @code{((a . -1) (b . 2) (c . 3) (d . 4))}"
+ "Return @var{alist} with @var{function} applied to all of the values
+in list @var{keys}.
+
+For example:
+@example
+@code{guile> (map-selected-alist-keys - '(a b) '((a . 1) (b . -2) (c . 3) (d . 4)))}
+@code{((a . -1) (b . 2) (c . 3) (d . 4)}
+@end example"
(define (map-selected-alist-keys-helper function key alist)
(map
(lambda (pair)
(helper lst 0))
(define-public (count-list lst)
- "Given lst (E1 E2 .. ) return ((E1 . 1) (E2 . 2) ... ) "
+ "Given @var{lst} as @code{(E1 E2 .. )}, return
+@code{((E1 . 1) (E2 . 2) ... )}."
(define (helper l acc count)
(if (pair? l)
(reverse (helper lst '() 1)))
(define-public (list-join lst intermediate)
- "put INTERMEDIATE between all elts of LST."
+ "Put @var{intermediate} between all elts of @var{lst}."
(fold-right
(lambda (elem prev)
(lset-difference eq? a b))
(define-public (uniq-list lst)
- "Uniq LST, assuming that it is sorted. Uses equal? for comparisons."
+ "Uniq @var{lst}, assuming that it is sorted. Uses @code{equal?}
+for comparisons."
(reverse!
(fold (lambda (x acc)
(define (split-at-predicate pred lst)
"Split LST into two lists at the first element that returns #f for
- (PRED previous_element element). Return the two parts as a pair.
+ (PRED previous_element element). Return the two parts as a pair.
Example: (split-at-predicate < '(1 2 3 2 1)) ==> ((1 2 3) . (2 1))"
(if (null? lst)
(list lst)
(list lst)))))
(define-public (split-list-by-separator lst pred)
- "Split LST at each element that satisfies PRED, and return the parts
- (with the separators removed) as a list of lists. Example:
- (split-list-by-separator '(a 0 b c 1 d) number?) ==> ((a) (b c) (d))"
+ "Split @var{lst} at each element that satisfies @var{pred}, and return
+the parts (with the separators removed) as a list of lists. For example,
+executing @samp{(split-list-by-separator '(a 0 b c 1 d) number?)} returns
+@samp{((a) (b c) (d))}."
(let loop ((result '()) (lst lst))
(if (and lst (not (null? lst)))
(loop
(cons (- expr) expr))
(define-public (interval-length x)
- "Length of the number-pair X, when an interval"
+ "Length of the number-pair @var{x}, if an interval."
(max 0 (- (cdr x) (car x))))
(define-public (ordered-cons a b)
((if (= dir RIGHT) cdr car) interval))
(define-public (interval-index interval dir)
- "Interpolate INTERVAL between between left (DIR=-1) and right (DIR=+1)"
+ "Interpolate @var{interval} between between left (@var{dir}=-1) and
+right (@var{dir}=+1)."
(* (+ (interval-start interval) (interval-end interval)
(* dir (- (interval-end interval) (interval-start interval))))
0.5))
(define-public (interval-center x)
- "Center the number-pair X, when an interval"
+ "Center the number-pair @var{x}, if an interval."
(if (interval-empty? x)
0.0
(/ (+ (car x) (cdr x)) 2)))
(define-public THREE-PI-OVER-TWO (* 3 PI-OVER-TWO))
(define-public (cyclic-base-value value cycle)
- "Takes a value and modulo-maps it between 0 and base."
+ "Take @var{value} and modulo-maps it between 0 and base @var{cycle}."
(if (< value 0)
(cyclic-base-value (+ value cycle) cycle)
(if (>= value cycle)
value)))
(define-public (angle-0-2pi angle)
- "Takes an angle in radians and maps it between 0 and 2pi."
+ "Take @var{angle} (in radians) and maps it between 0 and 2pi."
(cyclic-base-value angle TWO-PI))
(define-public (angle-0-360 angle)
- "Takes an angle in radians and maps it between 0 and 2pi."
+ "Take @var{angle} (in degrees) and maps it between 0 and 360 degrees."
(cyclic-base-value angle 360.0))
(define-public PI-OVER-180 (/ PI 180))
(define-public (degrees->radians angle-degrees)
- "Convert the given angle from degrees to radians"
+ "Convert the given angle from degrees to radians."
(* angle-degrees PI-OVER-180))
(define-public (ellipse-radius x-radius y-radius angle)
(* (sin angle) (sin angle)))))))
(define-public (polar->rectangular radius angle-in-degrees)
- "Convert polar coordinate @code{radius} and @code{angle-in-degrees}
- to (x-length . y-length)"
+ "Return polar coordinates (@var{radius}, @var{angle-in-degrees})
+as rectangular coordinates @ode{(x-length . y-length)}."
+
(let ((complex (make-polar
radius
(degrees->radians angle-in-degrees))))
(ly:number->string (cdr c))))
(define-public (dir-basename file . rest)
- "Strip suffixes in REST, but leave directory component for FILE."
+ "Strip suffixes in @var{rest}, but leave directory component for
+@var{file}."
(define (inverse-basename x y) (basename y x))
(simple-format #f "~a/~a" (dirname file)
(fold inverse-basename file rest)))
(define-public (write-me message x)
- "Return X. Display MESSAGE and write X. Handy for debugging,
-possibly turned off."
+ "Return @var{x}. Display @var{message} and write @var{x}.
+Handy for debugging, possibly turned off."
(display message) (write x) (newline) x)
;; x)
(cons (f (car x)) (f (cdr x))))
(define-public (list-insert-separator lst between)
- "Create new list, inserting BETWEEN between elements of LIST"
+ "Create new list, inserting @var{between} between elements of @var{lst}."
(define (conc x y )
(if (eq? y #f)
(list x)
(define-public (binary-search start end getter target-val)
(_i "Find the index between @var{start} and @var{end} (an integer)
-which will produce the closest match to @var{target-val} when
+which produces the closest match to @var{target-val} if
applied to function @var{getter}.")
(if (<= end start)
start
(string<? (symbol->string (car lst)) (symbol->string (car r))))
(define-public (eval-carefully symbol module . default)
- "Check if all symbols in expr SYMBOL are reachable
- in module MODULE. In that case evaluate, otherwise
- print a warning and set an optional DEFAULT."
+ "Check whether all symbols in expr @var{symbol} are reachable
+in module @var{module}. In that case evaluate, otherwise
+print a warning and set an optional @var{default}."
(let* ((unavailable? (lambda (sym)
(not (module-defined? module sym))))
(sym-unavailable (if (pair? symbol)
(define (ly:alist<? a b)
"Return #t if the first key of alist A is less than the first key of
- alist B, using case-sensitive LilyPond sort order. Keys are assumed to
+ alist B, using case-sensitive LilyPond sort order. Keys are assumed to
be symbols."
(ly:string<? (symbol->string (car a))
(symbol->string (car b))))
(define (ly:alist-ci<? a b)
"Return #t if the first key of alist A is less than the first key of
- alist B, using case-insensitive LilyPond sort order. Keys are assumed
+ alist B, using case-insensitive LilyPond sort order. Keys are assumed
to be symbols."
(ly:string-ci<? (symbol->string (car a))
(symbol->string (car b))))
format)
(define-public (ergonomic-simple-format dest . rest)
- "Like ice-9 format, but without the memory consumption."
+ "Like ice-9's @code{format}, but without the memory consumption."
(if (string? dest)
(apply simple-format (cons #f (cons dest rest)))
(apply simple-format (cons dest rest))))
,(symbol->string make-markup-name) sig args)))))))
(define-public (make-markup markup-function make-name signature args)
- " Construct a markup object from MARKUP-FUNCTION and ARGS. Typecheck
-against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
-"
+ "Construct a markup object from @var{markup-function} and @var{args}.
+Typecheck against @var{signature}, reporting @var{make-name} as the
+user-invoked function."
(let* ((arglen (length args))
(siglen (length signature))
(error-msg (if (and (> siglen 0) (> arglen 0))
;;;
(define-public (markup-command-signature-ref markup-command)
- "Return markup-command's signature (the 'markup-signature object property)"
+ "Return @var{markup-command}'s signature (the @code{'markup-signature}
+object property)."
(object-property markup-command 'markup-signature))
(define-public (markup-command-signature-set! markup-command signature)
- "Set markup-command's signature (as object property)"
+ "Set @var{markup-command}'s signature (as object property)."
(set-object-property! markup-command 'markup-signature signature)
signature)
;;;;;;;;;;;;;;;;;;;;;;
;;; used in parser.yy to map a list of markup commands on markup arguments
(define-public (map-markup-command-list commands markups)
- "`markups' being a list of markups, eg (markup1 markup2 markup3),
-and `commands' a list of commands with their scheme arguments, in reverse order,
-eg: ((italic) (raise 4) (bold)), maps the commands on each markup argument, eg:
- ((bold (raise 4 (italic markup1)))
- (bold (raise 4 (italic markup2)))
- (bold (raise 4 (italic markup3))))
-"
+ "@var{markups} being a list of markups, for example
+@code{(markup1 markup2 markup3)}, and @var{commands} a list of commands with
+their scheme arguments, in reverse order, for example
+@code{((italic) (raise 4) (bold))}, map the commands on each markup argument,
+for example
+@example
+((bold (raise 4 (italic markup1)))
+ (bold (raise 4 (italic markup2)))
+ (bold (raise 4 (italic markup3))))
+@end example"
(map-in-order (lambda (arg)
(let ((result arg))
(for-each (lambda (cmd)
(object-property x 'markup-list-command)))
(define-public (markup-command-list? x)
- "Determine if `x' is a markup command list, ie. a list composed of
-a markup list function and its arguments."
+ "Determine whether @var{x} is a markup command list, i.e. a list
+composed of a markup list function and its arguments."
(and (pair? x) (markup-list-function? (car x))))
(define-public (markup-list? arg)
- "Return a true value if `x' is a list of markups or markup command lists."
+ "Return @code{#t} if @var{x} is a list of markups or markup command lists."
(define (markup-list-inner? lst)
(or (null? lst)
(and (or (markup? (car lst)) (markup-command-list? (car lst)))
instrument-names-alist))
(define-public (percussion? instrument)
- "returns whether the instrument should use midi channel 9"
+ "Return @code{#t} if the instrument should use MIDI channel 9."
(let* ((inst (symbol->string instrument))
(entry (assoc-get inst instrument-names-alist)))
(and entry (>= entry 32768))))
(define-public (midi-program instrument)
- "returns the program of the instrument"
+ "Return the program of the instrument."
(let* ((inst (symbol->string instrument))
(entry (assoc-get inst instrument-names-alist)))
(define-public dynamic-default-volume 0.71)
(define-public (alterations-in-key pitch-list)
- "Count number of sharps minus number of flats"
+ "Count number of sharps minus number of flats."
(* (apply + (map cdr pitch-list)) 2))
(define-public (music-map function music)
"Apply @var{function} to @var{music} and all of the music it contains.
-First it recurses over the children, then the function is applied to MUSIC.
-"
+First it recurses over the children, then the function is applied to
+@var{music}."
(let ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element)))
(set! (ly:music-property music 'elements)
(function music)))
(define-public (music-filter pred? music)
- "Filter out music expressions that do not satisfy PRED."
+ "Filter out music expressions that do not satisfy @var{pred?}."
(define (inner-music-filter pred? music)
"Recursive function."
(make-music 'Music))) ;must return music.
(define-public (display-music music)
- "Display music, not done with music-map for clarity of presentation."
+ "Display music, not done with @code{music-map} for clarity of
+presentation."
(display music)
(display ": { ")
`(markup ,@(inner-markup->make-markup markup-expression))))
(define-public (music->make-music obj)
- "Generate a expression that, once evaluated, may return an object equivalent to `obj',
-that is, for a music expression, a (make-music ...) form."
+ "Generate an expression that, once evaluated, may return an object
+equivalent to @var{obj}, that is, for a music expression, a
+@code{(make-music ...)} form."
(cond (;; markup expression
(markup? obj)
(markup-expression->make-markup obj))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (shift-one-duration-log music shift dot)
- " add SHIFT to duration-log of 'duration in music and optionally
- a dot to any note encountered. This scales the music up by a factor
- 2^shift * (2 - (1/2)^dot)"
+ "Add @var{shift} to @code{duration-log} of @code{'duration} in
+@var{music} and optionally @var{dot} to any note encountered. This
+scales the music up by a factor `2^@var{shift} * (2 - (1/2)^@var{dot})'."
(let ((d (ly:music-property music 'duration)))
(if (ly:duration? d)
(let* ((cp (ly:duration-factor d))
music))
(define-public (make-repeat name times main alts)
- "create a repeat music expression, with all properties initialized properly"
+ "Create a repeat music expression, with all properties initialized
+properly."
(define (first-note-duration music)
"Finds the duration of the first NoteEvent by searching depth-first
through MUSIC."
;; clusters.
(define-public (note-to-cluster music)
- "Replace NoteEvents by ClusterNoteEvents."
+ "Replace @code{NoteEvents} by @code{ClusterNoteEvents}."
(if (eq? (ly:music-property music 'name) 'NoteEvent)
(make-music 'ClusterNoteEvent
'pitch (ly:music-property music 'pitch)
;; repeats.
(define-public (unfold-repeats music)
- "This function replaces all repeats with unfolded repeats."
+ "Replace all repeats with unfolded repeats."
(let ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element)))
;; property setting music objs.
(define-public (make-grob-property-set grob gprop val)
- "Make a Music expression that sets GPROP to VAL in GROB. Does a pop first,
-i.e. this is not an override"
+ "Make a @code{Music} expression that sets @var{gprop} to @var{val} in
+@var{grob}. Does a pop first, i.e., this is not an override."
(make-music 'OverrideProperty
'symbol grob
'grob-property gprop
'pop-first #t))
(define-public (make-grob-property-override grob gprop val)
- "Make a Music expression that overrides GPROP to VAL in GROB."
+ "Make a @code{Music} expression that overrides @var{gprop} to @var{val}
+in @var{grob}."
(make-music 'OverrideProperty
'symbol grob
'grob-property gprop
'grob-value val))
(define-public (make-grob-property-revert grob gprop)
- "Revert the grob property GPROP for GROB."
+ "Revert the grob property @var{gprop} for @var{grob}."
(make-music 'RevertProperty
'symbol grob
'grob-property gprop))
(define-safe-public (context-spec-music m context #:optional id)
- "Add \\context CONTEXT = ID to M. "
+ "Add \\context CONTEXT = ID to M."
(let ((cm (make-music 'ContextSpeccedMusic
'element m
'context-type context)))
cm))
(define-public (descend-to-context m context)
- "Like context-spec-music, but only descending. "
+ "Like @code{context-spec-music}, but only descending."
(let ((cm (context-spec-music m context)))
(ly:music-set-property! cm 'descend-only #t)
cm))
;;; Need to keep this definition for \time calls from parser
(define-public (make-time-signature-set num den)
- "Set properties for time signature NUM/DEN."
+ "Set properties for time signature @var{num}/@var{den}."
(make-music 'TimeSignatureMusic
'numerator num
'denominator den
;;; Used for calls that include beat-grouping setting
(define-public (set-time-signature num den . rest)
- "Set properties for time signature @var{num/den}.
-If @var{rest} is present, it is used to set
-@code{beatStructure}."
+ "Set properties for time signature @var{num}/@var{den}.
+If @var{rest} is present, it is used to set @code{beatStructure}."
(ly:export
(make-music 'TimeSignatureMusic
'numerator num
(revert-head-style heads)))))
(define-public (set-mus-properties! m alist)
- "Set all of ALIST as properties of M."
+ "Set all of @var{alist} as properties of @var{m}."
(if (pair? alist)
(begin
(set! (ly:music-property m (caar alist)) (cdar alist))
(set-mus-properties! m (cdr alist)))))
(define-public (music-separator? m)
- "Is M a separator?"
+ "Is @var{m} a separator?"
(let ((ts (ly:music-property m 'types)))
(memq 'separator ts)))
(define (voicify-list lst number)
"Make a list of Musics.
- voicify-list :: [ [Music ] ] -> number -> [Music]
- LST is a list music-lists.
+voicify-list :: [ [Music ] ] -> number -> [Music]
+LST is a list music-lists.
- NUMBER is 0-base, i.e. Voice=1 (upstems) has number 0.
+NUMBER is 0-base, i.e., Voice=1 (upstems) has number 0.
"
(if (null? lst)
'()
ch))
(define-public (voicify-music m)
- "Recursively split chords that are separated with \\ "
+ "Recursively split chords that are separated with @code{\\\\}."
(if (not (ly:music? m))
(ly:error (_ "music expected: ~S") m))
(let ((es (ly:music-property m 'elements))
(define-public ((set-output-property grob-name symbol val) grob grob-c context)
- "Usage:
-
-\\applyoutput #(set-output-property 'Clef 'extra-offset '(0 . 1))
-
-"
+ "Usage example:
+@code{\\applyoutput #(set-output-property 'Clef 'extra-offset '(0 . 1))}"
(let ((meta (ly:grob-property grob 'meta)))
(if (equal? (assoc-get 'name meta) grob-name)
(set! (ly:grob-property grob symbol) val))))
;;
(define-public (smart-bar-check n)
- "Make a bar check that checks for a specific bar number.
-"
+ "Make a bar check that checks for a specific bar number."
(let ((m (make-music 'ApplyContext)))
(define (checker tr)
(let* ((bn (ly:context-property tr 'currentBarNumber)))
(define-public (skip->rest mus)
-
- "Replace MUS by RestEvent of the same duration if it is a
-SkipEvent. Useful for extracting parts from crowded scores"
+ "Replace @var{mus} by @code{RestEvent} of the same duration if it is a
+@code{SkipEvent}. Useful for extracting parts from crowded scores."
(if (memq (ly:music-property mus 'name) '(SkipEvent SkipMusic))
(make-music 'RestEvent 'duration (ly:music-property mus 'duration))
nv))
(define (vector-map f v)
- "Map F over V. This function returns nothing."
+ "Map F over V. This function returns nothing."
(do ((n (vector-length v))
(i 0 (+ i 1)))
((>= i n))
(f (vector-ref v i))))
(define (vector-reverse-map f v)
- "Map F over V, N to 0 order. This function returns nothing."
+ "Map F over V, N to 0 order. This function returns nothing."
(do ((i (- (vector-length v) 1) (- i 1)))
((< i 0))
(f (vector-ref v i))))
(define-public (add-grace-property context-name grob sym val)
- "Set SYM=VAL for GROB in CONTEXT-NAME. "
+ "Set @var{sym}=@var{val} for @var{grob} in @var{context-name}."
(define (set-prop context)
(let* ((where (ly:context-property-where-defined context 'graceSettings))
(current (ly:context-property where 'graceSettings))
(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. "
+ "Remove all @var{sym} for @var{grob} in @var{context-name}."
(define (sym-grob-context? property sym grob context-name)
(and (eq? (car property) context-name)
(eq? (cadr property) grob)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (cue-substitute quote-music)
- "Must happen after quote-substitute."
+ "Must happen after @code{quote-substitute}."
(if (vector? (ly:music-property quote-music 'quoted-events))
(let* ((dir (ly:music-property quote-music 'quoted-voice-direction))
music)
(define-public (make-duration-of-length moment)
- "Make duration of the given MOMENT length."
+ "Make duration of the given @code{moment} length."
(ly:make-duration 0 0
(ly:moment-main-numerator moment)
(ly:moment-main-denominator moment)))
(define (check-pitch-against-signature context pitch barnum laziness octaveness)
"Checks the need for an accidental and a @q{restore} accidental against
-@code{localKeySignature}. The @var{laziness} is the number of measures
+@code{localKeySignature}. The @var{laziness} is the number of measures
for which reminder accidentals are used (i.e., if @var{laziness} is zero,
only cancel accidentals in the same measure; if @var{laziness} is three,
we cancel accidentals up to three measures after they first appear.
(cons need-restore need-accidental)))
(define-public ((make-accidental-rule octaveness laziness) context pitch barnum measurepos)
- "Creates an accidental rule that makes its decision based on the octave of the note
- and a laziness value.
- octaveness is either 'same-octave or 'any-octave and defines whether the rule should
- respond to accidental changes in other octaves than the current. 'same-octave is the
- normal way to typeset accidentals - an accidental is made if the alteration is different
- from the last active pitch in the same octave. 'any-octave looks at the last active pitch
- in any octave.
- laziness states over how many bars an accidental should be remembered.
- 0 is default - accidental lasts over 0 bar lines, that is, to the end of current measure.
- A positive integer means that the accidental lasts over that many bar lines.
- -1 is 'forget immediately', that is, only look at key signature.
- #t is forever."
+ "Create an accidental rule that makes its decision based on the octave of
+the note and a laziness value.
+
+@var{octaveness} is either @code{'same-octave} or @code{'any-octave} and
+defines whether the rule should respond to accidental changes in other
+octaves than the current. @code{'same-octave} is the normal way to typeset
+accidentals -- an accidental is made if the alteration is different from the
+last active pitch in the same octave. @code{'any-octave} looks at the last
+active pitch in any octave.
+
+@var{laziness} states over how many bars an accidental should be remembered.
+@code{0}@tie{}is the default -- accidental lasts over 0@tie{}bar lines, that
+is, to the end of current measure. A positive integer means that the
+accidental lasts over that many bar lines. @code{-1} is `forget
+immediately', that is, only look at key signature. @code{#t} is `forever'."
+
(check-pitch-against-signature context pitch barnum laziness octaveness))
(define (key-entry-notename entry)
- "Return the pitch of an entry in localKeySignature. The entry is either of the form
+ "Return the pitch of an entry in localKeySignature. The entry is either of the form
'(notename . alter) or '((octave . notename) . (alter barnum . measurepos))."
(if (number? (car entry))
(car entry)
(cadr entry)))
(define-public (find-pitch-entry keysig pitch accept-global accept-local)
- "Return the first entry in keysig that matches the pitch.
- accept-global states whether key signature entries should be included.
- accept-local states whether local accidentals should be included.
- if no matching entry is found, #f is returned."
+ "Return the first entry in @var{keysig} that matches @var{pitch}.
+@var{accept-global} states whether key signature entries should be included.
+@var{accept-local} states whether local accidentals should be included.
+If no matching entry is found, @var{#f} is returned."
(if (pair? keysig)
(let* ((entry (car keysig))
(entryoct (key-entry-octave entry))
#f))
(define-public (neo-modern-accidental-rule context pitch barnum measurepos)
- "an accidental rule that typesets an accidental if it differs from the key signature
- AND does not directly follow a note on the same staff-line.
- This rule should not be used alone because it does neither look at bar lines
- nor different accidentals at the same notename"
+ "An accidental rule that typesets an accidental if it differs from the
+key signature @emph{and} does not directly follow a note on the same
+staff line. This rule should not be used alone because it does neither
+look at bar lines nor different accidentals at the same note name."
(let* ((keysig (ly:context-property context 'localKeySignature))
(entry (find-pitch-entry keysig pitch #t #t)))
(if (equal? #f entry)
(and (equal? entrybn barnum) (equal? entrymp measurepos)))))))))
(define-public (teaching-accidental-rule context pitch barnum measurepos)
- "an accidental rule that typesets a cautionary accidental
- if it is included in the key signature AND does not directly follow
- a note on the same staff-line."
+ "An accidental rule that typesets a cautionary accidental if it is
+included in the key signature @emph{and} does not directly follow a note
+on the same staff line."
(let* ((keysig (ly:context-property context 'localKeySignature))
(entry (find-pitch-entry keysig pitch #t #t)))
(if (equal? #f entry)
context))
(define-public (set-accidental-style style . rest)
- "Set accidental style to STYLE. Optionally takes a context argument,
-e.g. 'Staff or 'Voice. The context defaults to Staff, except for piano styles, which
-use GrandStaff as a context. "
+ "Set accidental style to @var{style}. Optionally take a context
+argument, e.g. @code{'Staff} or @code{'Voice}. The context defaults
+to @code{Staff}, except for piano styles, which use @code{GrandStaff}
+as a context."
(let ((context (if (pair? rest)
(car rest) 'Staff))
(pcontext (if (pair? rest)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (skip-of-length mus)
- "Create a skip of exactly the same length as MUS."
+ "Create a skip of exactly the same length as @var{mus}."
(let* ((skip
(make-music
'SkipEvent
(make-event-chord (list (ly:music-compress skip (ly:music-length mus))))))
(define-public (mmrest-of-length mus)
- "Create a mmrest of exactly the same length as MUS."
+ "Create a multi-measure rest of exactly the same length as @var{mus}."
(let* ((skip
(make-multi-measure-rest
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (extract-named-music music music-name)
-"Return a flat list of all music named @code{music-name}
-from @code{music}."
+ "Return a flat list of all music named @var{music-name} from @var{music}."
(let ((extracted-list
(if (ly:music? music)
(if (eq? (ly:music-property music 'name) music-name)
(flatten-list extracted-list)))
(define-public (event-chord-notes event-chord)
-"Return a list of all notes from @{event-chord}."
+ "Return a list of all notes from @var{event-chord}."
(filter
(lambda (m) (eq? 'NoteEvent (ly:music-property m 'name)))
(ly:music-property event-chord 'elements)))
(define-public (event-chord-pitches event-chord)
-"Return a list of all pitches from @{event-chord}."
+ "Return a list of all pitches from @var{event-chord}."
(map (lambda (x) (ly:music-property x 'pitch))
(event-chord-notes event-chord)))
(pair? (ly:grob-basic-properties grob)))
(define-public (make-stencil-boxer thickness padding callback)
-
"Return function that adds a box around the grob passed as argument."
(lambda (grob)
(box-stencil (callback grob) thickness padding)))
(define-public (make-stencil-circler thickness padding callback)
"Return function that adds a circle around the grob passed as argument."
-
- (lambda (grob) (circle-stencil (callback grob) thickness padding)))
+ (lambda (grob)
+ (circle-stencil (callback grob) thickness padding)))
(define-public (print-circled-text-callback grob)
(grob-interpret-markup grob (make-circle-markup
(if (< log 0)
(string-append (number->string log) "mensural")
(string-append (number->string log) (symbol->string style))))
+ ((blackpetrucci)
+ (if (< log 0)
+ (string-append (number->string log) "blackmensural")
+ (string-append (number->string log) (symbol->string style))))
+ ((semipetrucci)
+ (if (< log 0)
+ (string-append (number->string log) "semimensural")
+ (string-append (number->string log) "petrucci")))
((neomensural)
(string-append (number->string log) (symbol->string style)))
(else
(define (str4 num)
(if (or (nan? num) (inf? num))
(begin
- (ly:warning (_ "Found infinity or nan in output. Substituting 0.0"))
+ (ly:warning (_ "Found infinity or nan in output. Substituting 0.0"))
(if (ly:get-option 'strict-infinity-checking)
(exit 1))
"0.0")
(format "<~S~a>\n" entity (attributes attributes-alist)))
(define-public (eoc entity . attributes-alist)
- " oc = open/close"
+ "oc = open/close"
(format "<~S~a/>\n" entity (attributes attributes-alist)))
(define-public (ec entity)
))
(define-public (layout-set-absolute-staff-size sz)
- "Function to be called inside a \\layout{} block to set the staff
-size. SZ is in points"
+ "Set the absolute staff size inside of a @code{\\layout@{@}} block.
+@var{sz} is in points."
(layout-set-absolute-staff-size-in-module (current-module) sz))
(define-public (layout-set-staff-size sz)
- "Function to be called inside a \\layout{} block to set the staff
-size. SZ is in points"
+ "Set the staff size inside of a @code{\\layout@{@}} block.
+@var{sz} is in points."
(layout-set-absolute-staff-size (* (eval 'pt (current-module)) sz)))
("petrucci-c5" . ("clefs.petrucci.c5" 4 0))
("petrucci-f3" . ("clefs.petrucci.f" 0 0))
("petrucci-f4" . ("clefs.petrucci.f" 2 0))
+ ("petrucci-f5" . ("clefs.petrucci.f" 4 0))
("petrucci-f" . ("clefs.petrucci.f" 2 0))
("petrucci-g" . ("clefs.petrucci.g" -2 0))))
("clefs.petrucci.g" . -4)))
(define-public (make-clef-set clef-name)
- "Generate the clef setting commands for a clef with name CLEF-NAME."
+ "Generate the clef setting commands for a clef with name @var{clef-name}."
(define (make-prop-set props)
(let ((m (make-music 'PropertySet)))
(map (lambda (x) (set! (ly:music-property m (car x)) (cdr x))) props)
(make-music 'Music)))))
(define-public (make-cue-clef-set clef-name)
- "Generate the clef setting commands for a cue clef with name CLEF-NAME."
+ "Generate the clef setting commands for a cue clef with name
+@var{clef-name}."
(define (make-prop-set props)
(let ((m (make-music 'PropertySet)))
(map (lambda (x) (set! (ly:music-property m (car x)) (cdr x))) props)
;; a function to add new clefs at runtime
(define-public (add-new-clef clef-name clef-glyph clef-position octavation c0-position)
- "Append the entries for a clef symbol to supported clefs and c0-pitch-alist"
+ "Append the entries for a clef symbol to supported clefs and
+@code{c0-pitch-alist}."
(set! supported-clefs
(acons clef-name (list clef-glyph clef-position octavation) supported-clefs))
(set! c0-pitch-alist
(string->list (number->string var-idx)))))))))
(define-public (parse-string-result str parser)
- "Parse `str', which is supposed to contain a music expression."
+ "Parse @var{str}, which is supposed to contain a music expression."
(ly:parser-parse-string
parser
(ly:parser-lookup parser 'parseStringResult))
(define-public (read-lily-expression chr port)
- "Read a #{ lily music expression #} from port and return
-the scheme music expression. The $ character may be used to introduce
-scheme forms, typically symbols. $$ may be used to simply write a `$'
-character."
+ "Read a lilypond music expression enclosed within @code{#@}} and @code{#@}}
+from @var{port} and return the corresponding Scheme music expression.
+The @samp{$} character may be used to introduce Scheme forms, typically
+symbols. @code{$$} may be used to simply write a @samp{$} character itself."
(let ((bindings '()))
(define (create-binding! val)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (recording-group-emulate music odef)
- "Interprets music according to odef, but stores all events in a chronological
-list, similar to the Recording_group_engraver in 2.8 and earlier"
+ "Interpret @var{music} according to @var{odef}, but store all events
+in a chronological list, similar to the @code{Recording_group_engraver} in
+LilyPond version 2.8 and earlier."
(let*
((context-list '())
(now-mom (ly:make-moment 0 0))
m))
(define-public (determine-split-list evl1 evl2)
- "EVL1 and EVL2 should be ascending"
+ "@var{evl1} and @var{evl2} should be ascending."
(let* ((pc-debug #f)
(chord-threshold 8)
(voice-state-vec1 (make-voice-states evl1))
(previous-voice-state vs)))
(define (try-solo type start-idx current-idx)
- "Find a maximum stretch that can be marked as solo. Only set
+ "Find a maximum stretch that can be marked as solo. Only set
the mark when there are no spanners active.
return next idx to analyse.
start-idx))
(define (analyse-moment result-idx)
- "Analyse 'apart starting at RESULT-IDX. Return next index. "
+ "Analyse 'apart starting at RESULT-IDX. Return next index."
(let* ((now-state (vector-ref result result-idx))
(vs1 (current-voice-state now-state 1))
(vs2 (current-voice-state now-state 2))
(define-public (parse-terse-string terse-definition)
-"Parse a fret-diagram-terse definition string @code{terse-definition} and
-return a marking list, which can be used with a fretboard grob."
+ "Parse a @code{fret-diagram-terse} definition string @var{terse-definition}
+and return a marking list, which can be used with a fretboard grob."
(cdr (fret-parse-terse-definition-string (list '()) terse-definition)))
(define-public (get-chord-shape shape-code tuning base-chord-shapes)
-"Return the chord shape associated with @code{shape-code} and
-@code{tuning} in the hash-table @code{base-chord-shapes}."
+ "Return the chord shape associated with @var{shape-code} and
+@var{tuning} in the hash-table @var{base-chord-shapes}."
(let ((hash-handle (hash-get-handle base-chord-shapes
(cons shape-code tuning))))
(if hash-handle
'())))
(define-public (offset-fret fret-offset diagram-definition)
-"Add @code{fret-offset} to each fret indication in @code{diagram-definition}
-and return the resulting verbose fret-diagram-definition."
+ "Add @var{fret-offset} to each fret indication in
+@var{diagram-definition} and return the resulting verbose
+@code{fret-diagram-definition}."
(let ((verbose-definition
(if (string? diagram-definition)
(parse-terse-string diagram-definition)
(define-public (music-property-value? music property value)
- "Return true iff MUSIC's PROPERTY is equal to VALUE."
+ "Return @code{#t} iff @var{music}'s @var{property} is equal to
+@var{value}."
(equal? (ly:music-property music property) value))
(define-public (music-name? music name)
- "Return true iff MUSIC's name is NAME."
+ "Return @code{#t} iff @var{music}'s name is @var{name}."
(if (list? name)
(member (ly:music-property music 'name) name)
(music-property-value? music 'name name)))
(define-public (music-property? music property)
- "Return true iff MUSIC is a property setter and sets or unsets PROPERTY."
+ "Return @code{#t} iff @var{music} is a property setter and sets
+or unsets @var{property}."
(and (music-name? music '(PropertySet PropertyUnset))
(music-property-value? music 'symbol property)))
(define-public (music-has-property? music property)
- "Return true iff MUSIC contains PROPERTY."
+ "Return @code{#t} iff @var{music} contains @var{property}."
(not (eq? (ly:music-property music property) '())))
(define-public (property-value music)
- "Return value of a property setter MUSIC.
-If it unsets the property, return #f."
+ "Return value of a property setter @var{music}.
+If it unsets the property, return @code{#f}."
(if (music-name? music 'PropertyUnset)
#f
(ly:music-property music 'value)))
(define-public (music-elements music)
- "Return list of all MUSIC's top-level children."
+ "Return list of all @var{music}'s top-level children."
(let ((elt (ly:music-property music 'element))
(elts (ly:music-property music 'elements)))
(if (not (null? elt))
elts)))
(define-public (find-child music predicate)
- "Find the first node in MUSIC that satisfies PREDICATE."
+ "Find the first node in @var{music} that satisfies @var{predicate}."
(define (find-child queue)
(if (null? queue)
#f
(find-child (list music)))
(define-public (find-child-named music name)
- "Return the first child in MUSIC that is named NAME."
+ "Return the first child in @var{music} that is named @var{name}."
(find-child music (lambda (elt) (music-name? elt name))))
(define-public (process-music music function)
- "Process all nodes of MUSIC (including MUSIC) in the DFS order.
-Apply FUNCTION on each of the nodes.
-If FUNCTION applied on a node returns true, don't process the node's subtree."
+ "Process all nodes of @var{music} (including @var{music}) in the DFS order.
+Apply @var{function} on each of the nodes. If @var{function} applied on a
+node returns @code{#t}, don't process the node's subtree."
(define (process-music queue)
(if (not (null? queue))
(let* ((elt (car queue))
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
(define-public (stack-stencils axis dir padding stils)
- "Stack stencils STILS in direction AXIS, DIR, using PADDING."
+ "Stack stencils @var{stils} in direction @var{axis}, @var{dir}, using
+@var{padding}."
(cond
((null? stils) empty-stencil)
((null? (cdr stils)) (car stils))
padding))))
(define-public (stack-stencils-padding-list axis dir padding stils)
- "Stack stencils STILS in direction AXIS, DIR, using a list of PADDING."
+ "Stack stencils @var{stils} in direction @var{axis}, @var{dir}, using
+a list of @var{padding}."
(cond
((null? stils) empty-stencil)
((null? (cdr stils)) (car stils))
(car padding)))))
(define-public (centered-stencil stencil)
- "Center stencil @var{stencil} in both the X and Y directions"
+ "Center stencil @var{stencil} in both the X and Y directions."
(ly:stencil-aligned-to (ly:stencil-aligned-to stencil X CENTER) Y CENTER))
(define-public (stack-lines dir padding baseline stils)
- "Stack vertically with a baseline-skip."
+ "Stack vertically with a baseline skip."
(define result empty-stencil)
(define last-y #f)
(do
(define-public (bracketify-stencil stil axis thick protrusion padding)
- "Add brackets around STIL, producing a new stencil."
+ "Add brackets around @var{stil}, producing a new stencil."
(let* ((ext (ly:stencil-extent stil axis))
(lb (ly:bracket axis ext thick protrusion))
stencil))
(define-public (make-line-stencil width startx starty endx endy)
- "Make a line stencil of given linewidth and set its extents accordingly"
+ "Make a line stencil of given linewidth and set its extents accordingly."
(let ((xext (cons (min startx endx) (max startx endx)))
(yext (cons (min starty endy) (max starty endy))))
(ly:make-stencil
xext yext))
(define-public (make-circle-stencil radius thickness fill)
- "Make a circle of radius @var{radius} and thickness @var{thickness}"
+ "Make a circle of radius @var{radius} and thickness @var{thickness}."
(let*
((out-radius (+ radius (/ thickness 2.0))))
(cons (- out-radius) out-radius))))
(define-public (make-oval-stencil x-radius y-radius thickness fill)
- "Make an oval from two Bezier curves, of x radius @var{x-radius},
- y radius @code{y-radius},
- and thickness @var{thickness} with fill defined by @code{fill}."
+ "Make an oval from two Bezier curves, of x@tie{}radius @var{x-radius},
+y@tie{}radius @code{y-radius}, and thickness @var{thickness} with fill
+defined by @code{fill}."
(let*
((x-out-radius (+ x-radius (/ thickness 2.0)))
(y-out-radius (+ y-radius (/ thickness 2.0))) )
`(,(/ thickness -2) . ,(/ thickness 2))))))
(define-public (make-ellipse-stencil x-radius y-radius thickness fill)
- "Make an ellipse of x radius @var{x-radius}, y radius @code{y-radius},
- and thickness @var{thickness} with fill defined by @code{fill}."
+ "Make an ellipse of x@tie{}radius @var{x-radius}, y@tie{}radius
+@code{y-radius}, and thickness @var{thickness} with fill defined by
+@code{fill}."
(let*
((x-out-radius (+ x-radius (/ thickness 2.0)))
(y-out-radius (+ y-radius (/ thickness 2.0))) )
(define-public (box-grob-stencil grob)
"Make a box of exactly the extents of the grob. The box precisely
-encloses the contents.
-"
+encloses the contents."
(let* ((xext (ly:grob-extent grob grob 0))
(yext (ly:grob-extent grob grob 1))
(thick 0.01))
;; TODO merge this and prev function.
(define-public (box-stencil stencil thickness padding)
- "Add a box around STENCIL, producing a new stencil."
+ "Add a box around @var{stencil}, producing a new stencil."
(let* ((x-ext (interval-widen (ly:stencil-extent stencil 0) padding))
(y-ext (interval-widen (ly:stencil-extent stencil 1) padding))
(y-rule (make-filled-box-stencil (cons 0 thickness) y-ext))
stencil))
(define-public (circle-stencil stencil thickness padding)
- "Add a circle around STENCIL, producing a new stencil."
+ "Add a circle around @var{stencil}, producing a new stencil."
(let* ((x-ext (ly:stencil-extent stencil X))
(y-ext (ly:stencil-extent stencil Y))
(diameter (max (interval-length x-ext)
(define-public (oval-stencil stencil thickness x-padding y-padding)
"Add an oval around @code{stencil}, padded by the padding pair,
- producing a new stencil."
+producing a new stencil."
(let* ((x-ext (ly:stencil-extent stencil X))
(y-ext (ly:stencil-extent stencil Y))
(x-length (+ (interval-length x-ext) x-padding thickness))
(interval-center y-ext))))))
(define-public (ellipse-stencil stencil thickness x-padding y-padding)
- "Add an ellipse around STENCIL, padded by the padding pair,
- producing a new stencil."
+ "Add an ellipse around @var{stencil}, padded by the padding pair,
+producing a new stencil."
(let* ((x-ext (ly:stencil-extent stencil X))
(y-ext (ly:stencil-extent stencil Y))
(x-length (+ (interval-length x-ext) x-padding thickness))
(interval-center y-ext))))))
(define-public (rounded-box-stencil stencil thickness padding blot)
- "Add a rounded box around STENCIL, producing a new stencil."
+ "Add a rounded box around @var{stencil}, producing a new stencil."
(let* ((xext (interval-widen (ly:stencil-extent stencil 0) padding))
(yext (interval-widen (ly:stencil-extent stencil 1) padding))
))
(define-public (arrow-stencil-maker start? end?)
- "Returns a function drawing a line from current point to @var{destination},
- with optional arrows of @var{max-size} on start and end controlled by
- @var{start?} and @var{end?}."
+ "Return a function drawing a line from current point to @code{destination},
+with optional arrows of @code{max-size} on start and end controlled by
+@var{start?} and @var{end?}."
(lambda (destination max-size)
(let*
((e_x 1+0i)
(cons 'beamExceptions beam-exceptions)))
(define-public (base-fraction time-signature time-signature-settings)
- "Get @code{baseMoment} fraction value for @code{time-signature} from
-@code{time-signature-settings}."
+ "Get @code{baseMoment} fraction value for @var{time-signature} from
+@var{time-signature-settings}."
(let ((return-value (get-setting 'baseMoment
time-signature
time-signature-settings)))
return-value)))
(define-public (beat-structure base-fraction time-signature time-signature-settings)
- "Get beatStructure value in @code{base-fraction} units
-for @code{time-signature} from
-@code{time-signature-settings}."
+ "Get @code{beatStructure} value in @var{base-fraction} units
+for @var{time-signature} from @var{time-signature-settings}."
(define (fraction-divide numerator denominator)
(/ (* (car numerator) (cdr denominator))
(* (cdr numerator) (car denominator))))
return-value)))
(define-public (beam-exceptions time-signature time-signature-settings)
- "Get beamExceptions value for @code{time-signature} from
-@code{time-signature-settings}."
+ "Get @code{beamExceptions} value for @var{time-signature} from
+@var{time-signature-settings}."
(get-setting 'beamExceptions time-signature time-signature-settings))
(define (override-property-setting context property setting value)
"Like the C++ code that executes \\override, but without type
-checking. "
+checking."
(begin
(revert-property-setting context property setting)
(ly:context-set-property!
(define (revert-property-setting context property setting)
"Like the C++ code that executes \revert, but without type
-checking. "
+checking."
(define (entry-count alist entry-key)
"Count the number of entries in alist with a key of
(revert-member current-value setting)))))
(define-public (override-time-signature-setting time-signature setting)
- "Override the time signature settings for the context in @var{rest},
-with the new setting alist @var{setting}. "
+ "Override the time signature settings for the context in
+@var{time-signature}, with the new setting alist @var{setting}."
(context-spec-music
(make-apply-context
(lambda (c) (override-property-setting
(define-public ((marked-up-headfoot what-odd what-even)
layout scopes page-number is-last-bookpart is-bookpart-last-page)
-
- "Read variables WHAT-ODD, WHAT-EVEN from LAYOUT, and interpret them
-as markup. The PROPS argument will include variables set in SCOPES and
-page:is-bookpart-last-page, page:is-last-bookpart, page:page-number-string
-and page:page-number"
+ "Read variables @var{what-odd}, @var{what-even} from @var{layout},
+and interpret them as markup. The @var{props} argument will include
+variables set in @var{scopes} and @code{page:is-bookpart-last-page},
+@code{page:is-last-bookpart}, @code{page:page-number-string}, and
+@code{page:page-number}."
(define (get sym)
(ly:output-def-lookup layout sym))
(get what-odd))))
(define-public ((marked-up-title what) layout scopes)
- "Read variables WHAT from SCOPES, and interpret it as markup. The
-PROPS argument will include variables set in SCOPES (prefixed with
-`header:'
-"
+ "Read variables @var{what} from @var{scopes}, and interpret it as markup.
+The @var{props} argument will include variables set in @var{scopes} (prefixed
+with `header:'."
(define (get sym)
(let ((x (ly:modules-lookup scopes sym)))
(string-append "</" (symbol->string name) ">"))
(define-public (music-to-xml music port)
- "Dump XML-ish stuff to PORT."
+ "Dump XML-ish stuff to @var{port}."
;; dtd contains # -- This confuses tex during make doc.
;;
(display (close-tag 'music) port))
(define-public (music-to-musicxml music port)
- "Dump MusicXML-ish stuff to PORT."
+ "Dump MusicXML-ish stuff to @var{port}."
;; dtd contains # -- This confuses tex during make doc.
;;
(define-public
(determine-frets context notes specified-info . rest)
"Determine string numbers and frets for playing @var{notes}
-as a chord, given specified information @var{specified-info}.
+as a chord, given specified information @var{specified-info}.
@var{specified-info} is a list with two list elements,
-specified strings @var{defined-strings} and
-specified fingerings @var{defined-fingers}. Only a fingering of
-0 will affect the fret selection, as it specifies an open string.
-If @var{defined-strings} is @code{'()}, the context property
+specified strings @code{defined-strings} and
+specified fingerings @code{defined-fingers}. Only a fingering of@tie{}0
+will affect the fret selection, as it specifies an open string.
+If @code{defined-strings} is @code{'()}, the context property
@code{defaultStrings} will be used as a list of defined strings.
Will look for predefined fretboards if @code{predefinedFretboardTable}
is not @code {#f}. If @var{rest} is present, it contains the
-FretBoard grob, and a fretboard will be
-created. Otherwise, a list of (string fret finger) lists will
-be returned)."
+@code{FretBoard} grob, and a fretboard will be
+created. Otherwise, a list of @code{(string fret finger)} lists will
+be returned."
;; helper functions
'Changes': '変更点',
#TODO
- 'Extending': 0,
+ 'Extending': '拡張',
'Internals': '内部リファレンス',
- 'Contributor': 0,
+ 'Contributor': '貢献者向けガイド',
- ' (split HTML)': 0,
- ' (big HTML)': 0,
+# keep the spaces!
+ ' (split HTML)': ' (ページ毎に分割された HTML)',
+ ' (big HTML)': ' (1 つの大きな HTML)',
- 'Regression tests for ': 0,
- 'PDF of regtests for ': 0,
- 'MusicXML Regression tests for ': 0,
- 'PDF of MusicXML regtests for ': 0,
+ 'Regression tests for ': '回帰テスト バージョン ',
+ 'PDF of regtests for ': '回帰テスト (PDF 版) バージョン ',
+ 'MusicXML Regression tests for ': 'MusicXML 回帰テスト バージョン ',
+ 'PDF of MusicXML regtests for ': 'MusicXML 回帰テスト (PDF 版) バージョン ',
- 'Doc tarball for ': 0,
- ' (did not exist in 2.12)': 0,
+ 'Doc tarball for ': 'ドキュメント アーカイブ バージョン ',
+ ' (did not exist in 2.12)': ' (バージョン 2.12 には存在しません)',
},
'nl': {