Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-20 Thread Mark Polesky
Graham Percival wrote:
> Could you stick the next version of this patch on Reitveld?  I
> think there's enough interest, and enough opinions on it, that
> this would be worthwhile.

I've not changed anything since last post, but here it is:

http://codereview.appspot.com/2226045/

- Mark




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


Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-19 Thread Graham Percival
On Sat, Sep 18, 2010 at 06:59:13PM -0700, Mark Polesky wrote:
> Graham Percival wrote:
> > - I don't like the @example; could you use @enumerate
> >   instead?
> 
> I agree with Trevor; that would add extra space.
 
> > ... actually, do we really need the @example (or
> > @enumerate) ?  The image looks great.  What about removing
> > the @example entirely?
> 
> I was thinking of our visually-impaired users.

That's a good point -- but OTOH, support for visually-impared
users is precisely why we heavily discourage non-verbatim
@lilypond.  I think this stuff can be done nicely while keeping to
the general doc policies.  What about something like this:

- (untested code, and didn't think about the pitches)
When entering multiple voices, always put the highest voice first
and the lowest voice second.  Additional voices should alternate
between next-highest and next-lowest:

@lilypond[blah]
\new Staff <<
  { b'2 }   % 1: highest voice
  \\
  { g,2 }   % 2: lowest voice
  \\
  { g'2 }   % 3: second-highest
  \\
  { d2 }   % 4: second-lowest voice
  \\
  { b'2 }   % 5: third-highest voice
  \\
  { b2 }   % 5: third-lowest voice
>>
@end[lilypond]
-

You could then go into the long verbatim-less @lilypond that shows
these with fingers.


Could you stick the next version of this patch on Reitveld ?  I
think there's enough interest, and enough opinions on it, that
this would be worthwhile.

Cheers,
- Graham

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


Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-19 Thread Trevor Daniels


Mark Polesky wrote Sunday, September 19, 2010 7:51 AM



Carl Sorensen wrote:

Well, the Notation Reference is supposed to contain all
the information necessary to understand all the notation.

If the information on voices isn't in the Notation
Reference, then we'll need to have links from the NR to
the LM for fundamental operation of commands.

We don't want to have duplication.  Although I didn't
mention it this way before, I think that we need this
information in the NR.


Hmm.  Now I'm inclined to agree with Carl.  Here's a new
patch.  What do you guys think of the new placement.  Do you
think the text flows well in this order, etc.?


I'm not particularly opposed to placing this in the
NR, but it's not clear what you are suggesting here.
Do you mean to leave the LM unchanged, or do you intend
to remove or change the corresponding section there?

Also, if it is to go in the NR it needs a separate
section heading.  At the moment it appears under
"The double backslash construct", whereas it applies
equally to explicitly instantiated voices.  Maybe
something like "Voice order"?

Trevor





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


Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Mark Polesky
Carl Sorensen wrote:
> Well, the Notation Reference is supposed to contain all
> the information necessary to understand all the notation.
>
> If the information on voices isn't in the Notation
> Reference, then we'll need to have links from the NR to
> the LM for fundamental operation of commands.
>
> We don't want to have duplication.  Although I didn't
> mention it this way before, I think that we need this
> information in the NR.

Hmm.  Now I'm inclined to agree with Carl.  Here's a new
patch.  What do you guys think of the new placement.  Do you
think the text flows well in this order, etc.?

- Mark


  From 403b59ec392fd6444b4b8733322bc5474452a4ae Mon Sep 17 00:00:00 2001
From: Mark Polesky 
Date: Sat, 18 Sep 2010 23:40:50 -0700
Subject: [PATCH] Doc: NR 1.5.2: Clarify voice order; \shiftOn etc.

---
 Documentation/notation/simultaneous.itely |  147 +++-
 1 files changed, 141 insertions(+), 6 deletions(-)

diff --git a/Documentation/notation/simultaneous.itely 
b/Documentation/notation/simultaneous.itely
index 529b588..8427a7b 100644
--- a/Documentation/notation/simultaneous.itely
+++ b/Documentation/notation/simultaneous.itely
@@ -365,6 +365,83 @@ voices are given the settings equivalent to the effect of 
the
 @code{\voiceOne} ... @code{\voiceFour} commands, in the order in
 which they appear in the code.
 
+When entering multiple voices in the input file, always put the
+highest voice first and the lowest voice second.  Enter any
+additional voices in this order:
+
+...@example
+Voice 1: highest
+Voice 2: lowest
+Voice 3: second highest
+Voice 4: second lowest
+Voice 5: third highest
+Voice 6: third lowest
+etc.
+...@end example
+
+Though this may seem counterintuitive, it simplifies the automatic
+layout process.  Note that the odd-numbered voices are given
+upstems, and the even-numbered voices are given downstems:
+
+...@c do not use verbatim here
+...@lilypond[quote]
+\new Staff {
+  \override Staff.Fingering #'whiteout = ##t
+  \time 2/4
+  <<
+{ b'2^1 }   % 1
+\\ { g'2_2 }% 2
+  >>
+  <<
+{ d''2^1 }  % 1
+\\ { g'2_2 }% 2
+\\ { \set fingeringOrientations = #'(right)
+ 2 }  % 3
+  >>
+  <<
+{ d''2^1 }  % 1
+\\ { e'2_2 }% 2
+\\ { 2 }  % 3
+\\ { \set fingeringOrientations = #'(left)
+ 2 }  % 4
+  >>
+  <<
+{ f''2^1 }  % 1
+\\ { e'2_2 }% 2
+\\ { \override Fingering #'extra-offset = #'(0.7 . 1.4)
+ 2 } % 3
+\\ { 2 }  % 4
+\\ { \set fingeringOrientations = #'(right)
+ 2 }  % 5
+  >>
+  <<
+{ f''2^1 }  % 1
+\\ { c'2_2 }% 2
+\\ { \override Fingering #'extra-offset = #'(0.6 . 1.4)
+ 2 } % 3
+\\ { \override Fingering #'extra-offset = #'(-0.6 . -2)
+ 2 }  % 4
+\\ { 2 }  % 5
+\\ { \set fingeringOrientations = #'(left)
+ 2 }  % 6
+  >>
+}
+...@end lilypond
+
+For example, the third measure above could be entered like this:
+
+...@example
+<<
+  @{ d2 @}  % highest
+  \\
+  @{ e,2 @} % lowest
+  \\
+  @{ b'2 @} % second highest
+  \\
+  @{ g2 @}  % second lowest
+>>
+...@end example
+
 In the following example, the intermediate voice has stems up,
 therefore we enter it in the third place, so it becomes voice
 three, which has the stems up as desired.  Spacer rests are
@@ -600,12 +677,70 @@ then works properly.
 >>
 @end lilypond
 
-The @code{\shiftOn}, @code{\shiftOnn}, and @code{\shiftOnnn}
-commands specify the degree to which chords of the current voice
-should be shifted.  The outer voices (normally: voices one and
-two) have @code{\shiftOff}, while the inner voices (three and
-four) have @code{\shiftOn}.  @code{\shiftOnn} and
-...@code{\shiftonnn} define further shift levels.
+The @code{\shiftOn} command allows (but does not force) the notes
+in a voice to be shifted.  When @code{\shiftOn} is applied to a
+voice, a note or chord in that voice is shifted only if its stem
+would otherwise collide with a stem from another voice, and only
+if the colliding stems point in the same direction.  The
+...@code{\shiftoff} command prevents this type of shifting from
+occuring.
+
+By default, the outer voices (normally voices one and two) have
+...@code{\shiftoff} specified, while the inner voices (three and
+four) have @code{\shiftOn} specified.  When a shift is applied,
+voices with upstems (voices one and three) are shifted to the
+right, and voices with downstems (voices two and four) are shifted
+to the left.
+
+The following image shows the four voices in their conventional
+positions, with the default shifts applied:
+
+...@c do not use verbatim here
+...@lilypond[quote]
+\new Staff {
+  \time 2/4
+  \once \override Staff.Fingering #'whiteout = ##t
+  <<
+{ f''2^1 }
+\\ { g'2_2 }
+\\ { \set fingeringOrientations = #'(right) 2 }
+\\ { \set fingeringOrientations = #'(left) 2 }
+  >>
+}
+...@end lilypond
+
+Here is an example to help you visualize how an abbreviated
+polyphonic expression woul

Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Carl Sorensen



On 9/18/10 7:59 PM, "Mark Polesky"  wrote:

> Carl, it looks like you're outnumbered wrt to LM vs. NR, but
> feel free to protest against us masses, we'll listen.

Well, the Notation Reference is supposed to contain all the information
necessary to understand all the notation.

If the information on voices isn't in the Notation Reference, then we'll
need to have links from the NR to the LM for fundamental operation of
commands.

We don't want to have duplication.  Although I didn't mention it this way
before, I think that we need this information in the NR.

But I am willing to defer to the rest of you, once I've made my arguments.

Thanks,

Carl


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


Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Mark Polesky
Carl, it looks like you're outnumbered wrt to LM vs. NR, but
feel free to protest against us masses, we'll listen.

Trevor, my reply to your post follows my reply to Graham's.

Graham Percival wrote:
> - I don't like the @example; could you use @enumerate
>   instead?

I agree with Trevor; that would add extra space.


> - delete the "The following image demonstrates
>   this visually"; just end with "... and the
>   even-numbered voices are given downstems."

Done.


> ... actually, do we really need the @example (or
> @enumerate) ?  The image looks great.  What about removing
> the @example entirely?

I was thinking of our visually-impaired users.


> - that said, one quibble: could the fingering for voices 5
> and 6 be placed below and above the notes?

Not sure I understand this request exactly, but I
repositioned the numbers a little more clearly (I think).
Let me know what you think.


> - could you replace "... the third measure above could be
> entered..." with "... above SHOULD be entered..." ?

Well, my thought was that there *are* other valid ways of
doing it, like using absolute mode, or entering more than
one measure at a time.  But I'll change it if you still
think it's better.


> - please avoid having @ref{A reference split across a
> linebreak} because it produces bad output in one of our
> doc formats (I forget which one, though)

Done.

* * * * * * * * * *

Trevor Daniels wrote:
> One comment.  The example which follows the first part of
> the patch, Chopin's Deux Nocturnes, Op 32, does not follow
> this new advice!  Should it be reworked also?

Good catch!  Yes, ultimately I think this should be
reworked, but it's not so urgent right now.

- Mark


  From 92490d97a8293ec1121e23fbe086a3bd7f37248b Mon Sep 17 00:00:00 2001
From: Mark Polesky 
Date: Sat, 18 Sep 2010 18:56:43 -0700
Subject: [PATCH] Doc: LM 3.2: Entering voices in the correct order.

---
 Documentation/learning/fundamental.itely |  184 +
 1 files changed, 158 insertions(+), 26 deletions(-)

diff --git a/Documentation/learning/fundamental.itely 
b/Documentation/learning/fundamental.itely
index 811b1dc..03ef346 100644
--- a/Documentation/learning/fundamental.itely
+++ b/Documentation/learning/fundamental.itely
@@ -670,12 +670,92 @@ separately, like this:
 @cindex ties crossing brackets
 
 This example has just two voices, but the same construct may be
-used to encode three or more voices by adding more back-slash
+used to encode three or more voices by adding more backslash
 separators.
 
-The Voice contexts bear the names @code{"1"}, @code{"2"}, etc.
-In each of these contexts, the vertical direction of slurs,
-stems, ties, dynamics etc., is set appropriately.
+When entering multiple voices in the input file, always put the
+highest voice first and the lowest voice second.  Enter any
+additional voices in this order:
+
+...@example
+Voice 1: highest
+Voice 2: lowest
+Voice 3: second highest
+Voice 4: second lowest
+Voice 5: third highest
+Voice 6: third lowest
+etc.
+...@end example
+
+Though this may seem counterintuitive, it simplifies the automatic
+layout process.  Note that the odd-numbered voices are given
+upstems, and the even-numbered voices are given downstems:
+
+...@c do not use verbatim here
+...@lilypond[quote]
+\new Staff {
+  \override Staff.Fingering #'whiteout = ##t
+  \time 2/4
+  <<
+{ b'2^1 }   % 1
+\\ { g'2_2 }% 2
+  >>
+  <<
+{ d''2^1 }  % 1
+\\ { g'2_2 }% 2
+\\ { \set fingeringOrientations = #'(right)
+ 2 }  % 3
+  >>
+  <<
+{ d''2^1 }  % 1
+\\ { e'2_2 }% 2
+\\ { 2 }  % 3
+\\ { \set fingeringOrientations = #'(left)
+ 2 }  % 4
+  >>
+  <<
+{ f''2^1 }  % 1
+\\ { e'2_2 }% 2
+\\ { \override Fingering #'extra-offset = #'(0.7 . 1.4)
+ 2 } % 3
+\\ { 2 }  % 4
+\\ { \set fingeringOrientations = #'(right)
+ 2 }  % 5
+  >>
+  <<
+{ f''2^1 }  % 1
+\\ { c'2_2 }% 2
+\\ { \override Fingering #'extra-offset = #'(0.6 . 1.4)
+ 2 } % 3
+\\ { \override Fingering #'extra-offset = #'(-0.6 . -2)
+ 2 }  % 4
+\\ { 2 }  % 5
+\\ { \set fingeringOrientations = #'(left)
+ 2 }  % 6
+  >>
+}
+...@end lilypond
+
+For example, the third measure above could be entered like this:
+
+...@example
+<<
+  @{ d2 @}  % highest
+  \\
+  @{ e,2 @} % lowest
+  \\
+  @{ b'2 @} % second highest
+  \\
+  @{ g2 @}  % second lowest
+>>
+...@end example
+
+The Voice contexts are automatically assigned the names
+...@code{"1"}, @code{"2"}, etc.  In each of these contexts, the
+v

Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Trevor Daniels


Mark Polesky wrote Saturday, September 18, 2010 7:23 PM



This patch should prevent the type of confusion that
leads to bug #45:
http://code.google.com/p/lilypond/issues/detail?id=45

Comments/objections?  Okay to push?


I like it; much improved!  I (more or less[1]) agree
with Graham's comments, but unlike Carl I think this
section should remain in the LM.  It is part of a much
longer logical layout which would be broken if these
two sections were lifted out.

One comment.  The example which follows the first
part of the patch, Chopin's Deux Nocturnes, Op 32,
does not follow this new advice!  Should it be
reworked also?

[1] I like the list of voices.  Also doesn't @enumerate
introduce blank lines between items?  That would spoil
it.

Trevor



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


Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Graham Percival
On Sat, Sep 18, 2010 at 7:23 PM, Mark Polesky  wrote:
> This patch should prevent the type of confusion that
> leads to bug #45:
> http://code.google.com/p/lilypond/issues/detail?id=45

Hmm.

- I don't like the @example; could you use @enumerate instead?
- delete the "The following image demonstrates this visually"; just
end with "... and the even-numbered voices are given downstems."

... actually, do we really need the @example (or @enumerate) ?  The
image looks great.  What about removing the @example entirely?

- that said, one quibble: could the fingering for voices 5 and 6 be
placed below and above the notes?

- could you replace "... the third measure above could be entered..."
with "... above SHOULD be entered..." ?


- please avoid having @ref{A reference
split across a linebreak}
because it produces bad output in one of our doc formats (I forget
which one, though)

Cheers,
- Graham

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


Re: [PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Carl Sorensen



On 9/18/10 12:23 PM, "Mark Polesky"  wrote:

> This patch should prevent the type of confusion that
> leads to bug #45:
> http://code.google.com/p/lilypond/issues/detail?id=45
> 
> Comments/objections?  Okay to push?

I like the documentation, as it clarifies things.  But I think it's too much
detail for the learning manual.  We ask people to *read* the learning
manual, and most people will have no need for 6 voices.

Can this information be moved from the Learning Manual to the Notation
Reference, section 1.5.2?  I think it could profitable be moved there,
practically verbatim.

Thanks,

Carl


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


[PATCH]: Doc: LM 3.2: Entering voices in the correct order.

2010-09-18 Thread Mark Polesky
This patch should prevent the type of confusion that
leads to bug #45:
http://code.google.com/p/lilypond/issues/detail?id=45

Comments/objections?  Okay to push?
- Mark


  From e7b56245a794067916dd8766562b4a7cfb43a95a Mon Sep 17 00:00:00 2001
From: Mark Polesky 
Date: Sat, 18 Sep 2010 11:17:03 -0700
Subject: [PATCH] Doc: LM 3.2: Entering voices in the correct order.

---
 Documentation/learning/fundamental.itely |  186 +
 1 files changed, 160 insertions(+), 26 deletions(-)

diff --git a/Documentation/learning/fundamental.itely 
b/Documentation/learning/fundamental.itely
index 811b1dc..65b434d 100644
--- a/Documentation/learning/fundamental.itely
+++ b/Documentation/learning/fundamental.itely
@@ -670,12 +670,94 @@ separately, like this:
 @cindex ties crossing brackets
 
 This example has just two voices, but the same construct may be
-used to encode three or more voices by adding more back-slash
+used to encode three or more voices by adding more backslash
 separators.
 
-The Voice contexts bear the names @code{"1"}, @code{"2"}, etc.
-In each of these contexts, the vertical direction of slurs,
-stems, ties, dynamics etc., is set appropriately.
+When entering multiple voices in the input file, always put the
+highest voice first and the lowest voice second.  Enter any
+additional voices in this order:
+
+...@example
+Voice 1: highest
+Voice 2: lowest
+Voice 3: second highest
+Voice 4: second lowest
+Voice 5: third highest
+Voice 6: third lowest
+etc.
+...@end example
+
+Though this may seem counterintuitive, it simplifies the automatic
+layout process.  Note that the odd-numbered voices are given
+upstems, and the even-numbered voices are given downstems.  The
+following image demonstrates this visually:
+
+...@c do not use verbatim here
+...@lilypond[quote]
+\new Staff {
+  \override Staff.Fingering #'whiteout = ##t
+  \time 2/4
+  <<
+{ b'2^1 }   % 1
+\\ { g'2_2 }% 2
+  >>
+  <<
+{ d''2^1 }  % 1
+\\ { g'2_2 }% 2
+\\ { \set fingeringOrientations = #'(right)
+ 2 }  % 3
+  >>
+  <<
+{ d''2^1 }  % 1
+\\ { e'2_2 }% 2
+\\ { 2 }  % 3
+\\ { \set fingeringOrientations = #'(left)
+ 2 }  % 4
+  >>
+  <<
+{ f''2^1 }  % 1
+\\ { e'2_2 }% 2
+\\ { \override Fingering #'extra-offset = #'(0.7 . 0.2)
+ 2 } % 3
+\\ { 2 }  % 4
+\\ { \set fingeringOrientations = #'(right)
+ \override Fingering #'extra-offset = #'(0 . -0.2)
+ 2 }  % 5
+  >>
+  <<
+{ f''2^1 }  % 1
+\\ { c'2_2 }% 2
+\\ { 2 } % 3
+\\ { \override Fingering #'extra-offset = #'(-0.6 . -0.2)
+ 2 }  % 4
+\\ { 2 }  % 5
+\\ { \set fingeringOrientations = #'(left)
+ \override Fingering #'extra-offset = #'(0 . 0.2)
+ 2 }  % 6
+  >>
+}
+...@end lilypond
+
+For example, the third measure above could be entered like this:
+
+...@example
+<<
+  @{ d2 @}  % highest
+  \\
+  @{ e,2 @} % lowest
+  \\
+  @{ b'2 @} % second highest
+  \\
+  @{ g2 @}  % second lowest
+>>
+...@end example
+
+The Voice contexts are automatically assigned the names
+...@code{"1"}, @code{"2"}, etc.  In each of these contexts, the
+vertical direction of slurs, stems, ties, dynamics etc., is set
+appropriately.  Here is a longer example using three voices:
+
+...@c TODO: add dynamics once the "voiceOne dynamics" bug is fixed.
 
 @lilypond[quote,verbatim,fragment]
 \new Staff \relative c' {
@@ -1136,28 +1218,80 @@ as here:
 @funindex shiftOnnn
 
 Closely spaced notes in a chord, or notes occurring at the same
-time in different voices, are arranged in two, occasionally more,
-columns to prevent the note heads overlapping.  These are called
-note columns.  There are separate columns for each voice, and
-the currently specified voice-dependent shift is applied to the
-note column if there would otherwise be a collision.  This can
-be seen in the example above.  In bar 2 the C in voice two is
-shifted to the right relative to the D in voice one, and in the
-final chord the C in voice three is also shifted to the right
-relative to the other notes.
-
-The @code{\shiftOn}, @code{\shiftOnn}, @code{\shiftOnnn}, and
-...@code{\shiftoff} commands specify the degree to which notes and
-chords of the voice should be shifted if a collision
-would otherwise occur.  By default, the outer voices (normally
-voices one and two) have @code{\shiftOff} specified, while the
-inner voices (three and four) have @code{\shiftOn} specified.
-When a shift is applied, voices one and three are shifted to
-the right and voices two and four to the left.
-
-...@code{\shiftonn} and @code{\shiftOnnn} define further shift
-levels which may be specified temporaril