[Top][All Lists]

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

Re: missing glissando features (bugs?)

From: Marc Hohl
Subject: Re: missing glissando features (bugs?)
Date: Sat, 16 May 2009 10:17:30 +0200
User-agent: Thunderbird (X11/20090318)

Neil Puttock schrieb:
2009/5/15 Marc Hohl <address@hidden>:

I still don't get it - when I use extra-dy = 0, I get glissando lines
parallel to the staff lines,
so a value of zero can't be right. I have attached the pdf output, the
upmost tab lie is the
standard behaviour, the middle line is extra-dy = 0, and the lowest line is
the one with my
calculated value for extra-dy.

Hmm, I don't seem to be doing a very good job of explaining it. :)
No, I won't go that far :-)

I wasn't just aware of the fact that your proposals with extra-dy = 0 concerned
glissandos between different strings!
As I can see, a value of 0 is definitely wrong here, so it seems that a
normal score and a tab score
handle extra-dy differently.

Exactly: as I mentioned earlier in the thread, in
there's a setting for 'extra-dy in the context definition for
TabVoice, whereas there's no setting for normal glissandos.  If you
have a look at you'll find the code which reads
'extra-dy: it uses robust_scm2double () to ensure a sane value is
returned (0 in this case) if the property isn't set.

To recap, the current behaviour for glissandos is as follows:

1. If a glissando is in a Voice context other than TabVoice, 'extra-dy
= #0 unless overridden by the user.

2. In a TabVoice, 'extra-dy = #0.75 for all glissandos, even if
they're between notes at different staff-positions.

For a TabVoice glissando, we want 'extra-dy to be 0.75/-0.75 for notes
at the same staff-position, depending on the change in pitch;
otherwise 'extra-dy should be 0, since we don't need to add any extra
slope to glissandos between notes at different staff-positions (or do
we... see below ;)
Great explanation - now I got it.
    (if (and (= left-staff-position right-staff-position)
             (< (ly:pitch-semitones right-pitch) (ly:pitch-semitones
         0.75  )))

This code can't distinguish between (equal staff-positions &
right-pitch > left-pitch) and (different staff-positions), so will
return 0.75 for both situations.

Here's a version of the callback which will only apply 'extra-dy if
the staff-positions are equal:

#(define (glissando::calc-tab-extra-dy grob)
   (let* ((original (ly:grob-original grob))
          (left-bound (ly:spanner-bound original LEFT))
          (right-bound (ly:spanner-bound original RIGHT))
          (left-pitch (ly:event-property (event-cause left-bound) 'pitch))
          (right-pitch (ly:event-property (event-cause right-bound) 'pitch))
          (left-staff-position (ly:grob-property left-bound 'staff-position))
          (right-staff-position (ly:grob-property right-bound 'staff-position))
          (extra-dy (if (= left-staff-position right-staff-position)
                        (if (< (ly:pitch-semitones right-pitch) 
(ly:pitch-semitones left-pitch))

                        ;; not on same staff-position -> no extra-dy

Of course, you might prefer to apply 'extra-dy in all cases, since the
above places the glissando start and end points on staff-lines (see
attached image). :)
That's the point:
First, it looks (at least for me) somewhat strange when the glissando lines end within the staff lines. Second, glissandos between different strings is - if not impossible to play - very seldom to find, so
I would prefer the 0.75-version.

Thank you for your patience!


reply via email to

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