Re: [frogs] chord-name-engraver plus capo

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


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.

>>       if (scm_is_number (capofret))
>>       {
>>     capo = scm_to_int (capofret);
>>     if (capo < 0 || capo > 23)
>>     {
>> // !!! TODO !!! FIX !!!
>
> ly:warning, IIUC.  And your message should mention that capo is set to 0
> and continuing.

Just warning () will do (ly:warning is for scheme code).

The origin information would come from a stream event, so you could
attach the warning to a note but this doesn't make sense for a context
property setting.

Cheers,
Neil

---
----
Join the Frogs!


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