Knut Petersen <knut_peter...@t-online.de> writes: > Am 05.07.2017 um 10:26 schrieb David Kastrup: >> Knut Petersen <knut_peter...@t-online.de> 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