Re: Stem duration

2017-07-05 Thread Simon Albrecht

On 05.07.2017 15:33, David Kastrup wrote:

Interesting. Noteheads of different duration attached to a single stem?
I don't remember to have seen something like that, and google does not
really help. Which instrument uses such a notation, could you give an
example?

I've seen it in the solo partitas and sonatas for violin from Bach and
would assume that they are also to be found in the cello suites.


Both Bach and Mozart wrote this using more than one voice, even for non 
divisi violins. However, later centuries introduced the notation with 
different durations on one stem; this is commonly achieved in LilyPond 
by overriding duration-log on note-heads, not by actual duration.


Best, Simon

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Stem duration

2017-07-05 Thread David Kastrup
Knut Petersen  writes:

> Am 05.07.2017 um 10:26 schrieb David Kastrup:
>> Knut Petersen  writes:
>>
>>> Shouldn't a stem not have a duration equal to the duration of the
>>> notehead it is attached to?
>> A stem could be attached to several different noteheads ("string
>> chords", usually arpeggiated in some manner).  LilyPond does not do this
>> well currently but that does not mean that it shouldn't: it is a common
>> type of notation.
> Interesting. Noteheads of different duration attached to a single stem?
> I don't remember to have seen something like that, and google does not
> really help. Which instrument uses such a notation, could you give an
> example?

I've seen it in the solo partitas and sonatas for violin from Bach and
would assume that they are also to be found in the cello suites.

>> So assigning a duration to a stem seems like something that would not
>> universally work anyway.
>
> Actually it's documented that stems have a duration,

Yes?

> and it would be quite useful for me:

> I try to extend my video generation script to change the color of the
> notes that are sounding at a certain moment. If there is a note still
> active in one voice while a new note is played in another voice _both_
> should be colored ... that's only easy/reliable if noteheads, rests,
> stems, flags and lyric syllables all have a correct duration.
>
> AFAICS only the duration of noteheads and rests is really usable in
> lilypond.

Well, you are right that Stem appears to have a duration callback.  But
your code does not even look at it.  It checks whether the Stem has a
cause that is an event (but stems are rather caused by noteheads) and if
it has (which it hasn't), you take the duration from there.

I haven't taken a look at just what the stem duration callback delivers
but I assume that with single or identical noteheads, the result should
be useful.

-- 
David Kastrup

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Stem duration

2017-07-05 Thread Knut Petersen

Am 05.07.2017 um 10:26 schrieb David Kastrup:

Knut Petersen  writes:


Shouldn't a stem not have a duration equal to the duration of the
notehead it is attached to?

A stem could be attached to several different noteheads ("string
chords", usually arpeggiated in some manner).  LilyPond does not do this
well currently but that does not mean that it shouldn't: it is a common
type of notation.

Interesting. Noteheads of different duration attached to a single stem?
I don't remember to have seen something like that, and google does not
really help. Which instrument uses such a notation, could you give an
example?


So assigning a duration to a stem seems like something that would not
universally work anyway.


Actually it's documented that stems have a duration, and it would be quite 
useful for me:
I try to extend my video generation script to change the color of the notes 
that are
sounding at a certain moment. If there is a note still active in one voice 
while a new
note is played in another voice _both_ should be colored ... that's only 
easy/reliable
if  noteheads, rests, stems, flags and lyric syllables all have a correct 
duration.

AFAICS only the duration of noteheads and rests is really usable in lilypond.

Knut


___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Stem duration

2017-07-05 Thread David Kastrup
Knut Petersen  writes:

> Hi everybody!
>
> If I feed the attached score to lilypond I read:
>
>[...]
>Drawing systems...
>  0.0 note 1.0
>  0.0 stem 0.0
>  1.0 note 0.5
>  1.0 stem 0.0
>  1.5 note 0.5
>  1.5 stem 0.0
>  2.0 note 0.25
>  2.0 stem 0.0
> 2.25 note 0.125
> 2.25 stem 0.0
>2.375 note 0.125
>2.375 stem 0.0
>  2.5 note 0.0625
>  2.5 stem 0.0
>   2.5625 note 0.0625
>   2.5625 stem 0.0
>2.625 note 0.03125
>2.625 stem 0.0
>  2.65625 note 0.03125
>  2.65625 stem 0.0
>[...]
>
> Column 1: moment
> Column 2: type of grob
> Column 3: duration
>
> Shouldn't a stem not have a duration equal to the duration of the
> notehead it is attached to?

A stem could be attached to several different noteheads ("string
chords", usually arpeggiated in some manner).  LilyPond does not do this
well currently but that does not mean that it shouldn't: it is a common
type of notation.

So assigning a duration to a stem seems like something that would not
universally work anyway.

-- 
David Kastrup

___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond