Stem duration

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

Stem duration

Knut Petersen
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?

Knut


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

StemDurBug.ly (1K) Download Attachment
dak
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stem duration

dak
Knut Petersen <[hidden email]> 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
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stem duration

Knut Petersen
Am 05.07.2017 um 10:26 schrieb David Kastrup:
> Knut Petersen <[hidden email]> 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
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
dak
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stem duration

dak
Knut Petersen <[hidden email]> writes:

> Am 05.07.2017 um 10:26 schrieb David Kastrup:
>> Knut Petersen <[hidden email]> 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
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stem duration

Simon Albrecht-2
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
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Stem duration

Knut Petersen
Am 06.07.2017 um 00:03 schrieb 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.
>

Thanks for explaining that to me. I found those constructs in the Schirmer 221 edition.
It's interesting to see that Bach himself uses some other kind of notation, compare e.g.
the start of the Ciaccona in d flat in his own manuscript and the Schirmer edition.

Back to my problem: I think I have to use some heuristics to determine the duration
of stems and flags ...

Knut

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Loading...