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

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


I'm sorry that I haven't been in on this conversation.   I've had a *very*
unreliable internet connection for the past week.


On 8/27/10 4:01 PM, "Neil Puttock" <n.puttock@xxxxxxxxx> wrote:

> 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.

There's a work in process to rewrite the chord name function.  I think that
the approach that Anthony is taking is correct.

> 
>> 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).

I'd recommend that a scheme function be written (part of chord-name.scm)
that takes two chord markups and an orientation, and spits out the
appropriate chord markup.  Then you can just call the chord name procedure
twice and the combiner once.

Thanks,

Carl


---
----
Join the Frogs!


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