| Re: [frogs] chord-name-engraver plus capo | 
[ Thread Index | 
Date Index
| More lilynet.net/frogs Archives
] 
- To: Neil Puttock <n.puttock@xxxxxxxxx>
 
- Subject: Re: [frogs] chord-name-engraver plus capo
 
- From: Carl Sorensen <c_sorensen@xxxxxxx>
 
- Date: Sat, 28 Aug 2010 17:42:50 -0600
 
- Accept-language: en-US
 
- Acceptlanguage: en-US
 
- Cc: Wols Lists <antlists@xxxxxxxxxxxxxxx>, Lilypond Frogs <frogs@xxxxxxxxxxx>
 
- Thread-index: ActG6MHO2ZuxHuwHT3umGgbI3ck6BgAIffWQ
 
- Thread-topic: [frogs] chord-name-engraver plus capo
 
On 8/28/10 1:39 PM, "Neil Puttock" <n.puttock@xxxxxxxxx> wrote:
> On 28 August 2010 19:02, Carl Sorensen <c_sorensen@xxxxxxx> wrote:
> 
>> Why not just define a C++ function
>> 
>> transpose_pitch (int semitones)
>> 
>>  return Pitch (0, - int (semitones / 2), - (semitones mod 2));
>> 
>> 
>> to handle the transposition?  Or perhaps even make this part of the
>> Pitch class -- i.e. add a transposed_semitones function to Pitch, so then
>> you could just call p->transposed_semitones (capo)?
> 
> The tranposition is subjective (it's mainly flat, but goes sharp for F
> and C), so that wouldn't be possible without also telling the function
> how to behave for certain tranpositions.
Yes, but I suspect that this is probably not correct at all for most chords..
It's defined for a C chord, but probably won't work correctly for any other
chords in the key of C.
Thanks,
Carl
---
----
Join the Frogs!