to get sane spaces for titles.
* scm/page-layout.scm (ly:optimal-page-breaks): add
betweensystempadding also to fixed distance for the spring.
* lily/beam-concave.cc: new file, with new routines for concave
decisions. There are now two types of concaveness: 1. a sharp
logic decision forcing a beam horizontal, and 2. a number that
measures how concave beams are that are not caught by 1.
This fixes: morgenlied.ly and input/regression/beam-concave.ly
copyright = "Public Domain"
}
-\version "2.3.4"
+\version "2.3.16"
\include "nederlands.ly"
}
-\version "2.3.4"
+\version "2.3.16"
manuscriptBreak = { \break }
linewidth = #(* mm 160)
indent = 8\mm
interscoreline = 2.\mm
+ betweensystemspace = 15\mm
+ raggedbottom = ##t
}
modernAccidentals = {
ignoreMelismaOff = \unset ignoreMelismata
-firstVerse = \lyrics {
+firstVerse = \lyricmode {
\set stanza = "1."
Sü -- ßes Licht! Aus
dei -- ne Ro -- sen -- pracht, grüß __ ich __ dei -- ne Ro -- sen -- pracht.
}
-secondVerse = \lyrics {
+secondVerse = \lyricmode {
\set stanza = "2."
Ach, der Lie -- be sanf
-- tes We -- hen schwellt mir |
<g e>8( <es fis a> <d f b> <c e c'>) r8 r |
r8 c'( e,) f r a |
\once \override DynamicLineSpanner #'padding =#3
- r8_\> << { s8 s8-\! } << { fis( g)
+ r8 << { s8 s8 } << { fis(\> g)\!
} \\ { c,4 } >> >> r8 <e c g> <e c g> |
<d c a>4. r8 \clef bass <d b f> <d b f> |
e,16_" "_\markup { \bold\italic cresc. } g c g e g d gis b gis d gis |
<c g e c>8 <c e g> <c e g> <c e g> <c e g> <c e g> |
<c e g> r r <c, c,>8 r r\fermata \clef treble
}
+
\book {
- \score {
- << \time 6/8
- \new Staff <<
- \context Staff #(set-accidental-style 'modern)
- \melody >>
- \lyricsto "singer" \new Lyrics \firstVerse
- \lyricsto "singer" \new Lyrics \secondVerse
- \new PianoStaff <<
- \set PianoStaff.instrument = \markup {
- \bold
- \bigger\bigger\bigger\bigger \huge "2. " }
- \new Staff \pianoRH
- \new Staff \pianoLH
- >>
- >>
-
- \paper {
- \context {
- \Lyrics
- minimumVerticalExtent = #'(-1.0 . 0)
- }
- \context {
- \Score
- \override Beam #'thickness = #0.55
- \override SpacingSpanner #'spacing-increment = #1.0
- \override Slur #'height-limit = #1.5
- }
- \context {
- \PianoStaff
- \override VerticalAlignment #'forced-distance = #10
+ \score {
+ << \time 6/8
+ \new Staff <<
+ \context Staff #(set-accidental-style 'modern)
+ \melody >>
+ \lyricsto "singer" \new Lyrics \firstVerse
+ \lyricsto "singer" \new Lyrics \secondVerse
+ \new PianoStaff <<
+ \set PianoStaff.instrument = \markup {
+ \bold
+ \bigger\bigger\bigger\bigger \huge "2. " }
+ \new Staff \pianoRH
+ \new Staff \pianoLH
+ >>
+ >>
+
+ \paper {
+ \context {
+ \Lyrics
+ minimumVerticalExtent = #'(-1.0 . 0)
+ }
+ \context {
+ \Score
+ \override Beam #'thickness = #0.55
+ \override SpacingSpanner #'spacing-increment = #1.0
+ \override Slur #'height-limit = #1.5
+ }
+ \context {
+ \PianoStaff
+ \override VerticalAlignment #'forced-distance = #10
+ }
+ \context {
+ \Staff
+ minimumVerticalExtent = #'(-3. . 6)
+ }
+ inputencoding = "latin1"
}
- \context {
- \Staff
- minimumVerticalExtent = #'(-3. . 6)
+ \midi {
+ \tempo 4 = 70
}
- inputencoding = "latin1"
}
- \midi {
- \tempo 4 = 70
- }
-}
}
footer = "Mutopia-2001/04/27-xx"
}
-\version "2.3.4"
+\version "2.3.16"
dynamicUp = \override DynamicLineSpanner #'direction = #1
dynamicRevert = \revert DynamicLineSpanner #'direction
e2 r4 |
}
-lyricVerseOne = \lyrics {
+lyricVerseOne = \lyricmode {
Lei -- se fle -- hen mei -- ne Lie -- der
durch die Nacht zu dir;
in den stil -- len Hain her nie -- der,
fürch -- te, Hol -- de, nicht.
}
-lyricVerseTwo = \lyrics{
+lyricVerseTwo = \lyricmode{
Hörst die Nach -- ti -- gal -- len schla -- gen?
ach! sie fle -- hen dich,
mit der Tö -- ne sü -- "\ss en" Kla -- gen
jed -- es wei -- che Herz.
}
-lyricThrough = \lyrics{
+lyricThrough = \lyricmode{
La\ss auch dir die Brust be -- we -- gen
Lieb -- chen, hö -- re mich!
be -- bend harr' ich dir ent -- ge -- gen!
-\version "2.3.4"
+\version "2.3.16"
% #(ly:set-point-and-click 'line-column)
#(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.3.16"
%{
Header for Petites Preludes.
%}
-\version "2.3.4"
+\version "2.3.16"
#(set-global-staff-size 16)
-\version "2.3.4"
+\version "2.3.16"
\header {
title = "Romanzen"
%}
-\version "2.3.4"
+\version "2.3.16"
\include "mozart-hrn3-defs.ily"
\include "mozart-hrn3-allegro.ily"
#include "staff-symbol-referencer.hh"
bool
-is_concave_single_notes (Array<int> positions, Direction beam_dir)
+is_concave_single_notes (Array<int> const &positions, Direction beam_dir)
{
Interval covering;
covering.add_point (positions[0]);
return concave;
}
+Real
+calc_concaveness (Array<int> const &positions, Direction beam_dir)
+{
+ Real dy = positions.top () - positions[0];
+ Real slope = dy / Real (positions.size() - 1);
+ Real concaveness = 0.0;
+ for (int i = 1; i < positions.size() - 1; i++)
+ {
+ Real line_y = slope * i + positions[0];
+
+ concaveness += (beam_dir * (positions[i] - line_y)) >? 0.0;
+ }
+
+ concaveness /= positions.size () ;
+
+ /*
+ Normalize. For dy = 0, the slope ends up as 0 anyway, so the
+ scaling of concaveness doesn't matter much.
+ */
+ if (dy)
+ concaveness /= dy;
+ return concaveness;
+}
MAKE_SCHEME_CALLBACK (Beam, check_concave, 1);
SCM
return SCM_UNSPECIFIED;
- Array<int> positions;
+ Array<int> close_positions;
+ Array<int> far_positions;
for (int i= 0; i < stems.size (); i++)
{
/*
the beam.
*/
- Real pos = Stem::head_positions (stems[i])[-beam_dir];
+ Interval posns = Stem::head_positions (stems[i]);
- positions.push ((int) rint (pos));
+ close_positions.push ((int) rint (posns[beam_dir]));
+ far_positions.push ((int) rint (posns[-beam_dir]));
}
- if (is_concave_single_notes (positions, beam_dir))
+ if (is_concave_single_notes (far_positions, beam_dir))
{
Drul_array<Real> pos = ly_scm2interval (me->get_property ("positions"));
Real r = linear_combination (pos, 0.0);
}
else
{
- Real dy = positions.top () - positions[0];
- Real slope = dy / Real (positions.size() - 1);
- Real concaveness = 0.0;
- for (int i = 1; i < positions.size() - 1; i++)
- {
- Real line_y = slope * i + positions[0];
-
- concaveness += (beam_dir * (positions[i] - line_y)) >? 0.0;
- }
-
- concaveness /= positions.size () ;
-
- /*
- Normalize. For dy = 0, the slope ends up as 0 anyway, so the
- scaling of concaveness doesn't matter much.
- */
- if (dy)
- concaveness /= dy;
+ Real concaveness = (calc_concaveness (far_positions, beam_dir)
+ + calc_concaveness (close_positions, beam_dir))/2;
+
me->set_property ("concaveness", scm_from_double (concaveness));
}