2015-12-09 17:17 GMT+01:00 David Kastrup <[email protected]>:
> Thomas Morley <[email protected]> writes:
>
>> 2015-12-09 15:19 GMT+01:00 David Kastrup <[email protected]>:
>>> Thomas Morley <[email protected]> writes:
>>>
>>>> This whole stuff looks quite obfuscated to me.
>>>> Currently we do a lot of calculation to end up with then hard-coded
>>>> vectors.
>>>> Why not give the initial value directly?
>>>> Below three suggestions, via string, char-set, vector.
>>>> Maybe we could even introduce a context-property for it.
>>>
>>> I think we may be going at this the wrong way. We have a similar issue
>>> with chord names. And all of that has to be constructed ad-hoc in some
>>> manner.
>>
>>
>> Not sure I fully understand.
>> Let me try to describe what we do atm (just to clear my thoughts, but
>> limiting them to RehearsalMark).
>>
>> (1)
>> The procedure to format RehearsalMark is given by the context-property
>> `markFormatter'.
>
> This procedure receives a number and a context. It has to be defined in
> Scheme. It has to return a markup.
>
> We have stuff like
>
> Documentation/notation/rhythms.itely: \set Score.markFormatter =
> #format-mark-numbers
> Documentation/notation/rhythms.itely: \set Score.markFormatter =
> #format-mark-box-numbers
> Documentation/notation/rhythms.itely: \set Score.markFormatter =
> #format-mark-circle-numbers
> Documentation/notation/rhythms.itely: \set Score.markFormatter =
> #format-mark-circle-letters
>
> Why not
>
> \set Score.markFormat = \markup \circle \bold \markletter \etc
>
> (the latter use of \etc does not work yet but that's fixable).
>
> Suddenly we don't need all that folderol. What with marks that show the
> bar number instead (which is what the context argument is about)?
>
> Not really sure about that. Maybe the bar number should be in the
> "props" argument when formatting? That way there could be a markup
> command producing it.
Not sure why
foo-markup = \markup \bold \with-color #cyan \markletter \etc
\markup \foo #1
does not work, as opposed to
bold-red-markup = \markup \bold \with-color #red \etc
\markup \bold-red "text"
markFormatter can already be set like:
markFormatter =
#(lambda (mark ctx)
#{
\markup \bold \markletter #(1- mark)
#})
or:
markFormatter =
#(lambda (mark ctx)
#{
\markup
\bold \circle
#(number->string (ly:context-property ctx 'currentBarNumber))
#})
Though, I've no idea how to proceed from here or in which direction or
whether it can be done in scheme without C++-work at all.
Hints apreciated.
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user