[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: |
Fri, 27 Aug 2010 21:49:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100727 Thunderbird/3.1.1 |
Okay - broken code follows:
------
if (!capo)
chord_name_->set_property ("text", markup);
else
{
SCM capovertical = get_property ("capoVertical");
// how do I combine text and markup to get "markup (capo_markup)" !!!
SCM paren_proc = ly_lily_module_constant ("parenthesize"); //
what's this function really called?
capo_markup = scm_call_1 (paren_proc, capo_markup);
SCM line_proc = ly_lily_module_constant ("line-markup");
SCM final_markup = scm_call_3 (line_proc, scm_cons (markup,
capo_markup), SCM_EOL); // what is this missing?
chord_name_->set_property ("text", final_markup);
}
------
Forget the capoVertical stuff, that just currently does nothing.
There's a function called "parenthesize" in define-markup-commands.scm
that looks like it does what I want (line 3154), but
ly_lily_module_constant can't find it, and I don't know whether I've got
the call to it in the line below correct or not, anyway.
And lastly, the call to line-markup blows up with "invalid arguments".
I've found another function - markup-join (markup.scm, l514) - should I
be using that? But I think it wants a pair, and scm_cons does not seem
to be the function that creates a pair. There's probably more to it than
that, though.
Once I've cracked this, I'll have basic capo functionality working in
the engraver, and I can submit it for proper review. (And I'll pretty
much have learnt enough C++/Scheme-fu to finish the engraver properly :-)
Cheers,
Wol
- Re: [frogs] chord-name-engraver plus capo - schemeing away ...,
Wols Lists <=