lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Voice split across staves?


From: Simon Albrecht
Subject: Re: Voice split across staves?
Date: Tue, 8 Sep 2015 23:27:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

Hello Joel,

Am 08.09.2015 um 22:47 schrieb Joel C. Salomon:
I’m trying to re-create John Crook’s original score to Peter Pan (yes,
it’s in the public domain) for the Mutopia project, and I’m finding that
my lack of musical education is getting in the way.

I’m trying to set “Pipe with the Ostrich”, as visible at
<https://books.google.com/books?id=J-wQAAAAYAAJ&pg=PT43>; my current
effort is at
<https://github.com/jcsalomon/MutopiaProject/blob/peterpan/ftp/CrookJ/PeterPan/PP06_Pipe_with_the_Ostrich/PP06_Pipe_with_the_Ostrich.ly>.

While critiques of my Lilypond style are also welcome,

LilyPond coding style is still very much a matter of personal preference. There are some suggestions in <http://lilypond.org/doc/v2.18/Documentation/usage/general-suggestions>, and some conventions, which partly you seem to know:
– one bar per line
– extra blank lines every n bars
– bar number comments
– { … } and similar should either go on one line or be
{
  …
}
– &c.
One thing can also be said quite definitely: Use \new if a context doesn’t exist yet and \context only to reference contexts which already exist. (Maybe others will come and contradict decisively… however I think this is a quite reasonable convention.) And there is one inofficial standard: the ‘format’ function of python-ly, used in Frescobaldi <http://frescobaldi.org>, which I do recommend. [For Scheme code there is a quite official coding style, which is quite (though not completely) well-defined and generally used: <http://community.schemewiki.org/?scheme-style>. Although you don’t happen to make notable use of Scheme code.]

Considering your particular file, I wouldn’t like the excess (if I may say so) use of whitespace. I don’t go any further than
{
  g8 a b a  b c d c
  b16 a g a  b a b c   d8 16 c  b8 16 a
}
normally. I find that more readable. But, as I said: that’s highly personal, and unfortunately we’re nowhere near any consensus which would allow everybody to read someone else’s code without getting a headache :-/.

  my specific
question is how best to show what seems to be a voice split across
staves.

Well, LilyPond’s rather strict logics (currently?) prevent such a thing like splitting a voice across staves. You’ll need separate voices, and \crossStaff – of which you are already aware – provides a facility to draw a stem across staves under standard circumstances (no force-hshift, same \voiceXXX, …).

The “Cross-staff stems” section in the documentation shows a way to draw
the chords so they cross the gap, but remain connected. One one hand,
this is different from the printed source; on the other hand, this might
be better style. On the gripping hand, I can’t see how to apply the
sample code to music organized as I’ve been doing it.

Could somebody please point me in the right direction?

See attached. I just adapted all of your code to my personal coding style, just as a suggestion so you can see what is possible.

Yours, Simon

Attachment: peter-pan-crossStaff.ly
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]