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

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


 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

---
----
Join the Frogs!


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