--- /dev/null
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+ lsrtags = "editorial-annotations, fretted-strings, text, tweaks-and-overrides"
+
+ texidoc = "
+By default markups does not show in a tablature. To make them appear,
+simply use the command @code{\\revert TabStaff.TextScript.stencil}
+
+"
+ doctitle = "Adding markups in a tablature"
+} % begin verbatim
+
+%% http://lsr.di.unimi.it/LSR/Item?id=919
+% by P.P.Schneider on June 2014
+
+high = { r4 r8 <g c'> q r8 r4 }
+
+low = { c4 r4 c8 r8 g,8 b, }
+
+pulse = { s8^"1" s^"&" s^"2" s^"&" s^"3" s^"&" s^"4" s^"&" }
+
+\score {
+ \new TabStaff {
+ \repeat unfold 2 << \high \\ \low \\ \pulse >>
+ }
+ \layout {
+ \context {
+ \TabStaff
+ \clef moderntab
+ \revert TextScript.stencil
+ \override TextScript.font-series = #'bold
+ \override TextScript.font-size = #-2
+ \override TextScript.color = #red
+
+ }
+ \context {
+ \Score
+ proportionalNotationDuration = #(ly:make-moment 1/8)
+ }
+ }
+}
\Voice
\consists "Melody_engraver"
\autoBeamOff
- \stemNeutral
+ \override Stem.neutral-direction = #'()
}
}
--- /dev/null
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+ lsrtags = "pitches, text"
+
+ texidoc = "
+Internally, @code{\\ottava} sets the properties @code{ottavation} (for
+example, to @code{8va} or @code{8vb}) and @code{middleCPosition}. To
+override the text of the bracket, set @code{ottavation} after invoking
+@code{\\ottava}.
+
+Short text is especially useful when a brief ottava is used.
+
+"
+ doctitle = "Changing ottava text"
+} % begin verbatim
+
+{
+ c'2
+ \ottava #1
+ \set Staff.ottavation = #"8"
+ c''2
+ \ottava #0
+ c'1
+ \ottava #1
+ \set Staff.ottavation = #"Text"
+ c''1
+}
--- /dev/null
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+ lsrtags = "repeats, staff-notation"
+
+ texidoc = "
+Default bar lines can be changed when re-defined in a score context.
+
+"
+ doctitle = "Changing the default bar lines"
+} % begin verbatim
+
+% http://lsr.di.unimi.it/LSR/Item?id=964
+%%=> http://lists.gnu.org/archive/html/lilypond-user/2014-03/msg00126.html
+%%=> http://lilypond.1069038.n5.nabble.com/Changing-the-default-end-repeat-bracket-tc169357.html
+
+\layout {
+ \context {
+ \Score
+ %% Changing the defaults from engraver-init.ly
+ defaultBarType = #"!"
+ startRepeatType = #"[|:"
+ endRepeatType = #":|]"
+ doubleRepeatType = #":|][|:"
+ }
+}
+
+%% example:
+{
+ c'1
+ \repeat volta 2 { \repeat unfold 2 c' }
+ \repeat volta 2 { \repeat unfold 2 c' }
+ \alternative {
+ { c' }
+ {
+ %% v2.18 workaround
+ \once\override Score.VoltaBracket.shorten-pair = #'(1 . -1)
+ c'
+ }
+ }
+ \bar "|."
+}
adding-fingerings-to-a-score.ly
adding-links-to-objects.ly
+adding-markups-in-a-tablature.ly
allowing-fingerings-to-be-printed-inside-the-staff.ly
alternative-bar-numbering.ly
analysis-brackets-above-the-staff.ly
adding-fingerings-to-a-score.ly
adding-fingerings-to-tablatures.ly
+adding-markups-in-a-tablature.ly
allowing-fingerings-to-be-printed-inside-the-staff.ly
bar-chords-notation-for-guitar-with-text-spanner.ly
changing-fret-orientations.ly
ambitus.ly
applying-note-head-styles-depending-on-the-step-of-the-scale.ly
automatically-changing-the-stem-direction-of-the-middle-note-based-on-the-melody.ly
+changing-ottava-text.ly
changing-the-ambitus-gap.ly
changing-the-interval-of-lines-on-the-stave.ly
clefs-can-be-transposed-by-arbitrary-amounts.ly
adding-volta-brackets-to-additional-staves.ly
centered-measure-numbers.ly
+changing-the-default-bar-lines.ly
cross-staff-tremolos.ly
engraving-tremolos-with-floating-beams.ly
isolated-percent-repeats.ly
adding-timing-marks-to-long-glissandi.ly
alternative-bar-numbering.ly
centered-measure-numbers.ly
+changing-the-default-bar-lines.ly
changing-the-number-of-lines-in-a-staff.ly
changing-the-staff-size.ly
creating-blank-staves.ly
+adding-markups-in-a-tablature.ly
adding-the-current-date-to-a-score.ly
adjusting-lyrics-vertical-spacing.ly
aligning-and-centering-instrument-names.ly
blanking-staff-lines-using-the--whiteout-command.ly
center-text-below-hairpin-dynamics.ly
centering-markup-on-note-heads-automatically.ly
+changing-ottava-text.ly
changing-the-default-text-font-family.ly
combining-dynamics-with-markup-texts.ly
combining-two-parts-on-the-same-staff.ly
adding-an-ottava-marking-to-a-single-voice.ly
adding-links-to-objects.ly
+adding-markups-in-a-tablature.ly
adding-timing-marks-to-long-glissandi.ly
adjusting-grace-note-spacing.ly
adjusting-lyrics-vertical-spacing.ly
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.di.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.18.0"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.19.12
+\version "2.19.12"
\header {
lsrtags = "text"
Red Hat Fedora
- taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
- ttfonts-zh_CN fonts-ja fonts-hebrew
+ linux-libertine-fonts (Latin, Cyrillic, Hebrew)
+ ipa-mincho-fonts ipa-gothic-fonts (Japanese)
-Debian GNU/Linux
+Debian GNU/Linux, Ubuntu
- apt-get install emacs-intl-fonts xfonts-intl-.* \
- ttf-kochi-gothic ttf-kochi-mincho \
- xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi
-%}
+ fonts-linuxlibertine (Latin, Cyrillic, Hebrew)
+ fonts-ipafont (Japanese)
+
+%} % begin verbatim
+
+
+% Font settings for Cyrillic and Hebrew
+% Linux Libertine fonts contain Cyrillic and Hebrew glyphs.
+\paper {
+ #(define fonts
+ (set-global-fonts
+ #:roman "Linux Libertine O,serif"
+ #:sans "Linux Biolinum O,sans-serif"
+ #:typewriter "Linux Libertine Mono O,monospace"
+ ))
+}
% Cyrillic font
bulgarian = \lyricmode {
@c used for news about the upcoming release; see CG 10.2
@newsItem
-@subheading LilyPond 2.19.26 released @emph{August 27, 2015}
+@subheading LilyPond 2.19.27 released @emph{September 12, 2015}
We are happy to announce the release of LilyPond
-2.19.26. This release includes a number of enhancements, and contains some
+2.19.27. This release includes a number of enhancements, and contains some
work in progress. You will have access to the very latest features, but
some may be incomplete, and you may encounter bugs and crashes. If you
require a stable version of Lilypond, we recommend using the 2.18
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subheading LilyPond 2.19.26 released @emph{August 27, 2015}
+
+We are happy to announce the release of LilyPond
+2.19.26. This release includes a number of enhancements, and contains some
+work in progress. You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes. If you
+require a stable version of Lilypond, we recommend using the 2.18
+version.
+
+@newsEnd
+
@newsItem
@subheading LilyPond 2.19.25 released @emph{August 9, 2015}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=19
-PATCH_LEVEL=27
+PATCH_LEVEL=28
MY_PATCH_LEVEL=
VERSION_STABLE=2.18.2
-VERSION_DEVEL=2.19.26
+VERSION_DEVEL=2.19.27
#define VPOS ((vsize) -1)
#endif
-#if HAVE_STL_DATA_METHOD
#include <vector>
-#else /* !HAVE_STL_DATA_METHOD */
-#define vector __flower_vector
-#include <vector>
-#undef vector
-
-namespace std
-{
-
-/* Interface without pointer arithmetic (iterator) semantics. */
-template<typename T, typename A = std::allocator<T> >
-class vector : public __flower_vector<T, A>
-{
-public:
- typedef typename __flower_vector<T>::iterator iterator;
- typedef typename __flower_vector<T>::const_iterator const_iterator;
-
- vector<T, A> () : __flower_vector<T, A> ()
- {
- }
-
- vector<T, A> (size_t n) : __flower_vector<T, A> (n)
- {
- }
-
- vector<T, A> (vector<T, A> const &v) : __flower_vector<T, A> (v)
- {
- }
-
- vector<T, A> (const_iterator b, const_iterator e) : __flower_vector<T, A> (b, e)
- {
- }
-
- T *
- data ()
- {
- return &(*this)[0];
- }
-
- T const *
- data () const
- {
- return &(*this)[0];
- }
-};
-
-} /* namespace std */
-
-#endif /* !HAVE_STL_DATA_METHOD */
template<typename T>
T const &
return src;
}
-/*
- Perform substitution on GROB_LIST using a constant amount of stack.
-*/
-vector<Grob *> temporary_substition_array;
-void
-substitute_grob_array (Grob_array *grob_arr, Grob_array *new_arr)
-{
- vector<Grob *> &old_grobs (grob_arr->array_reference ());
- vector<Grob *> *new_grobs (new_arr == grob_arr
- ? & temporary_substition_array
- : &new_arr->array_reference ());
-
- new_grobs->resize (old_grobs.size ());
- Grob **array = (Grob **) new_grobs->data ();
- Grob **ptr = array;
- for (vsize i = 0; i < old_grobs.size (); i++)
- {
- Grob *orig = old_grobs[i];
- Grob *new_grob = substitute_grob (orig);
- if (new_grob)
- *ptr++ = new_grob;
- }
-
- new_grobs->resize (ptr - array);
- if (new_arr == grob_arr)
- new_arr->set_array (*new_grobs);
-}
-
/*
We don't do
: Grob_array::make_array ();
Grob_array *new_arr = unsmob<Grob_array> (newval);
-
- substitute_grob_array (orig, new_arr);
+ // TODO: What if new_arr is null?
+ new_arr->filter_map_assign (*orig, substitute_grob);
val = newval;
}
else
newval = Grob_array::make_array ();
sc->set_object (sym, newval);
}
- substitute_grob_array (grob_array, unsmob<Grob_array> (newval));
+ Grob_array *new_arr = unsmob<Grob_array> (newval);
+ new_arr->filter_map_assign (*grob_array, substitute_grob);
}
else
{
ordered_ = true;
}
-vector<Grob *> &
-Grob_array::array_reference ()
-{
- return grobs_;
-}
-
-vector<Grob *> const &
-Grob_array::array () const
-{
- return grobs_;
-}
-
SCM
Grob_array::mark_smob () const
{
return ga.smobbed_copy ();
}
-void
-Grob_array::clear ()
-{
- grobs_.clear ();
-}
-
void
Grob_array::remove_duplicates ()
{
uniquify (grobs_);
}
-bool
-Grob_array::empty () const
+void
+Grob_array::filter (bool (*predicate) (const Grob *))
+{
+ vsize new_size = 0;
+ for (vsize i = 0; i < grobs_.size (); ++i)
+ if (predicate (grobs_[i]))
+ grobs_[new_size++] = grobs_[i];
+ grobs_.resize (new_size);
+ // could call grobs_.shrink_to_fit () with C++11
+}
+
+void
+Grob_array::filter_map (Grob * (*map_fun) (Grob *))
{
- return grobs_.empty ();
+ vsize new_size = 0;
+ for (vsize i = 0; i < grobs_.size (); ++i)
+ if (Grob *grob = map_fun (grobs_[i]))
+ grobs_[new_size++] = grob;
+ grobs_.resize (new_size);
+ // could call grobs_.shrink_to_fit () with C++11
}
void
-Grob_array::set_array (vector<Grob *> const &src)
+Grob_array::filter_map_assign (const Grob_array &src,
+ Grob * (*map_fun) (Grob *))
{
- grobs_ = src;
+ if (&src != this)
+ {
+ grobs_.resize (0);
+ grobs_.reserve (src.grobs_.size ());
+ for (vsize i = 0; i < src.grobs_.size (); i++)
+ if (Grob *grob = map_fun (src.grobs_[i]))
+ grobs_.push_back (grob);
+ // could call grobs_.shrink_to_fit () with C++11
+ }
+ else
+ filter_map (map_fun);
}
const char Grob_array::type_p_name_[] = "ly:grob-array?";
Spanner *spanner (vsize i);
Grob *grob (vsize i) const { return grobs_.at (i); }
vsize size () const { return grobs_.size (); }
- bool empty () const;
+ bool empty () const { return grobs_.empty (); }
void remove_duplicates ();
- void clear ();
+ void clear () { grobs_.clear (); }
void add (Grob *x) { grobs_.push_back (x); }
- void set_array (vector<Grob *> const &src);
- vector<Grob *> &array_reference ();
- vector<Grob *> const &array () const;
+ void set_array (vector<Grob *> const &src) { grobs_ = src; }
+ vector<Grob *> &array_reference () { return grobs_; }
+ vector<Grob *> const &array () const { return grobs_; }
static SCM make_array ();
+
+ // Remove grobs that do not satisfy the predicate, leaving the order
+ // unchanged.
+ void filter (bool (*predicate) (const Grob *));
+
+ // Run a function on all grobs in this array. If the function returns null,
+ // remove the original grob, reducing the size of the array. If the function
+ // returns a Grob, replace the original grob with the returned Grob.
+ void filter_map (Grob * (*map_fun) (Grob *));
+
+ // Like src.filter_map (f), but store the result in this array instead of
+ // mutating the input.
+ void filter_map_assign (const Grob_array &src, Grob * (*map_fun) (Grob *));
};
return t.smobbed_copy ();
}
+static bool grob_is_live (const Grob *g)
+{
+ return g && g->is_live ();
+}
+
/*
This is all too hairy. We use bounded-by-me to make sure that some
columns are kept "alive". Unfortunately, when spanners are suicided,
{
Grob *me = unsmob<Grob> (grob);
- SCM bbm = me->get_object ("bounded-by-me");
- Grob_array *ga = unsmob<Grob_array> (bbm);
- if (!ga)
- return SCM_UNSPECIFIED;
-
- vector<Grob *> &array (ga->array_reference ());
-
- for (vsize i = array.size (); i--;)
- {
- Grob *g = array[i];
-
- if (!g || !g->is_live ())
- /* UGH . potentially quadratic. */
- array.erase (array.begin () + i);
- }
+ if (Grob_array *ga = unsmob<Grob_array> (me->get_object ("bounded-by-me")))
+ ga->filter (grob_is_live);
return SCM_UNSPECIFIED;
}
vector<Grob *> new_elts;
new_elts.insert (new_elts.end (), elts.begin (), elts.end ());
- SCM neighbors_scm = me->get_object ("neighbors");
- if (unsmob<Grob_array> (neighbors_scm))
- {
- vector<Grob *> &arr
- = unsmob<Grob_array> (neighbors_scm)->array_reference ();
- arr = new_elts;
- }
+ if (Grob_array *a = unsmob<Grob_array> (me->get_object ("neighbors")))
+ a->set_array (new_elts);
return Axis_group_interface::internal_calc_pure_relevant_grobs (me, "neighbors");
}
new_encompasses.push_back (g);
}
- SCM encompass_scm = me->get_object ("encompass-objects");
- if (unsmob<Grob_array> (encompass_scm))
- {
- vector<Grob *> &arr
- = unsmob<Grob_array> (encompass_scm)->array_reference ();
- arr = new_encompasses;
- }
+ if (Grob_array *a = unsmob<Grob_array> (me->get_object ("encompass-objects")))
+ a->set_array (new_encompasses);
}
Bezier
void
System::derived_mark () const
{
- if (!all_elements_->empty ())
- {
- Grob **ptr = &all_elements_->array_reference ()[0];
- Grob **end = ptr + all_elements_->size ();
- while (ptr < end)
- {
- scm_gc_mark ((*ptr)->self_scm ());
- ptr++;
- }
- }
+ const vector <Grob *> &arr = all_elements_->array ();
+ for (vsize i = arr.size (); i--;)
+ scm_gc_mark (arr[i]->self_scm ());
if (pscore_)
scm_gc_mark (pscore_->self_scm ());
%}
-\version "2.19.26" % necessary for upgrading to future LilyPond versions.
+\version "2.19.27" % necessary for upgrading to future LilyPond versions.
\header{
title = "A scale in LilyPond"
%}
-\version "2.19.26" % necessary for upgrading to future LilyPond versions.
+\version "2.19.27" % necessary for upgrading to future LilyPond versions.
\header{
title = "A scale in LilyPond"
d d | e e | f f |
}
<==>
- A = { c c | d d | }
- B = { d d | e e | }
- C = { e e | f f | }
+ A = { c c | d d }
+ B = { d d | e e }
+ C = { e e | f f }
@end verbatim
The last bar checks in a sequence are not copied to the result in
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: lilypond 2.19.26\n"
+"Project-Id-Version: lilypond 2.19.27\n"
"Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
"lilypond.bugs\n"
-"POT-Creation-Date: 2015-08-27 10:48+0100\n"
+"POT-Creation-Date: 2015-09-12 12:41+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "%d: %s"
msgstr ""
-#: grob.cc:492
+#: grob.cc:496
#, c-format
msgid "ignored infinite %s-offset"
msgstr ""
msgid "cannot end %s"
msgstr ""
-#: slur.cc:436
+#: slur.cc:431
#, c-format
msgid "Ignoring grob for slur: %s. avoid-slur not set?"
msgstr ""
msgid "weird stem size, check for narrow beams"
msgstr ""
-#: system.cc:202
+#: system.cc:195
#, c-format
msgid "Element count %d"
msgstr ""
-#: system.cc:513
+#: system.cc:506
#, c-format
msgid "Grob count %d"
msgstr ""
msgid "Undefined parent event class `~S'"
msgstr ""
-#: define-markup-commands.scm:1098
+#: define-markup-commands.scm:1102
msgid "no systems found in \\score markup, does it have a \\layout block?"
msgstr ""
-#: define-markup-commands.scm:2922
+#: define-markup-commands.scm:2926
#, scheme-format
msgid "Cannot find glyph ~a"
msgstr ""
-#: define-markup-commands.scm:3398
+#: define-markup-commands.scm:3402
#, scheme-format
msgid "no brace found for point size ~S "
msgstr ""
-#: define-markup-commands.scm:3399
+#: define-markup-commands.scm:3403
#, scheme-format
msgid "defaulting to ~S pt"
msgstr ""
-#: define-markup-commands.scm:3643
+#: define-markup-commands.scm:3647
#, scheme-format
msgid "not a valid duration string: ~a"
msgstr ""
-#: define-markup-commands.scm:3854
+#: define-markup-commands.scm:3858
#, scheme-format
msgid "not a valid duration string: ~a - ignoring"
msgstr ""
msgid "Music unsuitable for output-def"
msgstr ""
-#: lily-library.scm:904
+#: lily-library.scm:910
msgid ""
"Find the index between @var{start} and @var{end} (an integer)\n"
"which produces the closest match to @var{target-val} if\n"
"applied to function @var{getter}."
msgstr ""
-#: lily-library.scm:998
+#: lily-library.scm:1004
#, scheme-format
msgid "unknown unit: ~S"
msgstr ""
-#: lily-library.scm:1023
+#: lily-library.scm:1029
#, scheme-format
msgid "no \\version statement found, please add~afor future compatibility"
msgstr ""
Print two markups on top of each other.
Note: @code{\\combine} cannot take a list of markups enclosed in
-curly braces as an argument; the follow example will not compile:
-
-@example
-\\combine @{ a list @}
-@end example
+curly braces as an argument; for this purpose use @code{\\overlay} instead.
@lilypond[verbatim,quote]
\\markup {
(s2 (interpret-markup layout props arg2)))
(ly:stencil-add s1 s2)))
+(define-markup-command (overlay layout props args)
+ (markup-list?)
+ #:category align
+ "
+@cindex merging text
+
+Takes a list of markups combining them.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\fontsize #5
+ \\override #'(thickness . 2)
+ \\overlay {
+ \\draw-line #'(0 . 4)
+ \\arrow-head #Y #DOWN ##f
+ \\translate #'(0 . 4)\\arrow-head #Y #UP ##f
+ }
+}
+@end lilypond"
+ (apply ly:stencil-add (interpret-markup-list layout props args)))
+
;;
;; TODO: should extract baseline-skip from each argument somehow..
;;