lilypond-devel
[Top][All Lists]
Advanced

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

Re: Chromatic transposition -- a very small starting step


From: Joseph Wakeling
Subject: Re: Chromatic transposition -- a very small starting step
Date: Sun, 11 Jul 2010 13:11:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100528 Thunderbird/3.0.5

On 07/10/2010 12:25 PM, Joseph Wakeling wrote:
> On second thoughts, it seems like transposition constraints for the
> whole of LP could be set by four naturalize-limits: upper and lower
> limits respectively for c, e, f, b; and upper and lower limits for
> everything else.

OK, done.  The attached example now contains a "complete"
naturalize-pitch which allows the user to define the too-high and
too-low rules for e, b and c, f respectively, as well as for the rest of
the notes.

This allows the definition of a "naturalizeMusicTonal" expression which
seems to leave properly-transposed stuff (by Lilypond's defaults) untouched.

The aim would be to allow the user to define custom naturalization rules
alongside defaults, e.g:

    \withMusicProperty #'naturalize = ##f
    % don't employ naturalization, use Lilypond's default
    % functionality

    \withMusicProperty #'naturalize = #'chromatic
    % typical naturalize-music function

    \withMusicProperty #'naturalize = #'harp
    % naturalize with nothing > 1/2-tone

    \withMusicProperty #'naturalize = #'tonal
    % superfluous since Lilypond 2.13.14+ already handles this,
    % but if the user wants to be sure ... :-)

    \withMusicProperty #'naturalize =
      #((naturalize-limit >= 1) (naturalize-limit < (/ -1 2))
        (naturalize-limit >= (/ 1 2)) (naturalize-limit < (/ -1 2)))
    % custom choice of user (my notation may be wrong here, but it
    % gives the idea of what the user could do).  I see why Lisp is
    % sometimes referred to as "Lost in sodding parentheses" ... !

Note that the naturalization process could be employed in
transposition_mutable() or it could be employed after transposition (if
any) has been carried out, so the naturalization rules could be used to
enforce style choices anywhere in the composition.

e.g.

    \naturalizeChromatic
    ...
    bes8 \naturalizeOff ces   % I really, really want this c-flat.
    \naturalizeOn   % default option, same as \naturalizeChromatic

There could even be two different music properties (#'naturalize or
#'transposition-style?) depending on at what stage one wishes to apply
naturalization; or with warnings if untransposed music is nevertheless
altered by the naturalization process.

Are there any other thoughts for what more needs to be done with the
naturalize-pitch function itself?  Or is it good to go in terms of
hooking into Lilypond ... ?

Thanks & best wishes,

    -- Joe

Attachment: naturalizeMusicModern.ly
Description: Text document


reply via email to

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