lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Absolute/relative scale conversions


From: Han-Wen Nienhuys
Subject: Absolute/relative scale conversions
Date: Tue, 18 Sep 2001 10:02:49 +0200

address@hidden writes:
>   In my attempt to write a shaped-note music feature for lilypond, I 
> need to convert absolute pitches (as in C, D, E, F#, etc.) to
> relative/solfege pitches (Do, Re, Mi, Fi, etc.).  I started working on
> a class for this, but I thought it'd be smart to check before
> reinventing the wheel.
> 
>   Does code to do this exist anywhere in Lilypond already?  I don't
> need to actually get to solfege syllable names (as in "do"); I just
> need to get the intervals from the key tone.  (i.e., numbers would
> suffice, such as 0, 1, 2, 3.5 or perhaps some other convention).
> 
>   Thanks in advance for any info provided.

You can fiddle with Pitch::transpose. A more difficult problem is that
the "key-tone" does not exist as a concept in LilyPond. You'd have to
compute it somewher (in an engraver), by counting flats and sharps.

--
Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]