Re: missing glissando features (bugs?)

2009-05-20 Thread Marc Hohl

Mats and Jon, thank yoou for your comments,
I will \revert

Second, glissandos between different strings is - if not impossible 
to play

- very seldom to find, so
to: glissandos between different strings are possible but there seems to 
be no common

sense how to play :-)

 
I've played several orchestral pieces where the violin parts include 
glissandi ranging over several strings.
Mahler Symphony no. 4 comes to my mind, for example. I'm still 
uncertain on exactly how to play it, though, but perhaps the idea is 
that every player does it somewhat differently and the collective 
effect is what the composer is looking for.


For solo guitar (which I guess this thread is about), I have no idea.

   /Mats



For something like the image attached played on guitar, I would slide 
up as far as possible on the 2nd string starting at the C, then make 
as elegant an arrival on the high G as possible.  This sort of stuff 
happens with some frequency in guitar music and sound pretty good.


I have no idea how you do that across four strings on a violin. :)

Jon






___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
  




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-20 Thread Graham Percival
On Tue, May 19, 2009 at 11:04:30AM +0200, Mats Bengtsson wrote:

 I've played several orchestral pieces where the violin parts include  
 glissandi ranging over several strings.
 Mahler Symphony no. 4 comes to my mind, for example. I'm still uncertain  
 on exactly how to play it, though, but perhaps the idea is that every  
 player does it somewhat differently and the collective effect is what  
 the composer is looking for.

Oh, come on!  There's no theoretical maximum frequency of a violin
string[1].  Just start on the G string and slide up.  ;)

[1]  Assuming a perfectly elastic string, being excited by an
infitesimally narrow bow, with perfectly-controlled bow speed,
pressure, and position...

Cheers,
- Graham


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-20 Thread Francisco Vila
2009/5/20 Graham Percival gra...@percival-music.ca:
 On Wed, May 20, 2009 at 10:48:58AM -0600, Carl D. Sorensen wrote:

 I've always thought that pushing against the fingerboard created a fixed end
 to the string, while just touching the string created a node.  Perhaps the
 pulling the string towards the arm technique creates enough force that it
 functions as the end of the string, in contrast to the relatively light
 harmonic touch?

 Yeah; if you pull it gently (and if you're in the right position)
 you get a harmonic, but if you pull it more, it drops down to the
 regular pitch.

 As for the actual physics, I'm not certain whether the
 non-harmonic is caused by the extra tension, or the width of the
 finger[1], or what.

 [1]  if you touch the string lightly, you only have a small area.
 But if you pull the string a lot, your finger occupies an arc with
 a wider angle (albeit still on the order of 2-3 degrees).  This
 wider arc will deaden a lot more vibrations than a small-area
 touch.


I think that if you touch slightly trying to get an harmonic, the
string vibrates on full length, at both sides of your finger; if you
press more, vibrations end on the finger. Not a node here of a longer
string, but simply an effective end of the string.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-20 Thread Carl D. Sorensen



On 5/20/09 9:20 AM, Graham Percival gra...@percival-music.ca wrote:

 On Tue, May 19, 2009 at 11:04:30AM +0200, Mats Bengtsson wrote:
 
 I've played several orchestral pieces where the violin parts include
 glissandi ranging over several strings.
 Mahler Symphony no. 4 comes to my mind, for example. I'm still uncertain
 on exactly how to play it, though, but perhaps the idea is that every
 player does it somewhat differently and the collective effect is what
 the composer is looking for.
 
 Oh, come on!  There's no theoretical maximum frequency of a violin
 string[1].  Just start on the G string and slide up.  ;)
 
 [1]  Assuming a perfectly elastic string, being excited by an
 infitesimally narrow bow, with perfectly-controlled bow speed,
 pressure, and position...
 

Don't forget that the fingerboard also needs to reach all the way to the
bridge!

Carl



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-20 Thread Graham Percival
On Wed, May 20, 2009 at 10:19:47AM -0600, Carl D. Sorensen wrote:
 
 On 5/20/09 9:20 AM, Graham Percival gra...@percival-music.ca wrote:
 
  Oh, come on!  There's no theoretical maximum frequency of a violin
  string[1].  Just start on the G string and slide up.  ;)

In case anybody is wondering, the formula for an ideal string is:

f = K / (L - x)

where f is the frequency, K is a constant (depending on the
length, tension, and speed of waves in the medium), L is the
length, and x is the finger position.

To calculate K, play a string with no fingers down (x=0) and
listen to the frequency produced.

  [1]  Assuming a perfectly elastic string, being excited by an
  infitesimally narrow bow, with perfectly-controlled bow speed,
  pressure, and position...
 
 Don't forget that the fingerboard also needs to reach all the way to the
 bridge!

Nonsense.  You can push down a string without a fingerboard... ok,
granted this *really* makes the ideal string calculations
questionable, since you're changing the tension by quite a bit.
But it can certainly be done; I've done it many times on the
cello.

Actually, one book on cello technique book (I think it was
something like how to play the cello without pain; I read it
soon after the first time I had tendonitus) actually recommends
this style of playing for *all* notes.  The claim was that pushing
was less natural than pulling, and so you should pull the string
to the left (towards your arm) instead of pushing down (exerting
force perpendicular to the arm/hand plane).

Cheers,
- Graham


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-20 Thread Carl D. Sorensen



On 5/20/09 10:41 AM, Graham Percival gra...@percival-music.ca wrote:

 On Wed, May 20, 2009 at 10:19:47AM -0600, Carl D. Sorensen wrote:
 
 
 Nonsense.  You can push down a string without a fingerboard... ok,
 granted this *really* makes the ideal string calculations
 questionable, since you're changing the tension by quite a bit.
 But it can certainly be done; I've done it many times on the
 cello.
 
 Actually, one book on cello technique book (I think it was
 something like how to play the cello without pain; I read it
 soon after the first time I had tendonitus) actually recommends
 this style of playing for *all* notes.  The claim was that pushing
 was less natural than pulling, and so you should pull the string
 to the left (towards your arm) instead of pushing down (exerting
 force perpendicular to the arm/hand plane).

So I guess if you are using this technique, the only thing that makes a
harmonic is when your finger is in a harmonic position?

I've always thought that pushing against the fingerboard created a fixed end
to the string, while just touching the string created a node.  Perhaps the
pulling the string towards the arm technique creates enough force that it
functions as the end of the string, in contrast to the relatively light
harmonic touch?

Carl



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-20 Thread Graham Percival
On Wed, May 20, 2009 at 10:48:58AM -0600, Carl D. Sorensen wrote:
 
 I've always thought that pushing against the fingerboard created a fixed end
 to the string, while just touching the string created a node.  Perhaps the
 pulling the string towards the arm technique creates enough force that it
 functions as the end of the string, in contrast to the relatively light
 harmonic touch?

Yeah; if you pull it gently (and if you're in the right position)
you get a harmonic, but if you pull it more, it drops down to the
regular pitch.

As for the actual physics, I'm not certain whether the
non-harmonic is caused by the extra tension, or the width of the
finger[1], or what.

[1]  if you touch the string lightly, you only have a small area.
But if you pull the string a lot, your finger occupies an arc with
a wider angle (albeit still on the order of 2-3 degrees).  This
wider arc will deaden a lot more vibrations than a small-area
touch.

Cheers,
- Graham



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-19 Thread Jonathan Kulp

Mats Bengtsson wrote:



Neil Puttock wrote:

2009/5/16 Marc Hohl m...@hohlart.de:

 
Second, glissandos between different strings is - if not impossible 
to play

- very seldom to find, so

I've played several orchestral pieces where the violin parts include 
glissandi ranging over several strings.
Mahler Symphony no. 4 comes to my mind, for example. I'm still uncertain 
on exactly how to play it, though, but perhaps the idea is that every 
player does it somewhat differently and the collective effect is what 
the composer is looking for.


For solo guitar (which I guess this thread is about), I have no idea.

   /Mats



For something like the image attached played on guitar, I would slide up 
as far as possible on the 2nd string starting at the C, then make as 
elegant an arrival on the high G as possible.  This sort of stuff 
happens with some frequency in guitar music and sound pretty good.


I have no idea how you do that across four strings on a violin. :)

Jon

--
Jonathan Kulp
http://www.jonathankulp.com
attachment: gliss.png___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-18 Thread Neil Puttock
2009/5/16 Marc Hohl m...@hohlart.de:

 Second, glissandos between different strings is - if not impossible to play
 - very seldom to find, so

Good point; I hadn't considered that. :)

 I would prefer the 0.75-version.

Yep, it's much more pleasing, and makes the code simpler.

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-16 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/15 Marc Hohl m...@hohlart.de:

  

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 engraver-init.ly
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 line-spanner.cc 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
left-pitch)))
-0.75
 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))
-0.75
0.75)

;; not on same staff-position - no extra-dy
0)))
 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!

Marc

Regards,
Neil
  




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-15 Thread Neil Puttock
2009/5/15 Marc Hohl m...@hohlart.de:

 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. :)

 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 engraver-init.ly
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 line-spanner.cc 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 ;)

     (if (and (= left-staff-position right-staff-position)
              ( (ly:pitch-semitones right-pitch) (ly:pitch-semitones
 left-pitch)))
         -0.75
          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))
-0.75
0.75)

;; not on same staff-position - no extra-dy
0)))
 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). :)

Regards,
Neil
\version 2.12.2

\paper {
  indent = 0
  ragged-right = ##f
}

#(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)))

 (if (and (= left-staff-position right-staff-position)
  ( (ly:pitch-semitones right-pitch) (ly:pitch-semitones 
left-pitch)))
 -0.75
 0.75)))

#(define (extra-dy-test-a 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)))
 
 (if (= left-staff-position right-staff-position)
 (if ( (ly:pitch-semitones right-pitch) (ly:pitch-semitones 
left-pitch))
 -0.75
 0.75)

 ;; not on same staff-position - no extra-dy
 0)))

#(define (extra-dy-test-b 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 

Re: missing glissando features (bugs?)

2009-05-14 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/11 Marc Hohl m...@hohlart.de:

  

   (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.

  
No, it doesn't; at least in my test files. I have attached an example 
where the

default and the corrected behaviour are compared, please have a look at it.

Marc

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

  


\version 2.12.2

\paper {
   indent = 0
   ragged-right = ##f
}


#(define (glissando::calc-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)))

 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave right-pitch))
  (= (ly:pitch-notename left-pitch) (ly:pitch-notename 
right-pitch)))
 (- (ly:pitch-alteration right-pitch) (ly:pitch-alteration left-pitch))
 0 )))

#(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)))

 (if (and (= left-staff-position right-staff-position)
  ( (ly:pitch-semitones right-pitch) (ly:pitch-semitones 
left-pitch)))
 -1
  1 )))

noten = \relative c {
   c4 \glissando cis
   c4 \glissando cis
   c4 \glissando ces
   c4 \glissando ces
   c4 \glissando d \glissando e \glissando f
}

tabs = \relative c {
   \set TabStaff.minimumFret = #2
   c4 \glissando cis \glissando c2
   c4 \glissando ces \glissando c2
   c4 \glissando c \glissando c2
   c4 \glissando d \glissando c2
   c4 \glissando d \glissando c2
   c'4 \glissando d \glissando e, \glissando f 
   \bar |.
}

\score {
\new Staff { \clef G_8 
 \noten \break
 \override Glissando #'extra-dy = #glissando::calc-extra-dy
 \noten }
}

\score {
\new TabStaff { \clef tab
\tabs \break
\override Glissando #'extra-dy = 
#glissando::calc-tab-extra-dy
\tabs }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-14 Thread Neil Puttock
2009/5/14 Marc Hohl m...@hohlart.de:
 Neil Puttock schrieb:

 This will apply an extra-dy of 1 for glissandos which aren't on the
 same staff-position.



 No, it doesn't; at least in my test files. I have attached an example where
 the
 default and the corrected behaviour are compared, please have a look at it.

They're not the same, but the difference is subtle because there's
only a small change in slope between the default setting (0.75) and
the override (1).

Try adding the following to your TabStaff score after the \clef
command; it will show the difference more clearly:

\override Glissando #'extra-dy = #0

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-13 Thread Neil Puttock
2009/5/11 Marc Hohl m...@hohlart.de:

    (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
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-11 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/10 Marc Hohl m...@hohlart.de:

  

And here's my solution for tablature:

#(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 (and (= left-staff-position right-staff-position)
(ly:pitch? right-pitch left-pitch))



Be careful here: ly:pitch? compares pitches lexicographically, so
you'll come unstuck if the pitches differ only in alteration:

#(let ((c-natural (ly:make-pitch 0 0 0))
   (c-sharp (ly:make-pitch 0 0 SHARP)))
   (display (ly:pitch? c-natural c-sharp))
   (newline)
   (display (ly:pitch? c-sharp c-natural)))

  

Ok, I misinterpreted the lexicographically, so I changed my definition to

#(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)))


(if (and (= left-staff-position right-staff-position)
 ( (ly:pitch-semitones right-pitch) (ly:pitch-semitones 
left-pitch)))

-1
 1 )))

to be called as you proposed:

\override Glissando #'extra-dy = #glissando::calc-tab-extra-dy



   -1
1 ))) ;; I don't know why, but 0 doesn't work properly in
tablature, compare glissando::calc-extra-dy



Unless you can return the correct value or 0 (in the same way as
glissando::calc-extra-dy), you'll probably need to use cond and else:

  
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.

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 :-)

Marc

(cond
((right pitch is lower) -1)
(right pitch is higher) 1)
(else 0))

Regards,
Neil

  




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-10 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/9 Marc Hohl m...@hohlart.de:

  

I tried to receive the informations needed by overriding the Glissando
#'stencil with
a function which simply displays the values obtained by the ly:spanner-bound
call
before calling ly:line-spanner::print, but I get only  #Grob NoteHead  on
the terminal.

What am I doing wrong here?



Nothing, though to be on the safe side, it's best to ensure you're
dealing with the unbroken spanner by using ly:grob-original: if a user
decides to have a glissando over a line break, it won't be possible to
get noteheads for both bounds.

Once you have the NoteHead grobs, you can retrieve their pitches from
the events which created them:

Neil, thank you, I wasn't aware of this connection between grobs and events.
Now it seems rather logical (not surprising as we talk about computing 
languages :-)


\relative c' {
  \override NoteHead #'stencil = #(lambda (grob)
 ;; event-cause is a convenient shorthand in this case for
(ly:grob-property grob 'cause)
 (display (event-cause grob))
 (ly:note-head::print grob))
 c4
}

  


#Prob: Stream_event C++: Stream_event((music-cause . #Prob: Music
C++: Music((length . #Mom 1/4) (elements) (duration . #Duration 4
  

) (pitch . #Pitch c' ) (origin . #location


/home/neil/Documents/test.ly:254:5))((display-methods #procedure #f
(note parser)) (name . NoteEvent) (types general-music event
note-event rhythmic-event melodic-event)) 
) (length . #Mom 1/4) (elements) (duration . #Duration 4 ) (pitch
. #Pitch c' ) (origin . #location
/home/neil/Documents/test.ly:254:5))((class . note-event)) 

From the event, you can get the pitch using ly:event-property event 'pitch.

Putting it all together:

#(define (glissando::calc-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)))

 ;; work out return value based on pitches here

  

I came up with the following definition:

#(define (glissando::calc-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))
 (extra-dy
 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave 
right-pitch))
  (= (ly:pitch-notename left-pitch) 
(ly:pitch-notename right-pitch)))
 (- (ly:pitch-alteration right-pitch) 
(ly:pitch-alteration left-pitch))

 0 )))
 (set! (ly:grob-property grob 'extra-dy) extra-dy)
 (ly:line-spanner::print grob)))

noten = \relative c {
  c4 \glissando cis
  c4 \glissando cis
  c4 \glissando ces
  c4 \glissando ces
  c4 \glissando d \glissando e \glissando f
}


\score {
  
 \new Staff { \clef G_8
  \noten \break
  \override Glissando #'stencil = #glissando::calc-extra-dy
  \noten}
  
}

and it works! Lilypond is just great; the deeper I get into it, the more 
impressed I am.

So I will try and solve the tablature problem, too.

Marc


 0))

Regards,
Neil

  




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-10 Thread Werner LEMBERG

 I came up with the following definition:  [...]
 
 and it works!

Mhmm, not perfect: There should be a dx correction to avoid an overlap
between the glissando line and the accidental.


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-10 Thread Marc Hohl

Werner LEMBERG schrieb:

I came up with the following definition:  [...]

and it works!



Mhmm, not perfect: There should be a dx correction to avoid an overlap
between the glissando line and the accidental.


Werner

  

Yes, I know, but I concentrated on item (2); see the start of this thread.
Improvements etc. are always welcome, but it seems to me that the problem
glissando vs. accidentals is not easy to solve.

Marc




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-10 Thread Marc Hohl

Marc Hohl schrieb:

Neil Puttock schrieb:

2009/5/9 Marc Hohl m...@hohlart.de:

 

I tried to receive the informations needed by overriding the Glissando
#'stencil with
a function which simply displays the values obtained by the 
ly:spanner-bound

call
before calling ly:line-spanner::print, but I get only  #Grob 
NoteHead  on

the terminal.

What am I doing wrong here?



Nothing, though to be on the safe side, it's best to ensure you're
dealing with the unbroken spanner by using ly:grob-original: if a user
decides to have a glissando over a line break, it won't be possible to
get noteheads for both bounds.

Once you have the NoteHead grobs, you can retrieve their pitches from
the events which created them:
Neil, thank you, I wasn't aware of this connection between grobs and 
events.
Now it seems rather logical (not surprising as we talk about computing 
languages :-)



\relative c' {
  \override NoteHead #'stencil = #(lambda (grob)
 ;; event-cause is a convenient shorthand in this case for
(ly:grob-property grob 'cause)
 (display (event-cause grob))
 (ly:note-head::print grob))
 c4
}

 
#Prob: Stream_event C++: Stream_event((music-cause . #Prob: Music

C++: Music((length . #Mom 1/4) (elements) (duration . #Duration 4
 

) (pitch . #Pitch c' ) (origin . #location


/home/neil/Documents/test.ly:254:5))((display-methods #procedure #f
(note parser)) (name . NoteEvent) (types general-music event
note-event rhythmic-event melodic-event)) 
) (length . #Mom 1/4) (elements) (duration . #Duration 4 ) (pitch
. #Pitch c' ) (origin . #location
/home/neil/Documents/test.ly:254:5))((class . note-event)) 

From the event, you can get the pitch using ly:event-property event 
'pitch.


Putting it all together:

#(define (glissando::calc-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)))


 ;; work out return value based on pitches here

  

I came up with the following definition:

#(define (glissando::calc-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))

 (extra-dy
 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave 
right-pitch))
  (= (ly:pitch-notename left-pitch) 
(ly:pitch-notename right-pitch)))
 (- (ly:pitch-alteration right-pitch) 
(ly:pitch-alteration left-pitch))

 0 )))
 (set! (ly:grob-property grob 'extra-dy) extra-dy)
 (ly:line-spanner::print grob)))

noten = \relative c {
  c4 \glissando cis
  c4 \glissando cis
  c4 \glissando ces
  c4 \glissando ces
  c4 \glissando d \glissando e \glissando f
}


\score {
  
 \new Staff { \clef G_8
  \noten \break
  \override Glissando #'stencil = 
#glissando::calc-extra-dy

  \noten}
  
}

and it works! Lilypond is just great; the deeper I get into it, the 
more impressed I am.

So I will try and solve the tablature problem, too.


And here's my solution for tablature:

#(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 (and (= left-staff-position right-staff-position)
 (ly:pitch? right-pitch left-pitch))
-1
 1 ))) ;; I don't know why, but 0 doesn't work 
properly in tablature, compare glissando::calc-extra-dy

 (set! (ly:grob-property grob 'extra-dy) extra-dy)
 (ly:line-spanner::print grob)))

tabs = \relative c {
  \set TabStaff.minimumFret = #2
  c4 \glissando d \glissando c2
  c4 \glissando d \glissando c2
  c'4 \glissando d \glissando e, \glissando f
  \bar |.
}

\score {
  
 \new TabStaff { \clef tab \tabs
 \break
 \override Glissando #'stencil = 
#glissando::calc-tab-extra-dy

 \tabs }
  
}




 0))

Regards,
Neil

  




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user





___
lilypond-user 

Re: missing glissando features (bugs?)

2009-05-10 Thread Neil Puttock
2009/5/10 Marc Hohl m...@hohlart.de:

 I came up with the following definition:

 #(define (glissando::calc-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))
         (extra-dy
             (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave
 right-pitch))
                      (= (ly:pitch-notename left-pitch) (ly:pitch-notename
 right-pitch)))
                 (- (ly:pitch-alteration right-pitch) (ly:pitch-alteration
 left-pitch))
                 0 )))
         (set! (ly:grob-property grob 'extra-dy) extra-dy)
         (ly:line-spanner::print grob)))

Good stuff, though you don't need to override #'stencil here; it will
work just as well with #'extra-dy directly:

#(define (glissando::calc-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)))

 (if (and (= (ly:pitch-octave left-pitch) (ly:pitch-octave right-pitch))
  (= (ly:pitch-notename left-pitch) (ly:pitch-notename 
right-pitch)))
 (- (ly:pitch-alteration right-pitch) (ly:pitch-alteration left-pitch))
 0)))

\override Glissando #'extra-dy = #glissando::calc-extra-dy

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-10 Thread Neil Puttock
2009/5/10 Marc Hohl m...@hohlart.de:

 And here's my solution for tablature:

 #(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 (and (= left-staff-position right-staff-position)
                     (ly:pitch? right-pitch left-pitch))

Be careful here: ly:pitch? compares pitches lexicographically, so
you'll come unstuck if the pitches differ only in alteration:

#(let ((c-natural (ly:make-pitch 0 0 0))
   (c-sharp (ly:make-pitch 0 0 SHARP)))
   (display (ly:pitch? c-natural c-sharp))
   (newline)
   (display (ly:pitch? c-sharp c-natural)))

                -1
                 1 ))) ;; I don't know why, but 0 doesn't work properly in
 tablature, compare glissando::calc-extra-dy

Unless you can return the correct value or 0 (in the same way as
glissando::calc-extra-dy), you'll probably need to use cond and else:

(cond
((right pitch is lower) -1)
(right pitch is higher) 1)
(else 0))

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-09 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/2 Marc Hohl m...@hohlart.de:
  

I have made some observations concerning \glissando:

1) accidentals are not recognised properly; I know this is in the bug list
and there are workarounds,
 see http://lists.gnu.org/archive/html/bug-lilypond/2005-08/msg00235.html



This isn't at all straightforward to fix (I had a stab at it a while
ago, and it's tricky to get the positioning correct on the right hand
side because the accidental changes the anchor point for the end of
the glissando.)

  

2) the glissando line between half steps should indicate the direction;
 e.g. a glissando line between c and c# should raise a bit and not be
parallel to the staff lines;

3) in tablature, the glissando is always indicated upwards, but it should be
drawn in respect to the fret number;
 e.g. 3/5\3, not 3/5/3;

Should (2) and (3) be considered as bugs? I have found a request from
9/2005:



Probably.

It should be quite easy to fix both problems with a callback for
'extra-dy (see below)
  

I tried this manually, and it works just fine, see attached file.
  

http://lists.gnu.org/archive/html/bug-lilypond/2005-09/msg00112.html

and it seems to me that this has been partly implemented
(the lines betweeen fret numbers are now sloped, so there _has_ been some
progress).

Are there any hints/workarounds to solve this problem?



From the glissando you can get the left and right noteheads using
ly:spanner-bound, from which it's possible to retrieve the pitches. A
simple comparision of pitches should allow you to set the correct
return value for 'extra-dy.
  


I tried to receive the informations needed by overriding the Glissando 
#'stencil with
a function which simply displays the values obtained by the 
ly:spanner-bound call
before calling ly:line-spanner::print, but I get only  #Grob NoteHead  
on the terminal.


What am I doing wrong here?

Thanks in advance.

Marc


For TabVoice.Glissando, you can get the staff-positions for the
bounding notes, so it's possible to apply extra-dy only for glissandos
between tab notes on the same line.

Regards,
Neil

  


\version 2.12.2

\paper {
   ragged-right = ##f
}

#(define (glissando::test grob)
(let* ((left-bound (ly:spanner-bound grob LEFT))
   (right-bound (ly:spanner-bound grob RIGHT)))
   (display left-bound: )(display left-bound)(newline)
   (display right-bound: )(display right-bound)(newline)
   ;; for now, we simply use the default printing routine
   (ly:line-spanner::print grob)))

noten = \relative c {
   \override Glissando #'stencil = #glissando::test
   c4 \glissando cis
   \once \override Glissando #'extra-dy = #0.5
   c4 \glissando cis
   c4 \glissando ces
   \once \override Glissando #'extra-dy = #-0.5
   c4 \glissando ces
}

tabs = \relative c {
   \set TabStaff.minimumFret = #2
   c4 \glissando 
   \once \override Glissando #'extra-dy = #-1.0
   d \glissando c2
   c4 \glissando d \glissando c2
   \bar |.
}



\score {
   
  \new Staff { \clef G_8 \noten }
   
}
\score {
   
  \new TabStaff { \clef tab \tabs }
   
}
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-09 Thread Neil Puttock
2009/5/9 Marc Hohl m...@hohlart.de:

 I tried to receive the informations needed by overriding the Glissando
 #'stencil with
 a function which simply displays the values obtained by the ly:spanner-bound
 call
 before calling ly:line-spanner::print, but I get only  #Grob NoteHead  on
 the terminal.

 What am I doing wrong here?

Nothing, though to be on the safe side, it's best to ensure you're
dealing with the unbroken spanner by using ly:grob-original: if a user
decides to have a glissando over a line break, it won't be possible to
get noteheads for both bounds.

Once you have the NoteHead grobs, you can retrieve their pitches from
the events which created them:

\relative c' {
  \override NoteHead #'stencil = #(lambda (grob)
 ;; event-cause is a convenient shorthand in this case for
(ly:grob-property grob 'cause)
 (display (event-cause grob))
 (ly:note-head::print grob))
 c4
}



#Prob: Stream_event C++: Stream_event((music-cause . #Prob: Music
C++: Music((length . #Mom 1/4) (elements) (duration . #Duration 4
) (pitch . #Pitch c' ) (origin . #location
/home/neil/Documents/test.ly:254:5))((display-methods #procedure #f
(note parser)) (name . NoteEvent) (types general-music event
note-event rhythmic-event melodic-event)) 
) (length . #Mom 1/4) (elements) (duration . #Duration 4 ) (pitch
. #Pitch c' ) (origin . #location
/home/neil/Documents/test.ly:254:5))((class . note-event)) 

From the event, you can get the pitch using ly:event-property event 'pitch.

Putting it all together:

#(define (glissando::calc-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)))

 ;; work out return value based on pitches here

 0))

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-05 Thread Marc Hohl

Neil Puttock schrieb:

2009/5/2 Marc Hohl m...@hohlart.de:
  

I have made some observations concerning \glissando:

1) accidentals are not recognised properly; I know this is in the bug list
and there are workarounds,
 see http://lists.gnu.org/archive/html/bug-lilypond/2005-08/msg00235.html



This isn't at all straightforward to fix (I had a stab at it a while
ago, and it's tricky to get the positioning correct on the right hand
side because the accidental changes the anchor point for the end of
the glissando.)

  

2) the glissando line between half steps should indicate the direction;
 e.g. a glissando line between c and c# should raise a bit and not be
parallel to the staff lines;

3) in tablature, the glissando is always indicated upwards, but it should be
drawn in respect to the fret number;
 e.g. 3/5\3, not 3/5/3;

Should (2) and (3) be considered as bugs? I have found a request from
9/2005:



Probably.

It should be quite easy to fix both problems with a callback for
'extra-dy (see below)

  

http://lists.gnu.org/archive/html/bug-lilypond/2005-09/msg00112.html

and it seems to me that this has been partly implemented
(the lines betweeen fret numbers are now sloped, so there _has_ been some
progress).

Are there any hints/workarounds to solve this problem?



From the glissando you can get the left and right noteheads using
ly:spanner-bound, from which it's possible to retrieve the pitches. A
simple comparision of pitches should allow you to set the correct
return value for 'extra-dy.
  
Thanks for your informations. I did a lot of git grep in the sources, 
but I didn't find
very much about invoking ly:spanner-bound. How can I obtain the value 
for the first argument,

i.e. the slur of (ly:spanner-bound slur dir)?

For TabVoice.Glissando, you can get the staff-positions for the
bounding notes, so it's possible to apply extra-dy only for glissandos
between tab notes on the same line.

Regards,
Neil

  




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-02 Thread Neil Thornock
See if anything here helps:

http://lilypond.org/doc/v2.12/Documentation/user/lilypond-internals/Glissando#Glissando

Also search the archives for glissando and bound-details - the answer
is in there.

Good luck!
Neil

On Sat, May 2, 2009 at 7:20 AM, Marc Hohl m...@hohlart.de wrote:
 I have made some observations concerning \glissando:

 1) accidentals are not recognised properly; I know this is in the bug list
 and there are workarounds,
  see http://lists.gnu.org/archive/html/bug-lilypond/2005-08/msg00235.html

 2) the glissando line between half steps should indicate the direction;
  e.g. a glissando line between c and c# should raise a bit and not be
 parallel to the staff lines;

 3) in tablature, the glissando is always indicated upwards, but it should be
 drawn in respect to the fret number;
  e.g. 3/5\3, not 3/5/3;

 Should (2) and (3) be considered as bugs? I have found a request from
 9/2005:

 http://lists.gnu.org/archive/html/bug-lilypond/2005-09/msg00112.html

 and it seems to me that this has been partly implemented
 (the lines betweeen fret numbers are now sloped, so there _has_ been some
 progress).

 Are there any hints/workarounds to solve this problem?

 Thanks in advance,

 Marc


 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 http://lists.gnu.org/mailman/listinfo/lilypond-user




-- 
Neil Thornock, D.M.
Assistant Professor of Music
Composition/Theory
Brigham Young University
http://neilthornock.net


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: missing glissando features (bugs?)

2009-05-02 Thread Neil Puttock
2009/5/2 Marc Hohl m...@hohlart.de:
 I have made some observations concerning \glissando:

 1) accidentals are not recognised properly; I know this is in the bug list
 and there are workarounds,
  see http://lists.gnu.org/archive/html/bug-lilypond/2005-08/msg00235.html

This isn't at all straightforward to fix (I had a stab at it a while
ago, and it's tricky to get the positioning correct on the right hand
side because the accidental changes the anchor point for the end of
the glissando.)

 2) the glissando line between half steps should indicate the direction;
  e.g. a glissando line between c and c# should raise a bit and not be
 parallel to the staff lines;

 3) in tablature, the glissando is always indicated upwards, but it should be
 drawn in respect to the fret number;
  e.g. 3/5\3, not 3/5/3;

 Should (2) and (3) be considered as bugs? I have found a request from
 9/2005:

Probably.

It should be quite easy to fix both problems with a callback for
'extra-dy (see below)

 http://lists.gnu.org/archive/html/bug-lilypond/2005-09/msg00112.html

 and it seems to me that this has been partly implemented
 (the lines betweeen fret numbers are now sloped, so there _has_ been some
 progress).

 Are there any hints/workarounds to solve this problem?

From the glissando you can get the left and right noteheads using
ly:spanner-bound, from which it's possible to retrieve the pitches. A
simple comparision of pitches should allow you to set the correct
return value for 'extra-dy.

For TabVoice.Glissando, you can get the staff-positions for the
bounding notes, so it's possible to apply extra-dy only for glissandos
between tab notes on the same line.

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user