[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Snippet: Customizing markFormatter
From: |
Valentin Villenave |
Subject: |
Re: Snippet: Customizing markFormatter |
Date: |
Fri, 22 Mar 2019 09:32:59 +0100 |
On 3/21/19, Aaron Hill <address@hidden> wrote:
> In an attempt to hide the Scheme-ness of the above approach, I put
> together the following music function which replaces placeholder strings
> within the provided markup with the output of the specified formatter
> function:
Hi Aaron,
I like what you’re doing! I wonder, though, if there couldn’t be a way
of ``hiding the Scheme-ness’’ without having to add a whole new
function. Besides, \set <property> = <value> is not something we
necessarily want to hide.
In other words, I dream of having the ability to do just:
\set Score.markFormatter = \markup \italic \etc
Now, the current "formatter" functions act in two ways: translating
(determining whether marks should be expressed as roman/arabic
numbers, upper/lower case letters including "i" or not) and formatting
(do we want marks to be circled or boxed or italicized or whatever). I
think it would be saner to separate the two:
\set Score.markFormatter = \markup \box \italic #uppercase-letter-etc
\set Score.markFormatter = \markup \circle #arabic-number-etc
I used # instead of \ to clearly illustrate that the last item is not
a markup function, but it could (should) be otherwise.
Would you agree with such a solution? (Regardless of how we implement it.)
V.