2009/5/11 Marc Hohl <[email protected]>:
> (if (and (= left-staff-position right-staff-position)
> (< (ly:pitch-semitones right-pitch) (ly:pitch-semitones
> left-pitch)))
> -1
> 1 )))
This will apply an extra-dy of 1 for glissandos which aren't on the
same staff-position.
> Here I'm stuck, 'cause when I override the value for extra-dy manually, as
> in
>
> dytest = \relative c {
> \set TabStaff.minimumFret = #2
> \override Glissando #'extra-dy = #0
> c4 \glissando cis \glissando c2
> }
>
> \score {
> \new TabStaff { \clef "tab" \dytest } }
> the glissando line doesn't look as expected, it is parallel to the
> staff lines and therefore
> invisible. So, strange as it seems, the value "1" must be right here.
The default value for 'extra-dy is set to 0.75 for all glissandos,
even if they're on different lines; see the context definition in
engraver-init.ly.
Though I suggested using cond/else, it's probably easier to use nested
if clauses: if the staff-positions are equal, compare the pitches,
otherwise return a default value of 0.
(if (= left-staff-position right-staff-position)
(if (< (ly:pitch-semitones right-pitch) (ly:pitch-semitones
left-pitch))
-1
1)
;; not on same staff-position -> no extra-dy
0))
> Just for the record: I think it would be reasonable to move the
> glissando::calc-tab-extra-dy
> call to tablature.ly, so all files are backwards compatible and tablature
> users can profit from
> the nicer glissando lines :-)
It would make an excellent addition to the file.
Regards,
Neil
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user