#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 "
);
-
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;
+
+
%%%%%%%%
%
%
(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)
(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
("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))))