Le 23/12/2022 à 17:54, Rip _Mus a écrit :
Hello everyone,
I'm working on a function that prints a personal type of tremolo.
This function has four arguments, the first and the last are optional.
The first is actually optional, as you can see in the minimal exemple attached. The last, instead, is problematic: if I omit it, there is an error.
May I ask for your help?



Trailing optional arguments are simply not supported, as they would mess up the parsing. See

https://lilypond.org/doc/v2.24/Documentation/extending/scheme-function-usage.html

If an optional argument is the last argument, the only way to use it is to put \default as a placeholder.

You can also most the 'st' argument just after 'fr'. In that case, if you want to use it, you have to specify fr with its default 1/4, because once an optional argument is skipped, all following optional arguments are skipped. (\default would not work, since it also sets all the following arguments to their default values.)

Yet another possibility is putting 'st' between 'main-note' and 'aux-pitch', in which case it will really behave in the most flexible way.

Best,
Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to