lilypond-user
[Top][All Lists]
Advanced

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

Writing a function


From: Rok Kršmanc
Subject: Writing a function
Date: Sun, 12 May 2019 09:59:48 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Hi!

I would like to write a function for the next music expression:
\once \override TextScript.extra-offset = #'(0 . 1)
c^"o"

Here is my try:
f =
#(define-music-function (parser location offset music)
  (number? ly:music?)
  #{
    \once \override TextScript.extra-offset = #'(0 . $offset)
    $music ^"o"
  #})

When I call this function:
\f #1 c

I get syntax error:
unexpected '^'

What am I doing wrong?



reply via email to

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