Re: [frogs] chord-name-engraver plus capo |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Carl Sorensen <c_sorensen@xxxxxxx>
- Subject: Re: [frogs] chord-name-engraver plus capo
- From: Neil Puttock <n.puttock@xxxxxxxxx>
- Date: Sat, 28 Aug 2010 20:39:31 +0100
- Cc: Wols Lists <antlists@xxxxxxxxxxxxxxx>, Lilypond Frogs <frogs@xxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ter5Eh37Oj8U9f2Ndr5eINcby4sOXchI4QDbFZEvko0=; b=Ebcse6M1aZnvYEOYvtxX7RliJLDRRpXggI4CJsl1w0xbBVJl/WDu2kHKHDMG3RRUhj AdrpPhrYv/7MwZ75v3nLmGofPOdyQwYPWh+YEloSMq6foMZ+TK8AS8KTeKXlc+w9SrfU gUy/osWo8xKUagHPE/VN7ADhg7Qvvi8/PA3gs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XqWEruuDo7G3R/35VoMWv/eTfJa//wND6I+38avbQv74d2ivJfccbauroSmPWl9QyN Dc79gtukbdccRFM0XRagqNNkmby2Rix752/64aRuJdeYGIP3aQLlLt3BYo2ZU8JwHMwW aiDhdosXJDT3sFgKwfi2NhnO01JylAcYS18d4=
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!