lilypond-user
[Top][All Lists]
Advanced

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

Re: Function for rendering key textually in 3 languages


From: Olivier Biot
Subject: Re: Function for rendering key textually in 3 languages
Date: Sun, 4 Nov 2012 22:59:52 +0100

On Sun, Nov 4, 2012 at 5:06 PM, Thomas Morley
<address@hidden> wrote:
> 2012/11/4 Thomas Morley <address@hidden>:
>> Hi Olivier,
>>
>> a)
>> If you define a new `scoreTitleMarkup´, you have to _use_ it. :)
>>
>>     \paper {
>>             scoreTitleMarkup = \myScoreTitleMarkup
>>     }

Oops... It's defined in book-titling.ily - I modified it there. I
think I ought to clean up the set of macros I'm using.

>> b)
>> \fromproperty #'header:piece-tonality will return a stencil not a string.
>> So every markup-command or scheme-function requiering a
>> string-argument (or tries to deal with the   argument as a string)
>> will fail.
>> P.e: \markup \simple { \fromproperty #'header:piece-tonality }
>>
>> Workaround:
>> Use the markup-command/scheme-function _in_ the \header:
>>
>>     \header {
>>       piece-tonality = \markup \simple "cis-major"
>>     }

This is new to me. I didn't know what was a stencil. Makes sense.
Thanks for clarifying this issue to me.

>> c)
>> My own approach attached, converting `piece-tonality´ into german,
>> french and english.
>> Please note: I don't know how double-flat/sharp is called in french,
>> so I used "double-bémol" and "double-dièse". Should be easy to alter.

That's excellent! It does exactly what I want! Many thanks for this!
In addition, I'm now exposed to some more builtin Scheme functions and
procedures. I'm still quite new with Scheme, C/Java/PHP would have
been easier on me :-)

> forgot two things:
> (1)
> Please change the second line of the markup-command to:
>
>   (let* ((arg (string-downcase (markup->string text)))

I see: this one makes sure the argument is first transformed into all
lowercase, for the sake of safety.

> (2)
> For testing I added a (commented) scheme-function. It does not work
> with 2.16.0, but needs 17.6.

I'll have to give 17.6 a try then :-)

Again, many, many thanks for your assistance!

Best regards,

Olivier



reply via email to

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