lilypond-user
[Top][All Lists]
Advanced

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

Re: How to cross-staff beam different length notes in a chord.


From: Mark Witmer
Subject: Re: How to cross-staff beam different length notes in a chord.
Date: Sat, 8 Dec 2012 11:53:35 -0500

Hi Arie,

The stem span engraver checks to see if the X-extent of the stems of the two notes are close enough to justify replacement with a single stem, and it has a very low tolerance (0.0001pt). Because the glyphs for the open note head and closed head have slightly different widths at the same font, the check fails. One kind of hackish solution is to subtly decrease the font size in the staff with the half note like this:

\version "2.16.0"

\score {
  \new PianoStaff \with { \consists #Span_stem_engraver }{
    << 
      \new Staff \relative c' {
\set Staff.fontSize = #-0.472 \crossStaff f2 \set Staff.fontSize = #0
      }
      \new Staff \relative c' { \clef bass
<< { \crossStaff {<< <d b f>4^\p >> } } \\ { <b, b,>2 } >>
      }
    >>
  }
}

I arrived at -0.472 after a lot of trial and error, and I had to add some code that displayed the X-extent of the two stems so I knew when I was getting close.

Then the engraver will happily connect the stems (or at least it did for me!) You can also increase the font size in the bottom voice for similar results.

-- Mark


On Sat, Dec 8, 2012 at 5:37 AM, Arle Lommel <address@hidden> wrote:
Hello all,

Thanks for those of you who tried to help me with some choral music issues a few weeks ago. I've encountered a new problem where I'm hoping someone might have a suggestion that is useful.

I am working with a nineteenth century piece by Gottschalk. It has frequent passages like this:


I'm using Lilypond 2.16.0 and am looking for how to handle the cross staff beaming in the chord in the first beat where the top note is a 2 and the others are 4s. 

My minimal example is this:


top = { \change Staff = "top" }
bottom = { \change Staff = "bottom" }

staffPiano = \new PianoStaff {
\set PianoStaff.instrumentName = #"Piano"
\time 3/4
<<
\context Staff = "top" { 
\clef treble
\key b \major
\relative c' {
<< { \stemUp fis2 } \\ { \bottom \stemUp  \once \override Stem #'cross-staff = ##t \once \override Stem #'length = #25 \once \override NoteColumn #'ignore-collision = ##t <fis, b dis>4^"   Ben marcato e sostenuto il canto" \top \stemNeutral <fis'' b dis>8_"m.g." b,8\rest <cisis, gis'>4 } \\ { \tiny d'''8\rest \ottava #1 \stemUp dis32 fis32 dis32 fis,32 \ottava #0 b4\rest fis4\rest | } >> |
}
}
\context Staff = "bottom" { 
\clef bass
\key b \major
\relative c, {
\stemDown <b b'>2^\p <eis' b'>4 |
}
}
>>
}

Which mostly works



However, the stems are slightly misaligned. Not a huge deal, but it looks a bit sloppy.



Any better way to handle this?

These chords with different note lengths are terribly common in this piece, so I will run into this more than once.

Bes regards,

-Arle

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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