On 7/7/11 7:30 AM, "m...@apollinemike.com" <m...@apollinemike.com> wrote:
>> Mmmm...
>>
>> Do we have generic procedures for "combine markup" and "stack markup"?
>> If not, there'll be a flurry of frog emails as I try and write them :-)
>> (note to self - ly:stencil-combine-at-edge)
>>
>
> line and column
> (see line 1074 and line 1426 of scm/define-markup-commands.scm)
>
>> Because the chord_name_capo_proc will basically be "if vertical then
>> stack else combine".
>>
>> Should my scheme function go in the scm directory?
>
> Yes, likely in define-markup-commands.scm.
I think not in define-markup-commands.scm, since this is not a general
markup command. I'd recommend scm/chord-name.scm
>
>> And what would be a good name for it?
>
> Something descriptive :)
capo-chord-name
>
>> Do those functions get loaded into lily automatically?
>
> Yes.
>
>>>
>> Moving on slightly, if I'm messing about with scheme for markup, how do
>> I mess around with scheme for engravers. It looks like they're defined
>> inside lilypond code - do they go in the ly directory?
>>
>
> Engravers are defined in the lily/ directory (C++), but you can also define
> theme from scheme (see the scheme engraver regtest). If you're thinking that
> this should become part of LilyPond, I'd write it in C++ for the time being.
> The community's gonna have a discussion about Scheme vs C++ in the not too
> distant future, but at the present moment, no Scheme engravers (that I know
> of) are part of the source.
The problem we have with Scheme engravers is that we have no automatic way
of including them in the documentation. So at present, C++ is preferred
over Scheme because they become part of the internals.
Probably Scheme engravers should be .ily, and go (at least temporarily) in
the ly/ directory.
Nicolas Sceaux shared a marvelous example of a Scheme engraver on -user:
http://lists.gnu.org/archive/html/lilypond-user/2011-06/msg00581.html
As you create a capo_engraver, realize that you will need to adjust the
parser and/or lexer so that a capo music event is generated for the capo
engraver to listen to.
HTH,
Carl
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel