On Wed, Feb 27, 2013 at 3:24 PM, SoundsFromSound
<soundsfromso...@gmail.com>wrote:

> Nathan:
>
> Wow, that comes out amazingly in LilyPond when I render it - how did you
> know how to do all that? Damn, I wish I could be that savvy :)
>
> It's not *essential* that the line be centered, I was just trying to make
> this as "neat" on the eyes as possible - it's absolutely FINE if it must
> stay up in that RH area of the piano's grand staff.
>
> Thank you again!
>
> May I ask one more thing of you?  Can you briefly explain the various parts
> of the code you added, and touch upon what does what for the output?
>
> Ben
>
>
First off, Eluze's solution is brilliant. #'line-positions never crossed my
mind.

Here are the annotations as requested.

right = \relative c'' {
  \global
  c4 d e f | R1 | R1 | c4 f g f
  % \stopStaff and \startStaff are covered in the docs:
  %
http://lilypond.org/doc/v2.16/Documentation/notation/modifying-single-staves#staff-symbol
  % The staff symbol has to be stopped and restarted to be able to change
the line count.
  \stopStaff
  % This adjusts the extent of the barline.
  % See what happens if you remove it.
  \once \override Staff.BarLine #'bar-extent = #'(-2 . 2)
  % This sets the staff to have only one line.
  \override Staff.StaffSymbol #'line-count = #1
  % This forces all the notes to the middle line.
  % See http://lsr.dsi.unimi.it/LSR/Item?id=778
  \set squashedPosition = #0
  % x note heads
  \xNotesOn
  \startStaff
  c4 c4 c4 c4 | c4 c4 c4 c4 | c4 c4 c4 c4
  \stopStaff
  % Return the line count to normal.
  \revert Staff.StaffSymbol #'line-count
  % And stop squashing the pitches.
  \unset squashedPosition
  % And turn off the note heads.
  \xNotesOff
  \startStaff
  c4 d4 e4 f4 | g4 r4 r2
}

Regards,
Nathan
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to