lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lower-case letter rehearsal marks


From: Thomas Morley
Subject: Re: Lower-case letter rehearsal marks
Date: Wed, 9 Dec 2015 16:48:05 +0100

2015-12-09 15:19 GMT+01:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> 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'.
(2)
We provide a lot defaults for (1) in translation-functions.scm, using
markup-commands.
`markalphabet' and `markletter' select and print the letter.
`bold, `box' and `circle' do further customizing.
(3)
`markalphabet' and `markletter' are defined in
`define-markup-commands.scm' relying on vectors.
(4)
Those vectors, `number->mark-letter-vector' and
`number->mark-alphabet-vector', are defined in
`define-markup-commands.scm' as well.

Summary (reverse order)
- vectors providing characters
- markup-commands which select and print the relevant letter
- formatter for further customizing
- context-property to set the formatter

The user can newly define a formatting procedure with those from (2)
as example, using predefined markup-commands.
Though, he has no access to the vector `markletter' etc rely on,
unless he completely redefines all steps, as I did in my previous
post.

So far what we do now, hope it's more or less correct and complete.
Now your proposal, which is not clear to me.

>
> I think it would make more sense if we had building blocks working
> purely on the markup level.  Like
>
> \letter #1
>
> which just produces a letter.  And then some markup function to format
> it.
>

Where exactly should this step in, be called later? Maybe you can
write some pseudo-code?
How to give the user access to the initial vector (or whatever
data-structure we may use). As said already, I considered a
context-property, also possible would have been a markup-property, but
I rejected this idea, because it would have been uncomfortable to use.
Other hints?


Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]