? run ? Documentation/out ? Documentation/bibliography/out ? Documentation/misc/out ? Documentation/pictures/out ? Documentation/topdocs/out ? Documentation/user/out ? Documentation/windows/out ? buildscripts/out ? cygwin/out ? debian/out ? flower/out ? flower/include/out ? input/out ? input/ascii-art/out ? input/mutopia/out ? input/mutopia/E.Satie/out ? input/mutopia/F.Schubert/out ? input/mutopia/J.S.Bach/out ? input/mutopia/J.S.Bach/Petites-Preludes/out ? input/mutopia/R.Schumann/out ? input/mutopia/W.A.Mozart/out ? input/no-notation/out ? input/regression/out ? input/sondag-morgen/out ? input/template/out ? input/test/out ? input/tutorial/out ? lily/out ? lily/include/out ? ly/out ? make/out ? mf/out ? po/out ? ps/out ? python/out ? scm/out ? scripts/out ? stepmake/out ? stepmake/stepmake/out ? tex/out Index: ChangeLog =================================================================== RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v retrieving revision 1.482.2.33 diff -u -r1.482.2.33 ChangeLog --- ChangeLog 5 Sep 2002 13:46:16 -0000 1.482.2.33 +++ ChangeLog 5 Sep 2002 21:00:35 -0000 @@ -1,3 +1,15 @@ +2002-09-05 Juergen Reuter + + * input/test/custos.ly: updated test file to show all available + custos styles + + * lily/custos.cc: small code clean-ups + + * input/test/rests.ly: updated test file to show all available + rest styles + + * mf/feta-eindelijk.mf: bugfix: added missing maxima rest + 2002-09-05 Rune Zedeler * scm/output-lib.scm (make-molecule-boxer): Fixed and moved from Index: input/test/custos.ly =================================================================== RCS file: /cvsroot/lilypond/lilypond/input/test/custos.ly,v retrieving revision 1.4 diff -u -r1.4 custos.ly --- input/test/custos.ly 16 Jul 2002 23:57:07 -0000 1.4 +++ input/test/custos.ly 5 Sep 2002 21:00:36 -0000 @@ -1,9 +1,34 @@ \version "1.5.68" +\header { + texidoc = "custodes in various styles." +} +\score { + \notes { + \property Staff.Custos \set #'neutral-position = #4 + \property Staff.Custos \set #'neutral-direction = #-1 + \property Staff.Custos \set #'adjust-if-on-staffline = ##t -\score { \notes { c'1 \break < d'1 f' a'> } -\paper {\translator { \StaffContext -\consists Custos_engraver -}} + \property Staff.Custos \set #'style = #'hufnagel + c'1^"Custos style = \#'hufnagel" + \break < d'1 a' f''> + \property Staff.Custos \set #'style = #'medicaea + c'1^"Custos style = \#'medicaea" + \break < d'1 a' f''> + + \property Staff.Custos \set #'style = #'vaticana + c'1^"Custos style = \#'vaticana" + \break < d'1 a' f''> + + \property Staff.Custos \set #'style = #'mensural + c'1^"Custos style = \#'mensural" + \break < d'1 a' f''> + } + \paper { + \translator { + \StaffContext + \consists Custos_engraver + } + } } Index: input/test/rests.ly =================================================================== RCS file: /cvsroot/lilypond/lilypond/input/test/rests.ly,v retrieving revision 1.6 diff -u -r1.6 rests.ly --- input/test/rests.ly 17 Aug 2002 17:00:30 -0000 1.6 +++ input/test/rests.ly 5 Sep 2002 21:00:36 -0000 @@ -1,17 +1,40 @@ \version "1.5.68" \header { - texidoc ="mensural style rests." - } + texidoc = "rests in various styles." +} \score { - \context Voice \notes\relative c { - r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 - \property Staff.Rest \override #'style = #'mensural - \emptyText - r\longa^"restStyle = \"mensural\"" r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 - - - } - \paper { } - \midi { } + \context Staff \notes\relative c { + \property Staff.Rest \set #'style = #'mensural + r\maxima^"Rest style = \#'mensural" + r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 + \break + + \property Staff.Rest \set #'style = #'neo_mensural + r\maxima^"Rest style = \#'neo\\_mensural" + r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 + \break + + \property Staff.Rest \set #'style = #'classical + r\maxima^"Rest style = \#'classical" + r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 + \break + + \property Staff.Rest \set #'style = #'default + r\maxima^"Rest style = \#'default" + r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 + \break + } + \paper { + \translator { + \StaffContext + %%%% The following looks good, but produces + %%%% lots of warnings: + % \remove Bar_engraver + } + \translator { + \ScoreContext + \remove Bar_number_engraver + } + } } Index: lily/custos.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/custos.cc,v retrieving revision 1.13 diff -u -r1.13 custos.cc --- lily/custos.cc 19 Aug 2002 01:55:07 -0000 1.13 +++ lily/custos.cc 5 Sep 2002 21:00:36 -0000 @@ -8,10 +8,6 @@ /* TODO: - - merge create_ledger_line () and Note_head::create_ledger_line () - - - rewrite create_ledger_line () to support short and thin ledger lines - - do not show if a clef change immediately follows in the next line - decide: do or do not print custos if the next line starts with a rest @@ -35,82 +31,82 @@ Custos::brew_molecule (SCM smob) { Item *me = (Item *)unsmob_grob (smob); - SCM scm_style = me->get_grob_property ("style"); + SCM scm_style = me->get_grob_property ("style"); + String style; if (gh_symbol_p (scm_style)) { - String style = ly_scm2string (scm_symbol_to_string (scm_style)); + style = ly_scm2string (scm_symbol_to_string (scm_style)); + } + else + { + style = "mensural"; + } - /* - * Shall we use a common custos font character regardless if on - * staffline or not, or shall we use individual font characters - * for both cases? - */ - bool adjust = - to_boolean (me->get_grob_property ("adjust-if-on-staffline")); - - String idx = "custodes-" + style + "-"; - - int neutral_pos; - SCM ntr_pos = me->get_grob_property ("neutral-position"); - if (gh_number_p (ntr_pos)) - neutral_pos = gh_scm2int (ntr_pos); - else - neutral_pos = 0; + /* + * Shall we use a common custos font character regardless if on + * staffline or not, or shall we use individual font characters + * for both cases? + */ + bool adjust = + to_boolean (me->get_grob_property ("adjust-if-on-staffline")); + + int neutral_pos; + SCM ntr_pos = me->get_grob_property ("neutral-position"); + if (gh_number_p (ntr_pos)) + neutral_pos = gh_scm2int (ntr_pos); + else + neutral_pos = 0; - Direction neutral_direction = - to_dir (me->get_grob_property ("neutral-direction")); + Direction neutral_direction = + to_dir (me->get_grob_property ("neutral-direction")); - int pos = (int)rint (Staff_symbol_referencer::get_position (me)); - int sz = Staff_symbol_referencer::line_count (me)-1; + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); + int sz = Staff_symbol_referencer::line_count (me)-1; - if (pos < neutral_pos) - idx += "u"; - else if (pos > neutral_pos) - idx += "d"; - else if (neutral_direction == UP) - idx += "u"; - else if (neutral_direction == DOWN) - idx += "d"; - else // auto direction; not yet supported -> use "d" - idx += "d"; - - if (adjust) - { - idx += (((pos ^ sz) & 0x1) == 0) ? "1" : "0"; - } - else - { - idx += "2"; - } + String font_char = "custodes-" + style + "-"; + if (pos < neutral_pos) + font_char += "u"; + else if (pos > neutral_pos) + font_char += "d"; + else if (neutral_direction == UP) + font_char += "u"; + else if (neutral_direction == DOWN) + font_char += "d"; + else // auto direction; not yet supported -> use "d" + font_char += "d"; - Molecule molecule - = Font_interface::get_default_font (me)->find_by_name (idx); - if (molecule.empty_b ()) - { - String message = "no such custos: `" + idx + "'"; - warning (_ (message.to_str0 ())); - return SCM_EOL; - } - else - { - // add ledger lines - int pos = (int)rint (Staff_symbol_referencer::get_position (me)); - int interspaces = Staff_symbol_referencer::line_count (me)-1; - if (abs (pos) - interspaces > 1) - { - Molecule ledger_lines = - Note_head::brew_ledger_lines (me, pos, interspaces, - molecule.extent (X_AXIS), true); - molecule.add_molecule (ledger_lines); - } - return molecule.smobbed_copy (); - } + if (adjust) + { + font_char += (((pos ^ sz) & 0x1) == 0) ? "1" : "0"; } else - return SCM_EOL; -} + { + font_char += "2"; + } + Molecule molecule + = Font_interface::get_default_font (me)->find_by_name (font_char); + if (molecule.empty_b ()) + { + me->warning (_f ("custos `%s' not found", font_char)); + return SCM_EOL; + } + else + { + // add ledger lines + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); + int interspaces = Staff_symbol_referencer::line_count (me)-1; + if (abs (pos) - interspaces > 1) + { + Molecule ledger_lines = + Note_head::brew_ledger_lines (me, pos, interspaces, + molecule.extent (X_AXIS), true); + molecule.add_molecule (ledger_lines); + } + return molecule.smobbed_copy (); + } +} ADD_INTERFACE (Custos, "custos-interface", "A custos is a staff context symbol that appears at the end of a Index: mf/feta-eindelijk.mf =================================================================== RCS file: /cvsroot/lilypond/lilypond/mf/feta-eindelijk.mf,v retrieving revision 1.34 diff -u -r1.34 feta-eindelijk.mf --- mf/feta-eindelijk.mf 18 Aug 2002 11:17:45 -0000 1.34 +++ mf/feta-eindelijk.mf 5 Sep 2002 21:00:36 -0000 @@ -95,16 +95,22 @@ define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_beam_height); +fet_beginchar("maxima rest", "-3", "maximarest"); + set_char_box(0, 3 breve_rest_x#, breve_rest_y#, breve_rest_y#); + draw_block ((0,-floor (breve_rest_y)), (breve_rest_x, floor (breve_rest_y))); + addto currentpicture also currentpicture shifted (2 breve_rest_x, 0); +fet_endchar; fet_beginchar("longa rest", "-2", "longarest"); - set_char_box(0, breve_rest_x#, breve_rest_y#, breve_rest_y#); - draw_block ((0,-floor (breve_rest_y)), (breve_rest_x, floor (breve_rest_y))); + set_char_box(0, breve_rest_x#, breve_rest_y#, breve_rest_y#); + draw_block ((0,-floor (breve_rest_y)), (breve_rest_x, floor (breve_rest_y))); fet_endchar; fet_beginchar("breve rest", "-1", "breverest"); - set_char_box(0, breve_rest_x#, 0, breve_rest_y#); - draw_block ((0,0), (breve_rest_x, floor (breve_rest_y))); + set_char_box(0, breve_rest_x#, 0, breve_rest_y#); + draw_block ((0,0), (breve_rest_x, floor (breve_rest_y))); fet_endchar; + tracingvariables := 1;