Am So., 21. Nov. 2021 um 01:58 Uhr schrieb Leonid Hrabovsky
<lhrabov...@gmail.com>:
>
> Hi Thomas, here is my attempt to make a new notehead out of the grob 
> neomensural94 -
>
> \version "2.20.0"
> \language "english"
>
>    \score {
>      \new Staff {
>
>     MyNoteHeads = \override NoteHead.stencil = \musiglyph 
> "timesig.neomensural94"
>
>     \relative { a'4 g f e | fs gs a2 }
>
> myNoteHeads = \override NoteHead.stencil = \timesig.neomensural94
>
> % or maybe more correct code - - -
>
> \version "2.20.0"
> \language "english"
>
>    \score {
>      \new Staff {
>
>     MyNoteHeads = \override NoteHead.stencil = \musiglyph 
> "timesig.neomensural94"
>
>     \relative { a'4 g f e | fs gs a2 }
>
> }
> }
>
> What was wrong in that code?
>
> Леонід - Leonid

Please always cc the list.

Well, what's wrong?

You need to do such definitions outside of the music at toplevel
niveau and call it _in_ music, i.e.
  myDef = ...
  { \myDef ... }

If you want some text (i.e. \markup) replacing a stencil, do
  \override NoteHead.stencil = #ly:text-interface::print
  \override NoteHead.text = \markup ...
As explained here:
http://lilypond.org/doc/v2.22/Documentation/notation/modifying-stencils

\musicglyph was misspelled.

This works:

MyNoteHeads = {
  \override NoteHead.stencil = #ly:text-interface::print
  \override NoteHead.text = \markup \musicglyph "timesig.neomensural94"
}

\new Staff \relative { \MyNoteHeads a'4 g f e | fis gis a2 }


NB The above explanations are simplified, disregarding many other
possibilities and cases.


Cheers,
  Harm

Reply via email to