Graham Percival <gra...@percival-music.ca> writes: > On Wed, Jan 12, 2011 at 09:15:41AM +0100, Reinhold Kainhofer wrote: > >> But there is a notation for multiple stops that looks like a chord >> with notes of different duration. > > Before moving to computer science, I was a cello teacher. And I'm now > playing first violin in an orchestra doing, amongst other things, > Tchaik's Romeo and Juliet. I also played viola for half of my music > degree. I'm very familiar with (bowed) string music.
So you should be perfectly aware that the notation Reinhold refers to (including references, by the way) exists. >> > That's not a chord. That's multiple voices, and they're simple to >> > write in lilypond. Please read the learning manual. >> >> To quote Gardner Read: "Chord notation for string instruments often >> appears incorrect to the non-string player." > > There's a couple of separate issues here: > - what is the precise definition of a "chord" according to an > arbitrary violinist? > - what is the precise definition of a "chord" according to an > expert in music notation? > - what is the precise definition of a "chord" according to the > lilypond manual? > - what is the precise definition of a "chord" according to the > lilypond internal code (be it scheme or C++)? I think you are focusing on the wrong issues here. Precise definitions of "chord" don't even matter. Lilypond is not a composer, it is notation software. The purpose of notation software is to put down a suitable visible representation of how composers wish to see their concepts expressed when specified in a reasonable manner in Lilypond's input language. String music composers use chords with notes of different length. There are references for that. The execution is clear. Whether or not you like the notation or concept, it is there to stay, and saying Lilypond should not be allowed to deal with this notation well because composers should rather get a clue is putting the cart before the horse. >> As a violin can only play one note, > > two notes, you mean. If you are not worried about tonal balance all too much, three on a modern violin, and four on a HIP violin with flat bridge. Tends to sound awful, but that's not an absolute deterrent for modern composers. Or even players. > Look, if you want to get a violinist "chord", you do this: > \new Staff \relative c'' { > << > { \voiceOne g,4 } > { \voiceOne d'4 } > { \voiceOne b'4 } > { \voiceOne g'2 } > >> > } > > not hard. Wrap it up in a music function to make it easier. It works by accident, with clashing notehead warnings, and with stems that just happen to overlap if you are lucky and are not subject to Lilypond's usual operations ensuring good quality. > If somebody wants to work on adding such a music function to lilypond > itself, send an email to the frog list, or a patch to the -devel list. > If somebody wants to talk about the lilypond input syntax -- such as > making the <> construct allow different durations -- then wait until > GLISS. I resend my patch that will do the right thing when just writing << g,4 d'4 b'4 g'2 >> I sent it to the devel list. All I got was one comment that this would likely not be accepted. Questions why this was so were not replied to. One basic problem with Lilypond's voices is just that the contexts are not fine-grained enough. For proper typesetting, you would need at least one context operating _before_ stemming and beaming. Possibly even something in between. There once have been subvoices (called threads) which were removed, as far as I can tell mainly because it was hard enough as it was to specify the right context when manipulating properties, and so cutting down the number of contexts was deemed an improvement. As a result, there are quite a number of constructs in the notation manual that work with artificial voices and hidden notes, clearly not at all being a logical representation of the composer's intention. That's a deficiency, not an advantage of Lilypond. For the record, I append the patch. I tested it just slightly. One area that could be problematic is what happens in Midi, and what total time is assigned to the construct when typesetting (should likely be the shortest, and probably is just undefined in the current state of the patch).
>From 3b1f96dde917bf96adad478c9f5e033f33bbf78e Mon Sep 17 00:00:00 2001 From: David Kastrup <d...@gnu.org> Date: Wed, 12 Jan 2011 13:07:42 +0100 Subject: [PATCH 1/2] lily/stem-engraver.cc: allow distinguishable durations to be stemmed together (string chords) --- lily/stem-engraver.cc | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index d09e3b9..96ebd10 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -134,7 +134,23 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi) if (!stem_) make_stem (gi); - if (Stem::duration_log (stem_) != d->duration_log ()) + int ds = Stem::duration_log (stem_); + int dc = d->duration_log (); + + // half notes and quarter notes all have compatible stems. + // Longas are done differently (oops?), so we can't unify + // them with the other stemmed notes. + if (ds == 1) + ds = 2; + if (dc == 1) + dc = 2; + // whole notes and brevis both have no stems + if (ds == -1) + ds = 0; + if (dc == -1) + dc = 0; + + if (ds != dc) { // FIXME: gi.event_cause ()->origin ()->warning (_f ("adding note head to incompatible stem (type = %d)", -- 1.7.2.3
>From 86c2699f3a687c415b963976be238ba0202834c7 Mon Sep 17 00:00:00 2001 From: David Kastrup <d...@gnu.org> Date: Wed, 12 Jan 2011 13:08:44 +0100 Subject: [PATCH 2/2] lily/stem-engraver.cc: Improve error message for incompatible durations while stemming --- lily/stem-engraver.cc | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 96ebd10..7b6b8a3 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -152,9 +152,10 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi) if (ds != dc) { - // FIXME: - gi.event_cause ()->origin ()->warning (_f ("adding note head to incompatible stem (type = %d)", - 1 << Stem::duration_log (stem_))); + ds = Stem::duration_log (stem_); + gi.event_cause ()->origin ()->warning (_f ("adding note head to incompatible stem (type = %d/%d)", + ds < 0 ? 1 << -ds : 1, + ds > 0 ? 1 << ds : 1)); gi.event_cause ()->origin ()->warning (_ ("maybe input should specify polyphonic voices")); } -- 1.7.2.3
-- David Kastrup
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user