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

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


On 27 August 2010 17:56, Wols Lists <antlists@xxxxxxxxxxxxxxx> wrote:
>  On 27/08/10 17:18, Neil Puttock wrote:
>> On 27 August 2010 16:59, Wols Lists <antlists@xxxxxxxxxxxxxxx> wrote:
>>>  Okay. I (think I) know how to call scheme from C++. And I've been told
>>> it's a lot easier to manipulate markup in scheme than C++. So I need to
>>> write two functions in scheme, and call them from my engraver. Help! :-)
>> I'm still not convinced you need a separate formatter.
> Because you've missed the entire point of what I'm doing. As far as I
> can tell, the formatter is chosen by the user - whether standard,
> ignaziek or whatever - and fed a series of notes. It then returns ONE
> chord to the engraver, which the engraver then prints.
>
> So if I did what you suggest, I would have to rewrite EVERY FORMATTER!
> (sorry for the shouting :-)

There are only two styles (forget Banter, it doesn't work and will be
removed eventually).  Both are already somewhat modular in that they
rely on several library functions defined in scm/chord-name.scm, so it
shouldn't be too difficult to create a handler for capos which can be
slotted in to both formatters without excess duplication.

> As modified, once capoFret is set, for every ONE chord fed INTO the
> engraver, it will spit TWO chords OUT. So I need some way of combining
> things.

And as I said, you don't want to do this in C++.  There's a good
reason why `line-markup' is only called outside scheme from the
parser: it's painful to juggle several markups this way, and separte
markups which should be stacked are usually treated as separate grobs
(or stacked internally by whatever function's doing the formatting).

> For example, if capoFret is set to 3, and the engraver is fed the chord
> of C, it will print "C (A)".

So if you had Cmaj7, you'd want (Amaj7) for the capo?

> As far as I can see, what I am doing is the obvious (only?) way of doing it.
>
> Cheers,
> Wol
>

---
----
Join the Frogs!


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