+2003-05-21 Juergen Reuter <reuter@ipd.uka.de>
+
+ * lily/gregorian-ligature-engraver.cc,
+ lily/vaticana-ligature-engraver.cc,
+ lily/include/gregorian-ligature.hh, ly/gregorian-init.ly,
+ mf/parmesan-heads.mf: various semivocalis related bugfixes
+
+ * input/bugs/ligatures.ly: new file demonstrating problems with
+ ligatures
+
2003-05-21 Heikki Junes <hjunes@cc.hut.fi>
* lilypond-mode.el,
--- /dev/null
+\version "1.7.17"
+\header {
+ title = "Puer natus est nobis"
+ subtitle = "Antiphona ad introitum VII"
+ texidoc = "This file pretty nicely demonstrates what still does
+not work among ligatures: (i) horozontal spacing is totally broken as
+soon as raggedright mode is on (say \"raggedright = ##f\" in the paper
+block to see); (ii) the clef does not show on each line; (iii) lily
+crashes when removing Stem_engraver, but still using Slur_engraver
+(this is useful needed for the \addlyrics feature when no slurs are to
+be typeset); (iv) episem causes a syntax error when applied inside of
+ligatures (but they are useful only inside...); (v) support for
+augmentum dots is missing; (vi) accidentals must be placed before the
+ligature (not demonstrated in this example)"
+
+}
+
+\include "paper26.ly"
+\include "gregorian-init.ly"
+
+cantus = \notes \transpose c c {
+ \[ g4
+ (
+ \pes
+ )
+ d'
+ \]
+ d'
+ \[ d'
+ (
+ \pes e' \flexa
+ )
+ d'
+ \]
+ c'
+ \[ c'
+ (
+ c'
+ )
+ c'
+ \]
+ \[ d'
+ (
+ \flexa c' e' \flexa
+ )
+ d' d'
+ \]
+ \divisioMaior
+ \[ g
+ (
+ \pes
+ )
+ d'
+ \]
+ \[ d'
+ (
+ \pes e' \flexa
+ )
+ d'
+ \]
+ \[ c'
+ (
+ \flexa
+ )
+ b
+ \]
+ a
+ \[ c'
+ (
+ c' \pes
+ )
+ d'
+ \]
+ c' c'
+ \[ c'
+ (
+ \pes d' \flexa c'
+ )
+ c'
+ \]
+ \[ g
+ (
+ \pes a \flexa
+ )
+ g
+ \]
+ \divisioMaxima
+ g a c' \[ b
+ (
+ \pes d' e' \pes
+ )
+ f'
+ \]
+ \[ d'
+ (
+ \flexa
+ )
+ c'
+ \]
+ c'
+ \divisioMinima
+ c' c'
+ \[ d'
+ (
+ \flexa c' e' \flexa
+ )
+ d'
+ \]
+ \[ c'
+ (
+ \flexa
+ )
+ b
+ \]
+ \[ c'
+ (
+ c'
+ )
+ c'
+ \]
+ \[ c'
+ (
+ \flexa a c' \flexa b \virga c'
+ \inclinatum \deminutum b \inclinatum \deminutum
+ )
+ a
+ \]
+ \[ b
+ (
+ \flexa
+ )
+ a
+ \]
+ \divisioMaxima
+ \[ c'
+ (
+ \flexa
+ )
+ b
+ \]
+ c'
+ \[ c'
+ (
+ \pes
+ e'
+ \flexa
+ )
+ d'
+ \]
+ c'
+ \[ c'
+ (
+ c'
+ )
+ c'
+ \]
+ c'
+ \[ c'
+ (
+ c'
+ )
+ c'
+ \]
+ \[ c'
+ (
+ \pes
+ d' \flexa b \virga c'
+ \inclinatum \deminutum b \inclinatum \deminutum
+ )
+ a
+ \]
+ \[ b
+ (
+ \flexa
+ )
+ a
+ \]
+ \divisioMaior
+ \[ c'
+ (
+ \pes
+ )
+ e'
+ \]
+ d'
+ \[ g
+ (
+ \pes \semivocalis % epiphonus
+ )
+ c'
+ \]
+ c'
+ \[ c'
+ (
+ c' c' \flexa
+ )
+ a
+ \]
+ a
+ \[ %{ FIXME: \episemInitium%} a
+ (
+ \pes c' \flexa %{ FIXME: \episemFinis%} a \quilisma b
+ )
+ c'
+ \]
+ \[ g
+ (
+ \pes a \flexa
+ )
+ g
+ \]
+ g
+ \finalis
+}
+
+verba = \context Lyrics = verba \lyrics {
+ Pu- er na- tus est no- bis,
+ et fi- li- us da- tus est no- bis:
+ cu- ius im- pe- ri- um
+ su- per hu- me- rum e- ius:
+ et vo- ca- bi- tur no- men e- ius,
+ mag- ni con- si- li- i An- ge- lus.
+ Can- ta- te Do- mi- no can- ti- cum no- vum:
+ qui- a mi- ra- bi- li- a fe- cit.
+}
+
+\score {
+ \context StaffGroup <
+ \context VaticanaStaff <
+ \context VaticanaVoice <
+ \addlyrics
+ \cantus
+ \verba
+ >
+ >
+% \context Staff <
+% \cantus
+% >
+ >
+ \paper {
+ stafflinethickness = \staffspace / 5.0
+ linewidth = 137.0
+% width = 137.0
+ indent = 0.0
+ raggedright = ##f
+ packed = ##t
+
+% width = 15.0 \cm %%% no effect?
+% gourlay_maxmeasures = 30.
+% gourlay_maxmeasures = 1. %%% no effect?
+% arithmetic_basicspace = 3.8
+% arithmetic_basicspace = 0.0 %%% no effect?
+% arithmetic_multiplier = 8.\pt
+% arithmetic_multiplier = 0.\pt %%% no effect?
+%
+ \translator {
+ \VoiceContext
+ \name VaticanaVoice
+ \alias Voice
+
+ % Can not `\remove "Slur_engraver"', since \addlyrics needs
+ % slurs working. Hence, set slurs transparent instead.
+ Slur \override #'transparent = ##t
+
+ % N.B.: Warnings of the type "Degenerate bow: infinite steepness
+ % reqd" arise from the fact that all noteheads of a ligature are
+ % in the same paper column. Therefore, the (transparent) slurs
+ % often start and end in the same column, producing the above
+ % warning. TODO: supress this warning; we need slurs only for
+ % \addlyrics, not for printing.
+
+ % `\remove "Stem_engraver"' currently produces a crash (see
+ % below). Hence, set stems transparent instead.
+ Stem \set #'transparent = ##t
+
+%{
+
+FIXME:
+
+When removing Stem_engraver from VoiceContext (but still using
+Slur_engraver), lily will crash while trying to typeset slurs, since
+`()' is not a valid stem:
+
+In unknown file:
+ ?: 0* [Slur::after_line_breaking #<Grob Slur >]
+ ?: 1* [#<procedure #f (slur dir)> #<Grob Slur > -1]
+In /home/reuter/project/lilypond-1.7/share/lilypond/scm/slur.scm:
+ 43: 2* [not ...
+ 43: 3* [attached-to-stem #<Grob Slur > -1]
+ 10: 4 (let* ((note-columns #) (col #) (stem #)) (and (eq? col #) stem ...))
+ ...
+ 16: 5 [ly:get-grob-property () heads]
+
+/home/reuter/project/lilypond-1.7/share/lilypond/scm/slur.scm:16:6: In procedure ly_get_grob_property in expression (ly:get-grob-property stem (quote heads)):
+/home/reuter/project/lilypond-1.7/share/lilypond/scm/slur.scm:16:6: Wrong type argument in position 1 (expecting grob): ()
+
+%}
+
+ \remove Ligature_bracket_engraver
+ \consists Vaticana_ligature_engraver
+ NoteHead \set #'style = #'vaticana_punctum
+ Script \set #'padding = #0.0
+
+ % prepare TextSpanner for \episem{Initium|Finis} use
+ TextSpanner \set #'type = #'line
+ TextSpanner \set #'edge-height = #'(0 . 0)
+ TextSpanner \set #'padding = #0.5
+ TextSpanner \set #'edge-text = #'("" . "")
+ }
+ \translator {
+ \VoiceContext
+ \name GregorianTransciptionVoice
+ \alias Voice
+ Stem \set #'transparent = ##t
+ % \remove "Stem_engraver"
+ % Slur \override #'transparent = ##t
+ \remove "Slur_engraver"
+ }
+ \translator {
+ \StaffContext
+ \name GregorianTranscriptionStaff
+ \alias Staff
+ \accepts GregorianTranscriptionVoice
+ BarLine \override #'transparent = ##t
+ }
+ \translator {
+ \StaffContext
+ \name VaticanaStaff
+ \alias Staff
+ \accepts VaticanaVoice
+ \remove Bar_engraver
+ \consists Custos_engraver
+ clefGlyph = #"clefs-vaticana_do"
+ centralCPosition = #0
+ clefPosition = #1
+ clefOctaviation = #0
+ StaffSymbol \set #'line-count = #4
+ StaffSymbol \set #'width = #60.0 % FIXME: unit should be \linewidth
+ TimeSignature \set #'transparent = ##t
+ KeySignature \set #'style = #'vaticana
+ Accidental \set #'style = #'vaticana
+ Custos \set #'style = #'vaticana
+ Custos \set #'neutral-position = #3
+ Custos \set #'neutral-direction = #-1
+ Custos \set #'adjust-if-on-staffline = ##t
+ }
+ \translator {
+ \HaraKiriStaffContext
+ \accepts VaticanaVoice
+ \accepts GregorianTranscriptionVoice
+ }
+ \translator {
+ \ScoreContext
+ \accepts VaticanaStaff
+ \accepts GregorianTranscriptionStaff
+ \remove Bar_number_engraver
+% SpacingSpanner \set #'spacing-increment = #0.5
+ timing = ##f
+
+ % Don't do this exception for transcription -- it will produce
+ % additional space
+ barAlways = ##t
+% skipBars = ##t
+ }
+ }
+}
fix_prefix ("ascendens", ASCENDENS, current_set, min_set, max_set, primitive);
fix_prefix ("oriscus", ORISCUS, current_set, min_set, max_set, primitive);
fix_prefix ("quilisma", QUILISMA, current_set, min_set, max_set, primitive);
- fix_prefix ("deminutus", DEMINUTUM, current_set, min_set, max_set, primitive);
- fix_prefix ("semivocalis", SEMIVOCALIS, current_set, min_set, max_set, primitive);
+ fix_prefix ("deminutum", DEMINUTUM, current_set, min_set, max_set, primitive);
fix_prefix ("cavum", CAVUM, current_set, min_set, max_set, primitive);
fix_prefix ("linea", LINEA, current_set, min_set, max_set, primitive);
fix_prefix ("pes_or_flexa", LINEA, current_set, min_set, max_set, primitive);
(ORISCUS * to_boolean (primitive->get_grob_property ("oriscus"))) |
(QUILISMA * to_boolean (primitive->get_grob_property ("quilisma"))) |
(DEMINUTUM * to_boolean (primitive->get_grob_property ("deminutum"))) |
- (SEMIVOCALIS * to_boolean (primitive->get_grob_property ("semivocalis"))) |
(CAVUM * to_boolean (primitive->get_grob_property ("cavum"))) |
(LINEA * to_boolean (primitive->get_grob_property ("linea"))) |
(PES_OR_FLEXA * to_boolean (primitive->get_grob_property ("pes-or-flexa")));
/* check: ascendens and descendens exclude each other; same with
- auctum and diminutum */
+ auctum and deminutum */
if (prefix_set & DESCENDENS)
{
fix_prefix_set (&prefix_set,
primitive);
}
- /* check: semivocalis must occur in combination with and only with
- pes or flexa */
- if (prefix_set & SEMIVOCALIS)
- {
- fix_prefix_set (&prefix_set,
- SEMIVOCALIS | PES_OR_FLEXA,
- SEMIVOCALIS | PES_OR_FLEXA,
- primitive);
- }
- /* check: inclinatum may be prefixed with auctum or diminutum only */
+ /* check: inclinatum may be prefixed with auctum or deminutum only */
if (prefix_set & INCLINATUM)
{
fix_prefix_set (&prefix_set,
INCLINATUM | AUCTUM | DEMINUTUM,
primitive);
}
+ /* check: semivocalis (deminutum but not inclinatum) must occur in
+ combination with and only with pes or flexa */
+ else if (prefix_set & DEMINUTUM)
+ {
+ fix_prefix_set (&prefix_set,
+ DEMINUTUM | PES_OR_FLEXA,
+ DEMINUTUM | PES_OR_FLEXA,
+ primitive);
+ }
/* check: cavum and linea (either or both) may be applied only
upon core punctum */
#define ORISCUS 0x0040 // attribute "\oriscus"
#define QUILISMA 0x0080 // attribute "\quilisma"
#define DEMINUTUM 0x0100 // attribute "\deminutum"
-#define SEMIVOCALIS 0x0100 // attribute "\semivocalis"
#define CAVUM 0x0200 // attribute "\cavum"
#define LINEA 0x0400 // attribute "\linea"
#define PES_OR_FLEXA 0x0800 // operator "\~"
{
Real next_distance = distance;
if (primitive)
- {
- // determine width of previous head and x-offset
+ { // determine width of previous head and x-offset
Real head_width;
Real x_offset;
bool is_stacked;
+
+ // upper head of pes is stacked upon lower head of pes ...
is_stacked = context_info & PES_UPPER;
+
+ // ... unless this note starts a flexa
if (context_info & FLEXA_LEFT)
is_stacked = false;
- if (!String::compare (glyph_name, "vaticana_cephalicus") &&
- !(context_info & PES_LOWER))
- is_stacked = true;
+
+ // auctum head is never stacked upon preceding note
if (context_info & AUCTUM)
is_stacked = false;
+
+ // semivocalis head of epiphonus or cephalicus is stacked upon
+ // preceding head
+ if (!String::compare (glyph_name, "vaticana_plica"))
+ is_stacked = true; // semivocalis head of epiphonus
+ if (!String::compare (glyph_name, "vaticana_reverse_plica"))
+ if (context_info & PES_LOWER)
+ {} // initio debilis => not stacked
+ else
+ is_stacked = true; // semivocalis head of cephalicus
+
if (is_stacked)
{
/*
- * This head is stacked upon another one; hence, it does not
- * contribute to the total width of the ligature, hence its
- * width is assumed to be 0.0. Moreover, it is shifted to
- * the left by its width such that the right side of this
- * and the other head are horizontally aligned.
+ * This head is stacked upon the previous one; hence, it
+ * does not contribute to the total width of the ligature,
+ * and its width is assumed to be 0.0. Moreover, it is
+ * shifted to the left by its width such that the right side
+ * of this and the other head are horizontally aligned.
*/
head_width = 0.0;
x_offset = join_thickness -
if (prefix_set & AUCTUM)
glyph_name = "solesmes_stropha_aucta";
else glyph_name = "solesmes_stropha";
- else if (prefix_set & SEMIVOCALIS)
- if (pitch > prev_pitch)
- glyph_name = "vaticana_epiphonus";
- else glyph_name = "vaticana_cephalicus";
else if (prefix_set & INCLINATUM)
if (prefix_set & AUCTUM)
glyph_name = "solesmes_incl_auctum";
glyph_name = "solesmes_incl_parvum";
else
glyph_name = "vaticana_inclinatum";
+ else if (prefix_set & DEMINUTUM)
+ if (pitch > prev_pitch)
+ {
+ prev_glyph_name = "vaticana_epiphonus";
+ glyph_name = "vaticana_plica";
+ }
+ else
+ {
+ prev_glyph_name = "vaticana_cephalicus";
+ glyph_name = "vaticana_reverse_plica";
+ }
else if (prefix_set & (CAVUM | LINEA))
if ((prefix_set & CAVUM) && (prefix_set & LINEA))
glyph_name = "vaticana_linea_punctum_cavum";
glyph_name = "solesmes_auct_asc";
else
glyph_name = "solesmes_auct_desc";
- else if (prefix_set & DEMINUTUM)
- glyph_name = "vaticana_plica";
else if ((prefix_set & PES_OR_FLEXA) &&
(context_info & PES_LOWER) &&
(context_info & FLEXA_RIGHT))
\once \property Voice.NoteHead \override #'pes-or-flexa = ##t
flexa =
\once \property Voice.NoteHead \override #'pes-or-flexa = ##t
-semivocalis =
- \once \property Voice.NoteHead \override #'semivocalis = ##t
oriscus =
\once \property Voice.NoteHead \override #'oriscus = ##t
quilisma =
\once \property Voice.NoteHead \override #'quilisma = ##t
+semivocalis =
+ \once \property Voice.NoteHead \override #'deminutum = ##t
deminutum =
\once \property Voice.NoteHead \override #'deminutum = ##t
a_w := 1.09;
save a, beta, ht, wd;
- ht# = noteheight#; %% * mag;
+ ht# = noteheight# * mag;
2beta# = ht# * b_h;
a# = beta# * a_b;
wd# = 2a# / a_w;
false, false, false, false, true,
false, false, false, true, 1.0);
-% small punctum as used in epiphonus/cephalicus
+% small punctum as used in epiphonus
punctum_char("Ed. Vat. plica", "vaticana_plica", "vatplicahead",
- false, false, false, false, true,
- false, false, false, false, 0.5);
+ false, false, false, false, false,
+ false, false, false, false, 0.7);
% excentric punctum as used in epiphonus
punctum_char("Ed. Vat. epiphonus", "vaticana_epiphonus", "vatepiphonushead",
false, false, false, false, false,
false, true, true, false, 1.0);
+% small punctum as used in cephalicus
+punctum_char("Ed. Vat. rev. plica", "vaticana_reverse_plica", "vatrplicahead",
+ false, false, false, false, false,
+ false, true, false, false, 0.7);
+
% excentric punctum as used in cephalicus
punctum_char("Ed. Vat. cephalicus", "vaticana_cephalicus",
"vatcephalicushead",
- false, false, false, false, false,
+ true, false, false, false, false,
false, false, true, false, 1.0);
% quilisma
a_w := 1.09;
save a, beta, ht, wd;
- ht# = noteheight#; %% * mag;
+ ht# = noteheight#;
2beta# = ht# * b_h;
a# = beta# * a_b;
wd# = 2a# / a_w;