Re: [frogs] Re: Capo-ChordNames

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


On 8/10/10 7:18 AM, "Wols Lists" <antlists@xxxxxxxxxxxxxxx> wrote:

>  On 10/08/10 01:05, Carl Sorensen wrote:
>> If you are fine to have the Capo chord names and the non-capo chord names
>> stacked, then it's possible to do something like:
>> 
>> myChords = \chordmode {
>>   c1 g f:7 c
>> }"
>> 
>> <<
>>   \new ChordNames = "capoNames" {
>>       \transpose c b {
>>         \myChords
>>       }
>>   }
>>   \new ChordNames = "originalNames" {
>>     \myChords
>>   }
>> 
>> Which is what Trevor was suggesting.
>> 
>> And a music function could probably be written to make all of that happen
>> automatically
>> 
>> e.g.
>> 
>> \capo 3 \myChords
>> 
>> could be used as syntax to do the transposition and create both ChordNames
>> contexts.
>> 
>> Of course, this wouldn't handle the horizontal setting; to do that you
>> really would need to modify the ChordNames engraver.
>> 
> Ah... but the horizontal setting is the norm.

OK, sounds like engraver work is the thing, then.

> Sounds like you've guessed
> correctly what I meant by vertical|horizontal. And the transposed chord
> is ALWAYS parenthesised - how easy is that in a music function?

Actually, it would be quite easy, since there are parenthesize commands and
map functions.  But since horizontal is the default behavior you want,
you'll need to change the engraver.

> So let's
> say I'm in the key of C, capo=3 (weird example I know, but never mind),
> and I want to actually have a C chord. It normally prints as "C (A)",
> but in vertical mode it would print as
> 
> C
> (A)
> 
> (centred, of course).
> 
> I'll take the engraver route, and hope I don't need TOO much
> hand-holding (cf Graham's talk :-)

Note that the amount of hand-holding is not the thing that determines
whether the mentoring is successful or not; the determination of the user to
stay on board and contribute is what defines things.  You've been around
long enough that I'm satisfied you'll stay with it, so virtually any amount
of hand-holding is likely to be a net gain.

> If it gets me into Scheme and C++
> I'll be well pleased.

At the moment, probably not too much Scheme (although you might want to try
writing the CapoEngraver in Scheme).

> 
> I'll look at your long email, probably respond, and then hack at it and
> come back with more questions :-)

Sounds great.

But there's some wrong advice in my email, because I wasn't thinking about
having *both* chord names created by the engraver.  You'll want to follow up
more on your original approach, i.e. having both pitches and capo_pitches.
Then you'll need to call the chordNameFunction twice, once with pitches,
bass, inversion and once with capo_pitches, capo_bass, capo_inversion.  Then
you'll need to combine the two markups into one, probably with another
scheme call.

vertical/horizontal should be a context property, rather than a keyword.

I'm not sure yet about capo_fret.  It could be a context property, or it
could be part of the structure of a capoEvent.

For getting started, I'd recommend making it a context property, and
avoiding the use of a capoEvent.

Then you'd do something like

\set ChordNames.capoFret = #3
\set ChordNames.capoOffset = #'horizontal

to set up the engraver properly.

HTH,

Carl


---
----
Join the Frogs!


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