Re: [frogs] chord-name-engraver plus capo - schemeing away ...

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


 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

---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/