|
From: | Arle Lommel |
Subject: | Scheme question |
Date: | Tue, 14 Jan 2020 20:01:26 -0500 |
I am a total neophyte to Scheme, but not to coding. I’ve written a simple function, but it does not work (I’ve reduced it to just the problematic lines. Can anyone tell me how to write the line indicated below? shifter = #(define-music-function (parser location padding) (number?) #{ \once \override Accidental.extra-offset = #(cons padding . 0) %<- THIS LINE #} ) The relevant errors it throws when invoked are: error: GUILE signaled an error for the _expression_ beginning here warning: type check for `extra-offset' failed; value `#<unspecified>' must be of type `pair of numbers’ The closest thing I can find to explaining how this works is here: http://lilypond.org/doc/v2.18/Documentation/extending/scheme-function-definitions But I’m apparently missing something very obvious. -Arle |
[Prev in Thread] | Current Thread | [Next in Thread] |