Autor Thema: markup auf Variable  (Gelesen 1266 mal)

iugin

  • Member
markup auf Variable
« am: Sonntag, 2. November 2014, 18:00 »
Hallo miteinander

kurze Frage: wie kriege ich den \markup auf einer Variable, welche eine Note repräsentiert?
Beispiel:
\version "2.18.2"

fn = #(define-music-function (parser location n)
        (ly:music?)
        #{
          $n^\markup{hallo} % <-- das geht nicht.
        #})

{ \fn c'4 }

Danke für die Antwort und einen schönen Abend

Eugenio

iugin

  • Member
Re: markup auf Variable
« Antwort #1 am: Sonntag, 2. November 2014, 18:21 »
...ist vielleicht diese die einzige Möglichkeit?
\version "2.18.2"

fn = #(define-music-function (parser location n)
        (ly:music?)
       (set! (ly:music-property n 'articulations)
        (cons (make-music 'TextScriptEvent
               'direction
                  1
                  'text
                  (markup #:line (#:simple "hallo")))
              (ly:music-property n 'articulations)))
  n)

{ \fn c'4 }

Grüsse

Eugenio