lilypond-user
[Top][All Lists]
Advanced

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

define and define-markup-command


From: Paolo Cantamessa
Subject: define and define-markup-command
Date: Tue, 22 Jan 2019 18:13:51 +0100

Hello guys,
I need to undesrtand how work "define" and "define-markup-command".

This work: --------------------------------------------------------
#(define (testA txt mus y-offset)
   #{\markup \vcenter {
     #txt
     \column {
       \null
       \vspace #1
       \score {
         { $mus }
         \layout {
           indent = 0
           \override Score.Clef.space-alist.time-signature = #'(extra-space . 0.5)
           \override Score.TimeSignature.space-alist.first-note = #'(extra-space . 0)
         }
       }
       \vspace #(1+ y-offset)
       \null
     }
     \hspace #.5
   } #})

\relative c'' {
  \set Staff.instrumentName = #(testA "Strumento" #{ c''4 #} -.01)
  c4 d e f
}
------------------------------------------------------------------------

This doesn't work:
#(define-markup-command (testB props layout txt mus y-offset)(markup? ly:music? number?)
   (interpret-markup props layout #{
     \markup \vcenter {
       #txt
       \column {
         \null
         \vspace #1
         \score {
           { $mus }
           \layout {
             indent = 0
             \override Score.Clef.space-alist.time-signature = #'(extra-space . 0.5)
             \override Score.TimeSignature.space-alist.first-note = #'(extra-space . 0)
           }
         }
         \vspace #(1+ y-offset)
         \null
       }
       \hspace #.5
     } #}))


\relative c'' {
  \set Staff.instrumentName = ""%\markup \testB "Strumento" { c''4 } #-.01
  c4 d e f
}



Mailtrack Sender notified by
Mailtrack 22/01/19, 18:13:16

reply via email to

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