lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Porrectus: first try


From: Han-Wen Nienhuys
Subject: [PATCH] Porrectus: first try
Date: Mon, 10 Sep 2001 12:33:40 +0200

address@hidden writes:
> +  written for the GNU LilyPond music typesetter

Yes, thanks. Integrated the patch into 1.5

> + * moment of the second note.  Actually, it should take the moment of
> + * the first note.
> + *
> + * TODO: Introduce "\~" as alternative syntax for "\porrectus"?

Looking at the output, maybe it's more appropriate to have this
engraver react to glissando requests?  OTOH, that might lead to weird
syntax.

> + * TODO: The following issues are not (and should not be) handled by
> + * this engraver: (1) accidentals placement, (2) avoiding line
> + * breaking inbetween porrectus, (3) spacing.  For example, currently

(2) should be handled by the engraver. Look at how the beam engraver
    forbids line breaks.

> +       Item *left_head = dynamic_cast<Item*> (unsmob_grob (caar));
> +       Item *right_head = dynamic_cast<Item*> (unsmob_grob (cdar));
> +       left_head->set_grob_property("transparent", gh_bool2scm(true));

( SCM_BOOL_T )

> +  if (left_head == SCM_EOL)
> +    {
> +      warning (_ ("(left_head == SCM_EOL) (ignored)"));
> +    }

if this is a programming error, then use programming_error (). The
error message looks as if it is not really meant for a
user. programming_errors are also never translated.

> +// Uugh.  The following two functions are almost duplicated code from
> +// custos.cc, which itself is similar to code in note-head.cc.  Maybe
> +// this should be moved to staff-symbol-referencer.cc?

Why not call Note_head::create_ledger_line () directly?

> +
> +  SCM left_head_scm = get_left_head (me);
> +  SCM right_head_scm = get_right_head (me);
> +  if ((left_head_scm == SCM_EOL) || (right_head_scm == SCM_EOL))
> +    {
> +      warning (_ ("junking lonely porrectus"));

maybe you want to call me->suicide () as well, to make a clean job of it.

> +  Real space = Staff_symbol_referencer::staff_space (me);
> +  Real line_thickness = space/6;
> +  Real width = 2.4 * space;

We always make these tunable through grob-properties  ('thickness, 'width)

> +      bool consider_interval =
> +     ((stem_direction == DOWN) && (interval < 0.0)) ||
> +     ((stem_direction == UP) && (interval > 0.0));

i.e.


        stem_direction * interval > 0.0

> +++ lilypond-1.5.9.NEW/scm/generic-property.scm       Mon Sep 10 00:10:15 2001
> @@ -167,6 +167,16 @@
>       (list (list 'noteNameStyle symbol? 'style))))
>  
>  
> +(define generic-porrectus-properties
> +  (cons 'porrectus-interface
 
this property setting interface is slated for removal. I added a note
to the file.

> +(grob-property-description 'stem-direction dir? "up or down?.")

Why not simply use 'direction?

-- 
Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]