Hi Br. Samuel, 

the only thing I can offer is to give your function a second (optional)
argument. 
If it is a markup, it is attached to the note, otherwise it's just ignored. 
Drawback: you have to choose in advance if the markup will be attached above
or below the note. 

I hope someone with deeper knowledge than mine can chime in here... 
Maybe it's possible to extract the pitch and eventually attached markup from
a music expression.

% --------------------------------------------------------------
\version "2.19.53"
\language "english"

hold = #(define-music-function (note text) (ly:pitch? scheme?)
          (if (markup? text)
              #{ $note 2 ^$text  #}
              #{ $note 2 #}))

global = { \key c \major \omit Stem \set Score.timing = ##f }

music = {
  \hold b-flat'
  \markup {Cantor}
  \hold c''
  a' g' f' \bar "|"
}

\new Staff \with {
  \remove "Time_signature_engraver"
} {
  \new Voice = "mel" {\voiceOne \global \music}
}
% --------------------------------------------------------------

Cheers, 
Klaus



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Music-functions-and-markup-tp198287p198293.html
Sent from the User mailing list archive at Nabble.com.

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

Reply via email to