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: David Kastrup
Subject: Re: Function for rendering key textually in 3 languages
Date: Sat, 03 Nov 2012 19:35:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Olivier Biot <address@hidden> writes:

> On Sat, Nov 3, 2012 at 6:11 PM, Olivier Biot <address@hidden> wrote:
>> Hi David,
>>
>> Thanks a lot - I now start to see the mistakes I made (excess
>> parentheses around the cond expression and excess parentheses around
>> the return values in the cond sub expressions).
>>
>> I have however to use quotes around the note name for it to work.
>>
>> Here's code that actually works, maybe it can be useful for others:

> tonicEN = #(define-scheme-function (parser layout tonic arg) (string? string?
> of those and assign the value to a header parameter (e.g., title).
>
> What I now need to figure out, is how to print the output in a markup,
> like in the currently not working snippets below:
>
> %%% START of snippet 2
> \header {
>   title = \markup {\italic \tonicEN "cis" "minor"}

That's inside of a markup.  I _think_ this should work in current 2.17
with define-scheme-function, but likely not in 2.16.

So you'll need a define-markup-command after all to use inside of
\markup, and best give it two markup? arguments (if the arguments are
not plain strings, you'll likely get an error then).

It is actually possible to both use define-scheme-function and
define-markup-command with the same name, and LilyPond will pick the
right one depending on context.

-- 
David Kastrup



reply via email to

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