Here's a very simplified bit of lilypond source:

\version "2.22.0"
  c'4^\markup { \note #"4" #UP } c' c' c'

I'm trying to make a quarter note appear above the staff. However, when I run Lilypond on this, I get the following output:

$ lilypond test.ly
GNU LilyPond 2.22.0
Processing `test.ly'
test.ly:3:23: error: wrong type for argument 1.  Expecting duration, found "4"
  c'4^\markup { \note 
                      #"4" #UP } c' c' c'
/usr/share/lilypond/2.22.0/scm/lily.scm:1036:21: In procedure reverse! in expression (ly:parse-file file-name):
/usr/share/lilypond/2.22.0/scm/lily.scm:1036:21: Wrong type argument in position 1: (1 "4" . #f)

What am I doing wrong?


The \note command appears to have changed argument types with the latest version of lilypond (2.22).

The documentation for version 2.20 explains the syntax for this command as:
\note duration (string) dir (number)

Whereas, in the documentation for version 2.22 it's:
\note duration (duration) dir (number)

So, because you are using version 2.22.0, you will need to change:
\note #"4" #UP
\note {4} #UP


This is not \version "2.22.0" syntax. When converting old sources to new versions, don't merely rewrite the \version header (that renders it useless) but use convert-ly -ed on the file to update both version header and file contents.

When you are updating your version of LilyPond, read the "Changes" summary in the documentation to check what syntax changes may have been made with syntax that isn't upwards-compatible.

When consulting documentation, be sure to refer to the version of documentation accompanying your version of LilyPond. Random web searches (including on Stack Exchange) might yield results not working on your version of LilyPond.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.