LSR/475

< LSR
Zur Navigation springen Zur Suche springen
PD Der Inhalt dieser Seite wurde aus dem LilyPond Snippet Repository übernommen und steht unter folgender Lizenz: CC0.
See Public Domain Help Pages for more info.
PD
Customising note heads

LSR Snippet Nr. 475

Beschreibung

There are two things you need to do to create arbitrary noteheads:
  1. change the NoteHead stencil to the text-interface.
  2. define the text attribute of the NoteHead. It accepts any markup. The easiest thing to do is to simply call a musicglyph, as in this example.
auto
%% http://lsr.di.unimi.it/LSR/Item?id=475
%% see also http://lilypond.org/doc/v2.18/Documentation/notation/note-heads

%LSR This snippet was contributed by Victor Adan

headCircle   = {
\once \override NoteHead.stencil = #ly:text-interface::print
\once \override NoteHead.text = #(markup #:musicglyph "scripts.flageolet" ) }

headPlus        = {
\once \override NoteHead.stencil = #ly:text-interface::print
\once \override NoteHead.text = #(markup #:musicglyph "scripts.stopped") }

{
  \headCircle
  c'4
  \headPlus
  d'4
  % normal
  e'4
}
%% http://lsr.di.unimi.it/LSR/Item?id=475
%% see also http://lilypond.org/doc/v2.18/Documentation/notation/note-heads

%LSR This snippet was contributed by Victor Adan

headCircle   = {
\once \override NoteHead.stencil = #ly:text-interface::print
\once \override NoteHead.text = #(markup #:musicglyph "scripts.flageolet" ) }

headPlus        = {
\once \override NoteHead.stencil = #ly:text-interface::print
\once \override NoteHead.text = #(markup #:musicglyph "scripts.stopped") }

{
  \headCircle
  c'4
  \headPlus
  d'4
  % normal
  e'4
}

Unterseiten