collision of rehearsal marks, y-parent

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

collision of rehearsal marks, y-parent

Werner LEMBERG

While working on a big score together with proper parts extraction I
find that vertical positioning of rehearsal marks needs manual
adjustments most often.

Is it possible to add a collision resolver for rehearsal marks?  The
`padding' option doesn't work well since it is important that
rehearsal marks are as near as possible to the staff lines.

BTW, how can I find out in lilypond-internals.info the `parent' of a
grob?  For example, this is for RehearsalMark objects:

  `Y-offset' (number):
       `ly:side-position-interface::y-aligned-side'

       The vertical amount that this object is moved relative to its
       Y-parent

But what is the `Y-parent'?  It would be great if this information
could be added there.


    Werner


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: collision of rehearsal marks, y-parent

Graham Percival-2

On 30-Mar-06, at 11:51 PM, Werner LEMBERG wrote:

> While working on a big score together with proper parts extraction I
> find that vertical positioning of rehearsal marks needs manual
> adjustments most often.

Absolutely.  :(

I use this method as a workaround:
\layout { \context { \Score
   \override RehearsalMark #'Y-offset =
#ly:self-alignment-interface::aligned-on-y-parent
   \override RehearsalMark #'self-alignment-Y = #-1
}}

and sometimes override it with things like
\once \override Score.RehearsalMark #'self-alignment-Y = #0.7
in the piece.

Cheers,
- Graham



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: collision of rehearsal marks, y-parent

Han-Wen Nienhuys-2
In reply to this post by Werner LEMBERG
Werner LEMBERG wrote:
> While working on a big score together with proper parts extraction I
> find that vertical positioning of rehearsal marks needs manual
> adjustments most often.
>
> Is it possible to add a collision resolver for rehearsal marks?  The

preventing what kind of collisions?

> `padding' option doesn't work well since it is important that
> rehearsal marks are as near as possible to the staff lines.
>
> BTW, how can I find out in lilypond-internals.info the `parent' of a
> grob?  For example, this is for RehearsalMark objects:

> But what is the `Y-parent'?  It would be great if this information
> could be added there.

it depends. In case of teh rehearsal mark, I guess it will be the System
grob.


--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
  -- Code for Music Notation
http://www.lilypond-design.com



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: collision of rehearsal marks, y-parent

Werner LEMBERG

> > Is it possible to add a collision resolver for rehearsal marks?  The
>
> preventing what kind of collisions?

Almost everything:

 note heads and rests (with attached articulation grobs)
 stems
 beams
 octavation lines, trills, tuplets, etc.
 slurs and ties
 bar numbers
 clefs

Dynamics and scripts are probably not necessary because they are below
the staff line normally.

> > But what is the `Y-parent'?
>
> it depends. In case of teh rehearsal mark, I guess it will be the
> System grob.

You `guess'.  Interesting :-)

Where can I find information about this?  Is it documented somewhere?


    Werner


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: collision of rehearsal marks, y-parent

Han-Wen Nienhuys-2
Werner LEMBERG wrote:

>>> Is it possible to add a collision resolver for rehearsal marks?  The
>> preventing what kind of collisions?
>
> Almost everything:
>
>  note heads and rests (with attached articulation grobs)
>  stems
>  beams
>  octavation lines, trills, tuplets, etc.
>  slurs and ties
>  bar numbers
>  clefs
>
> Dynamics and scripts are probably not necessary because they are below
> the staff line normally.

This is a problem: almost everything is not very specific. I will put it
on the sponsorable feature list. Is there a general pattern of collision
resolution that you can spot (ie. always sideways, or always upwards?)

>>> But what is the `Y-parent'?
>> it depends. In case of teh rehearsal mark, I guess it will be the
>> System grob.
>
> You `guess'.  Interesting :-)
>
> Where can I find information about this?  Is it documented somewhere?

No, not really. Parent-child relationships are generally determined by
contexts, but it can vary. Eg. a fingering instruction typically has a
notehead both as X and Y-parent, so the fingering always moves along
with any collision resolution for the head.

  For Y-side positioning it doesn't really matter, since the
side-positioning will compensate for any movements that the Y-parent
might make.

If you really want to find out, you can either

a. look at the engravers source code

b. add a small Scheme-callback to the rehearsalmark that prints the
result of ly:grob-parent ; eg. you could attach it to the 'text property.

--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
  -- Code for Music Notation
http://www.lilypond-design.com



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: collision of rehearsal marks, y-parent

Werner LEMBERG
> >  note heads and rests (with attached articulation grobs)
> >  stems
> >  beams
> >  octavation lines, trills, tuplets, etc.
> >  slurs and ties
> >  bar numbers
> >  clefs
>
> This is a problem: almost everything is not very specific.

Well, I gave a list, didn't I?

> Is there a general pattern of collision resolution that you can spot
> (ie. always sideways, or always upwards?)

Upwards, I think, should be sufficient.

> If you really want to find out, you can either
>
> a. look at the engravers source code
>
> b. add a small Scheme-callback to the rehearsalmark that prints the
> result of ly:grob-parent ; eg. you could attach it to the 'text
> property.

Hmm, I still think it belongs to the docs...


    Werner


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel