spurious warning about non-parent contexts.
* lily/music-output-def.cc (assign_translator): \translator { }
for a Foo context implicitly redefines \FooContext.
* input/mutopia/F.Schubert/morgenlied.ly (pianoLH): many layout
fixes.
* lily/slur.cc (brew_molecule): don't use stafflinethickness
doubly in slur weight.
* input/regression/prefatory-spacing-matter.ly (TODO): add clef :|
combination.
* scm/define-grobs.scm (all-grob-descriptions): change clef -
staffbar distance.
* scripts/lilypond.py (global_latex_preamble): crank down size of
the margins. Now there is a 12 mm top and bottom margin, which
should correspond with the printable area of modern printers.
* mf/feta-accordion.mf (accreg_pen): remove circled-R, BB and SB
signs. Use \markup instead.
(accreg_pen): tweak for accordeon asterisk.
+2004-01-01 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/accidental-engraver.cc (number_accidentals): remove
+ spurious warning about non-parent contexts.
+
+ * lily/music-output-def.cc (assign_translator): \translator { }
+ for a Foo context implicitly redefines \FooContext.
+
+ * input/mutopia/F.Schubert/morgenlied.ly (pianoLH): many layout
+ fixes.
+
+ * lily/slur.cc (brew_molecule): don't use stafflinethickness
+ doubly in slur weight.
+
+ * input/regression/prefatory-spacing-matter.ly (TODO): add clef :|
+ combination.
+
+ * scm/define-grobs.scm (all-grob-descriptions): change clef -
+ staffbar distance.
+
+ * scripts/lilypond.py (global_latex_preamble): crank down size of
+ the margins. Now there is a 12 mm top and bottom margin, which
+ should correspond with the printable area of modern printers.
+
+ This enlarges the music height of the printable page a little.
+
+ * mf/feta-accordion.mf (accreg_pen): remove circled-R, BB and SB
+ signs. Use \markup instead.
+ (accreg_pen): tweak for accordeon asterisk.
+
2003-12-31 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* lily/melisma-engraver.cc (try_music): use melisma_busy()
depth = ../../..
-examples=standchen
-mutopia-examples=morgenlied
+examples=morgenlied
LOCALSTEPMAKE_TEMPLATES=ly mutopia
include $(depth)/make/stepmake.make
not be in the PD - but I am assuming there are no notable ones in
this small piece.
- The original compresses the entire music onto a single page, in 4 systems."
+ The original compresses the entire music onto a single page, in 4
+ systems. Lily does so too if you tune down spacing-increment, but
+ chooses line breaks differently.
+
+"
}
\version "2.1.3"
-
+manuscriptBreak = { \break }
\paper {
staffheight = 6.0 \mm
#(define fonts (scale-font-list (/ (* 6 mm) (* 20 pt)) ))
\include "params-init.ly"
- linewidth = #(* mm 159)
+ linewidth = #(* mm 160)
indent = 8\mm
}
+modernAccidentals = {
+ \property Staff.extraNatural = ##f
+ \property Staff.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 3))
+ \property Staff.autoCautionaries = #'()
+}
-melody = \notes \relative c'' \repeat volta 2 \context Voice = singer {
+
+melody = \notes \relative c'' \repeat volta 2 \context Voice = singer {
\time 6/8
\autoBeamOff
s1*0^\markup { \bold \bigger\bigger { \hspace #-3.0 Lieblich, etwas geschwind } }
firstVerse = \lyrics {
\property LyricsVoice . stanza = "1."
- Sü -- ßes Licht! Aus gol -- de -- nen Pfor -- ten brichst du __ \break
- sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit \break
- ge -- heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \break
+ Sü -- ßes Licht! Aus gol -- de -- nen Pfor -- ten brichst du __ \manuscriptBreak
+ sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit \manuscriptBreak
+ ge -- heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \manuscriptBreak
dei -- ne Ro -- sen -- pracht, grüß ich __ dei -- ne Ro -- sen -- pracht.
}
g16(_\p fis a g fis g f e d c b a ) |
<g e>8( <es fis a> <d f b> <c e c'>) r8 r |
r8 c'( e,) f r a |
- \property Voice.DynamicLineSpanner \set #'padding =#3
- r8_\> << { s8 s8-\! } << { fis( g)\!} \\ { c,4 } >> >> r8 <e c g> <e c g> |
+ \once \property Voice.DynamicLineSpanner \set #'padding =#3
+ 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 { \italic cresc } g c g e g d gis b gis d g |
+ e,16_" "_\markup { \italic cresc } g c g e g d gis b gis d gis |
c, e a e c e a,-\f d fis d a d |
b d g d b g r4\fermata \clef treble g''8 |
as4.( g 4.) | fis4. r4 <d g>8 ( |
}
pianoLH = \notes \relative c'' \repeat volta 2 {
+
g16( fis a g fis g f e d c b a) |
\clef bass g4.( c,8) r r
\clef treble r4 <bes' c>8( <a c>) r <f c'> |
<< \time 6/8
\addlyrics
- \new Staff { \melody }
+ \new Staff {
+ \context Staff \modernAccidentals
+ \melody }
\new Lyrics <<
\context LyricsVoice = "singer-1" \firstVerse
\context LyricsVoice = "singer-2" \secondVerse
>>
- \new PianoStaff <<
+ \new PianoStaff <<
\property PianoStaff.instrument = \markup {
\bold
\huge "2. " }
\paper {
\translator {
- \LyricsContext
+ \LyricsVoiceContext
minimumVerticalExtent = ##f
- LyricText \set #'font-size = #1.5
+ LyricText \set #'font-size = #1.0
}
\translator {
\ScoreContext
- SpacingSpanner \set #'common-shortest-duration = #(ly:make-moment 1 8)
+ Beam \override #'thickness = #0.6
+ SpacingSpanner \set #'spacing-increment = #1.0
}
\translator { \PianoStaffContext
VerticalAlignment \override #'forced-distance = #10
\version "1.9.8"
\header {
-texidoc = "Prefatory spacing.
-TODO: Show all common combinations to check for spacing anomalies.
-"
+ texidoc = "Distances between prefatory items (eg. clef, bar, etc.)
+ are done using engraving standard distances. These distances
+ depend on which items are combined."
+
}
\score { \notes \relative c'' {
\property Staff.instrument = "fobar"
\bar "||:"
\key cis \major
- cis4 cis4 cis4 cis4 \clef bass cis4 cis4 cis4
+ cis4 cis4 cis4 cis4 \clef bass cis,1
+ \clef treble
+ \bar ":|"
}
\paper { raggedright = ##t}
}
*/
static int
-number_accidentals (SCM sig, Music *, Pitch *pitch, SCM curbarnum, SCM lazyness,
+number_accidentals_from_sig (SCM sig, Music *, Pitch *pitch, SCM curbarnum, SCM lazyness,
bool ignore_octave_b)
{
int n = pitch->get_notename ();
warning (_f ("Accidental typesetting list must begin with context-name: %s",
ly_scm2string (ly_car (accidentals)).to_str0 ()));
- while (gh_pair_p (accidentals) && origin)
+ for (; gh_pair_p (accidentals) && origin; accidentals = gh_cdr (accidentals))
{
// If pair then it is a new accidentals typesetting rule to be checked
- if (gh_pair_p (ly_car (accidentals)))
+ SCM rule = gh_car (accidentals);
+ if (gh_pair_p (rule))
{
- SCM type = gh_caar (accidentals);
- SCM lazyness = gh_cdar (accidentals);
+ SCM type = gh_car (rule);
+ SCM lazyness = gh_cdr (rule);
SCM localsig = origin->get_property ("localKeySignature");
bool same_octave_b =
if (same_octave_b || any_octave_b)
{
- int n = number_accidentals
+ int n = number_accidentals_from_sig
(localsig, note, pitch, curbarnum, lazyness, any_octave_b);
diff = diff || (n < 0);
number = max (number, abs (n));
/*
if symbol then it is a context name. Scan parent contexts to find it.
*/
- else if (gh_symbol_p (ly_car (accidentals)))
+ else if (gh_symbol_p (rule))
{
- SCM context =ly_car (accidentals);
- while (origin && !origin->is_alias (context))
- origin = origin->daddy_trans_;
+ Translator_group * dad = origin;
+ while (dad && !dad->is_alias (rule))
+ dad = dad->daddy_trans_;
- if (!origin)
- warning (_f ("Symbol is not a parent context: %s. Ignored",
- ly_symbol2string (context).to_str0 ()));
+ if (dad)
+ origin = dad;
}
- else warning (_f ("Accidental typesetting must be pair or context-name: %s",
- ly_scm2string (ly_car (accidentals)).to_str0 ()));
-
- accidentals = ly_cdr (accidentals);
+ else warning (_f ("Accidental rule must be pair or context-name; Found %s",
+ ly_scm2string (rule).to_str0 ()));
}
+
return diff ? -number : number;
}
{
int next_idx = idx+1;
while (next_idx < elems.size() &&
- extents[next_idx].is_empty ()
- )
+ extents[next_idx].is_empty () )
next_idx++;
Grob *l = elems[idx];
if (r)
{
if (type == ly_symbol2scm ("extra-space"))
- offsets[next_idx] = extents[idx][RIGHT] + distance;
+ offsets[next_idx] = extents[idx][RIGHT] + distance
+ - extents[next_idx][LEFT];
+ /* should probably junk minimum-space */
else if (type == ly_symbol2scm("minimum-space"))
offsets[next_idx] = extents[idx][RIGHT] >? distance;
}
assert (tp);
translator_tab_->set (tp->type_name_, transdef);
+
+ String nm = ly_symbol2string (tp->type_name_) + "Context";
+
+
+ scm_module_define (scope_, ly_symbol2scm (nm.to_str0()), transdef);
}
/*
}
| music_output_def_body translator_spec_block {
$$->assign_translator ($2);
+
}
| music_output_def_body tempo_event {
/*
return SCM_EOL;
}
- Real thick = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) *
- gh_scm2double (me->get_grob_property ("thickness"));
+ Real base_thick = gh_scm2double (me->get_grob_property ("thickness"));
+
+ Real thick = base_thick *
+ me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+
+ Real ss = Staff_symbol_referencer::staff_space (me);
Bezier one = get_curve (me);
// get_curve may suicide
if (gh_number_p (d))
a = Lookup::dashed_slur (one, thick, thick * gh_scm2double (d));
else
- a = Lookup::slur (one, get_grob_direction (me) * thick, thick);
+ a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
+ thick);
return a.smobbed_copy ();
}
Spanner * tie_column_;
-
protected:
virtual void stop_translation_timestep ();
virtual void start_translation_timestep ();
virtual void acknowledge_grob (Grob_info);
virtual bool try_music (Music*);
+ virtual void process_music ();
virtual void process_acknowledged_grobs ();
void typeset_tie (Grob*);
public:
return true;
}
+void
+Tie_engraver::process_music ()
+{
+ if (event_ && to_boolean (get_property ("automaticMelismata")))
+ daddy_trans_->set_property ("tieMelismaBusy", SCM_BOOL_T);
+}
+
void
Tie_engraver::acknowledge_grob (Grob_info i)
{
Tie_engraver::start_translation_timestep ()
{
if (to_boolean (get_property ("automaticMelismata")))
- daddy_trans_->set_property ("tieMelismaBusy",
- gh_bool2scm (heads_to_tie_.size ()));
+ daddy_trans_->set_property ("tieMelismaBusy",
+ gh_bool2scm (heads_to_tie_.size ()));
}
\type "Engraver_group_engraver"
\name Lyrics
\description "Typesets lyrics."
+
%% To get folded repeats right.
\consists Vertical_align_engraver
-% \consistsend "Hara_kiri_engraver"
minimumVerticalExtent = ##f
extraVerticalExtent = ##f
verticalExtent = ##f
message "z"&str $ &"l = ("&decimal x.$.l&", "&decimal y.$.l&"); z"&str $ &"r = ("&decimal x.$.r&", "&decimal y.$.r&");";
enddef;
-%fet_beginchar("accTEST", "accTEST", "accTEST")
-% set_char_box(.4(4 staff_space#), .4(4 staff_space#), 0, 2.4staff_space#);
-% def_some_vars;
-% penlabels(10, 11, 12, 13, 14);
-% penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
-%fet_endchar;
-
-fet_beginchar("accSB", "accSB", "accSB")
- set_char_box(.4(4 staff_space#), .4(4 staff_space#), 0, 2.4staff_space#);
- def_some_vars;
- def_B(.35width, .7height);
-
- %print_penpos (10);
- %print_penpos (11);
- %print_penpos (12);
- %print_penpos (13);
- %print_penpos (14);
- penlabels(10, 11, 12, 13, 14);
- penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
-
- penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
- penstroke z18e--z19e;
- pickup pencircle scaled .5thick;
- drawdot (.37width, .10thick);
- currentpicture := currentpicture shifted(.40width, 0);
-
- def_S(.35width, .7height);
- penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9);
- filldraw z1r--z8r--z8l--subpath(t, 1) of bue--cycle;
- filldraw subpath(t, 1) of bueoverst--z7l--z9r--z9l--cycle;
- penstroke z1e{down}..z2e{right}..z3e
- ..z4e
- ..z5e..z6e{right}...z7e{down};
- pickup pencircle scaled .5thick;
- drawdot (.37width, .10thick);
- currentpicture := currentpicture shifted (-.40width, -.85height);
- draw (-.5width, 0)--(.5width, 0)--(.5width, -height)
- --(-.5width, -height)--(-.5width, 0);
- currentpicture := currentpicture shifted (0, 2.4staff_space);
-fet_endchar;
-
-fet_beginchar("accBB", "accBB", "accBB")
- set_char_box(.4(4 staff_space#), .4(4 staff_space#), 0, 2.4staff_space#);
- def_some_vars;
- def_B(.35width, .7height);
-
- penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e;
-
- penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
- penstroke z18e--z19e;
- penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9);
- pickup pencircle scaled .5thick;
- drawdot(.37width, .10thick);
- currentpicture := currentpicture shifted (.40width, 0);
- penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e;
- penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
- penstroke z18e--z19e;
- drawdot(.37width, .10thick);
- currentpicture := currentpicture shifted(-.40width, -.85height);
- draw (-.5width, 0)--(.5width, 0)--(.5width, -height)
- --(-.5width, -height)--(-.5width, 0);
- penlabels(10, 11, 12, 13, 14, 15, 16, 17, 18, 19 );
- currentpicture := currentpicture shifted (0, 2.4staff_space);
-fet_endchar;
-
%%% strange turning path.
fet_beginchar("accOldEE", "accOldEE", "accOldEE")
show w;
show h;
r = staff_space;
- lr = .3staff_space;
- ir = .6staff_space;
- pickup accreg_pen;
- draw fullcircle scaled 2r;
- pickup penrazor;
- filldraw fullcircle scaled lr;
- z1 = (ir, 0);
- z2 = (0, 0) + ir*(dir 45);
- z3 = (0, ir);
+ lr = .4 staff_space - stafflinethickness;
+ ir = .6 staff_space;
+
+ z1 = (0,0);
+ z2 = (0, ir);
+ penpos1 (0,0);
+ penpos2 ( .05 staff_space + .5 stafflinethickness,0);
+
+ penlabels(1,2,3);
+
numeric pp;
+ pickup pencircle scaled blot_diameter;
for pp := 0 step 45 until 360:
filldraw fullcircle scaled lr shifted (ir*(dir pp));
- endfor;
- for pp := 0 step 45 until 360:
- filldraw ((0, 0)--(.2lr, ir)--(-.2lr, ir)--cycle) rotated pp;
+ filldraw (z1r--z1l--z2l--z2r--cycle) rotated pp;
endfor
- currentpicture := currentpicture shifted (0, r);
-fet_endchar;
-fet_beginchar("accOldEES", "accOldEES", "accOldEES")
- set_char_box(staff_space#, staff_space#, 0, 2staff_space#);
- save r, shy;
- r = staff_space;
- shy = .3;
pickup accreg_pen;
draw fullcircle scaled 2r;
- currentpicture := currentpicture shifted (w/2, shy*h);
- save thin, thick, sw, ch, cw, mb, mt;
- ch = .6h;
- cw = .8w;
- % URG. smaller sizes should be wider and fatter
- %thin = .05cw;
- %thick = .17w;
- save bx,hx; 4hx+bx=1.15; 10hx+bx=1;
- fatten:=designsize*hx+bx*1.2;
- thick:= .17w*fatten;
-
- % urg: mustn't ever go thinner than blot!
- %thin = 0.05staff_space;
- %blot#:=.4pt#;
- thin#:= blot_diameter#;
- define_pixels (thin);
+ pickup penrazor;
+ filldraw fullcircle scaled lr;
- hs = 0.4staff_space;
+ currentpicture := currentpicture shifted (0, r);
- mb = .53; mt = .47;
- sw = .8thick;
- z1 = (0, ch-.5thin); penpos1 (thin, -90);
- z2 = (.7cw, y1); penpos2 (thin, -90);
- z3 = (cw, (mb+.5mt)*ch); penpos3(thick, -180);
- z4 = (.65cw, mb*ch); penpos4(thin, 90);
- z5 = (sw+thick, mb*ch); penpos5(thin, 90);
- z6 = (.9cw, .5mb*ch); penpos6(thick, 0);
- z7 = (1.2cw, 0); penpos7(thin, 90);
- z8 = (1.3cw, .2mb*ch); penpos8(thin, 180);
- penlabels(1, 2, 3, 4, 5, 6, 7, 8);
- %%AAARG
- pickup pencircle scaled 0.001pt;
- filldraw (0, 0)--(0, thin)--(sw, thin)--(sw, ch-thin)
- --(sw+thick, ch-thin)--(sw+thick, thin)
- --(2sw+thick, thin)--(2sw+thick, 0)--cycle;
+fet_endchar;
- penstroke z1e--z2e{right}..z3e..z4e{left}--z5e;
- penstroke z4e{right}..z6e{down}..z7e{right}..z8e{up};
- currentpicture := currentpicture shifted (-w/2, -shy*h);
- currentpicture := currentpicture shifted (0, r);
-fet_endchar;
fet_endgroup("accordion")
%input feta-banier;
%input feta-slag;
%input feta-eindelijk;
-input feta-klef;
+%input feta-klef;
% input feta-toevallig;
% input feta-schrift;
% input feta-haak;
% input feta-timesig;
% input feta-pendaal;
-% input feta-accordion;
+ input feta-accordion;
% input feta-solfa;
(break-align-symbol . clef)
(break-visibility . ,begin-of-line-visible)
(space-alist . ((ambitus . (extra-space . 2.0))
- (staff-bar . (minimum-space . 3.7))
+ (staff-bar . (extra-space . 0.7))
(key-signature . (minimum-space . 4.0))
(time-signature . (minimum-space . 4.2))
(first-note . (minimum-space . 5.0))
linewidth = '597pt'
else:
linewidth = '%d%s' % (maxlw, unit)
- s = s + '\geometry{%swidth=%s%s,headheight=2mm,footskip=2mm,%s}\n' % (papersize, linewidth, textheight, orientation)
+ s = s + '\geometry{%swidth=%s%s,includehead,bottom=12mm,headsep=2mm,top=12mm,headheight=2mm,footskip=2mm,%s}\n' % (papersize, linewidth, textheight, orientation)
if 'twoside' in extra['latexoptions'] :