lilypond-user
[Top][All Lists]
Advanced

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

Re: Show Ledger Lines for Hidden Notes


From: Thomas Morley
Subject: Re: Show Ledger Lines for Hidden Notes
Date: Tue, 27 Sep 2011 12:04:02 +0200

2011/9/27 Javier Ruiz-Alma <address@hidden>
Am 27.09.2011 08:17, schrieb Javier Ruiz-Alma:
> I wish to show a staff with a few ledger lines above/below an empty staff.
> I don't want any notes to show.  However LilyPond will not generate Ledger lines for invisible notes, so transparency overrides or \hideNotes commands I've tried take out the note heads as well as the accompanying ledger lines.
> Is there a way to force the ledger lines to be typeset while hiding the underlying note?
> Below is the snippet I'm testing this with.  Thx! Javier
>  \version "2.14.2"
>  \score
>    { \new Staff \with {
>        \remove Bar_engraver
>        firstClef = ##f
>        }
>          {
> %% I'm looking for a way to hide the noteheads, but still show the ledger lines.
>  %%uncommenting the command below will erase both notes and ledger lines
>          %\override NoteHead #'stencil = #point-stencil
I think you'll have to make the note heads invisible:
\override NoteHead #'transparent = ##t

then the ledger lines should still appear (untested!)

HTH,

Marc
>          \override Stem #'transparent = ##t
>          a''4  c''' c' a
>          }
>        \layout {
>          indent = 0\in
>          ragged-right = ##t
>          }
> }
>
YES!  Indeed, ledgers still show with your recommendation

Hi Javier,

I'd prefer to change \hideNotes, \unHideNotes from property-init.ly to affect dots, beams and accidentals too.

\version "2.14.2"

% see property-init.ly

customHideNotes = {
  % hide notes, accidentals, etc.
  \override Dots #'transparent = ##t
  \override NoteHead #'transparent = ##t
  %\override NoteHead #'no-ledgers = ##t
  \override Stem #'transparent = ##t
  \override Beam #'transparent = ##t
  \override Accidental #'transparent = ##t
}
customUnHideNotes = {
  \revert Accidental #'transparent
  \revert Beam #'transparent
  \revert Stem #'transparent
  \revert NoteHead #'transparent
  %\revert NoteHead #'no-ledgers
  \revert Dots #'transparent
}

\version "2.14.2"
 \score
    { \new Staff \with {
        \remove Bar_engraver
        firstClef = ##f
        }
         {
              \customHideNotes
          a''4  c''' c' a \break
               \customUnHideNotes
          a''4  c''' c' a
         }
        \layout {
         indent = 0\in
         ragged-right = ##t
         }
     }

Cheers,
  Harm


reply via email to

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