Hello Adrian, as Aaron said there are some arguments to defining functions to give access to the parser and the layout that have been made optional since 2.20. That being said, 2.18.2 is now nearly 8 years old. Unless there is a good reason for the old version consider switching to a recent version. In these 8 years Lilypond has gained a lot of functionality, improvements to existing functionality and bug fixes while also making the language easier to work with.
Cheers, Valentin 17.12.2021 10:12:19 Aaron Hill <lilyp...@hillvisions.com>: > On 2021-12-17 12:37 am, Adrian Oehm wrote: >> I’ve tried the code you supplied, but unfortunately I keep getting the >> following error: >> "ly-syntax-constructors.scm:56:23: Wrong number of arguments to >> #<procedure #f (m)>" >> I get this trying to compile both with the code in my document and >> also trying to compile yours. One important thing I didn’t mention is >> I’m still using 2.18.2 - I’m not sure if the code is trying to >> reference things that are in later versions. > > The define-*-function procedures changed between 2.18 and 2.20. You will > need to explicitly name the parser and location arguments if you are running > an older version: > > %%%% > addTieStart = > #(define-music-function (parser location m) (ly:music?) > ^^^^^^^^^^^^^^^ > %%%% > > > -- Aaron Hill