[Top][All Lists]

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

[PATCH] Porrectus: second try

From: Juergen Reuter
Subject: [PATCH] Porrectus: second try
Date: Thu, 20 Sep 2001 10:46:35 +0200 (MEST)

This is the second try for a porrectus engraver.  Some issues from the
TODO list have been solved, but even more have been added.  Hence,
there will be (at least) a third try...

The most important changes are:

* Syntax change: \porrectus -> \~, reflecting recent discussion with
  Mark and Mats.  The syntax that Mark and I were discussing, is a
  kind of compact, flexible low-level syntax that operates in terms of
  ligature primitives.  Such a low-level syntax is necessary because it
  is not appropriate to provide individual syntactical constructs for all
  of (if I remember right) over 90 types of complex ligatures.  Still,
  my plan for the (far) future is to also provide a scheme-based
  high-level syntax that maps to the low-level syntax, thereby
  providing at least the most important complex ligatures as scheme
  functions, each taking just a list of pitches as argument.  The
  keyword \porrectus is a candidate to be reintroduced as part of this
  high-level language.
* New porrectus properties: porrectus-width, line-thickness.
* Bugfix: left<->right confusion in
* Bugfix: Box dimensions for horizontal slope molecule in
* Enhanced mensural style porrectus shape, considering optical
  illusion in vertical endings due to slope.  Simplified drawing.
* Code clean-up.

By the way, when issueing a "diff -Naur lilypond-1.5.10
lilypond-1.5.10.NEW", I detected that the files


were erroneously still in the lilypond-1.5.10 directory hierarchy.  I
had to remove these manually before re-running diff.

Han-Wen wrote a while ago:
> > + * 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.

No, while glissando is a spanner, porrectus is an item since it has a
fixed width.  It seems that syntax like "c \someRequest d" only works
for spanners: When \someRequest is encountered, the current moment
already has been incremented by the duration of the preceding note
request, and announcing a grob afterwards seems to confuse lily (I
guess the grob will inserted into the tree at the wrong place,
right?): I tried to force the porrectus item to have the same moment
as the preceding note request by announcing the grob with the
preceding note request as second argument.  But that results only in a
"Separation_item: I've been drinking too much"; the porrectus will
still be aligned with the second note.

> > not at all a good idea to use the transparent property for hiding note
> > heads that contribute to the porrectus.  But forcing them to suicide
> > not an option, since the porrectus relies on properties that are set
> > the note heads.
> You can always copy the relevant information from the grobs and then
> kill them.  

If I kill a note-head item, I fear that other engravers or grobs may
assume this note-head still to be alive.  Or do you think that should
not be a problem?

> An entirely different way of handling it is, to take somehow take over
> the note head engraver (i.e. modifying it to temporarily switch it
> off), and have the porrectus engraver accept Note_reqs and generate the
> ligature without any note head grobs. That also stops the stem
> engraver from generating stems. It would however, require prefix
> syntax, something like
>              \startLigature c4 d4 \endLigature

Ok, I think I finally got it: I need prefix syntax, because this seems
to be the only way to avoid the above "I've been drinking too much"
problem (unless I rewrite the music iteration process...).  Since, as
I already told, I will anyway need to introduce some surrounding
syntax (e.g. for getting right accidentals and spacing handling), the
"take over" approach really may be the best solution (although I fear
that it will result in a dirty hack).  So, the syntax for a (lonely)
porrectus will be something like "\startLigature c4 \~ d4
\endLigature".  I will have a look into it.


Attachment: patch.diff
Description: Text document

reply via email to

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