[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [frogs] chord-name-engraver plus capo - schemeing away ...
From: |
Wols Lists |
Subject: |
Re: [frogs] chord-name-engraver plus capo - schemeing away ... |
Date: |
Sat, 28 Aug 2010 00:33:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100727 Thunderbird/3.1.1 |
On 27/08/10 23:42, Neil Puttock wrote:
> scm_cons does create a pair, but you need a list for the arguments to \line.
>
> Just to prove how nasty doing markup in C++ is, here's the above code
> corrected:
>
> SCM paren_proc = ly_lily_module_constant ("parenthesize-markup");
> SCM line_proc = ly_lily_module_constant ("line-markup");
> SCM hspace_proc = ly_lily_module_constant ("hspace-markup");
> SCM final_markup = scm_list_n (line_proc,
> scm_list_3 (markup,
> scm_list_2 (hspace_proc,
> scm_from_int (1)),
> scm_list_2 (paren_proc,
> capo_markup)),
> SCM_UNDEFINED);
>
> chord_name_->set_property ("text", final_markup);
>
> I feel dirty after messing with that. ;)
:-)
Thanks. I know it might feel awful to you, but as a non-schemer it
doesn't seem that bad to me. I'll play with it, then when I write my
next engraver I'll try to do it in Scheme and rewrite this for you :-)
Cheers,
Wol