lilypond-user
[Top][All Lists]
Advanced

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

Re: drawing a range reguardless of transposition


From: Aaron Hill
Subject: Re: drawing a range reguardless of transposition
Date: Mon, 25 Nov 2019 04:40:12 -0800
User-agent: Roundcube Webmail/1.3.8

On 2019-11-25 2:26 am, Sandro Santilli wrote:
I'm trying, for backward compatibility, to keep that
highlightOutOfRange function, is that possible ?

What compatibility are you needing?

I intended \highlightPitches to be a significant upgrade to my earlier \highlightOutOfRange, which I would no longer recommend using.

Of course, it is not a drop-in replacement, as there were several significant changes in its interface and usage:

%%%%
% original %
\override NoteHead.color = \highlightOutOfRange c' c''

% new %
\highlightPitches outside { c' c'' }
%%%%

Of note, the \override is now encapsulated within the new music function; and when specifying multiple pitches, they must be enclosed in curly braces.

Yet it is that second change in interface that ultimately permits what you had requested:

%%%%
% requested (though invalid) syntax %
instrumentRange = c' c''
\override NoteHead.color = \highlightOutOfRange \instrumentRange

% realized syntax %
instrumentRange = { c' c'' }
\highlightPitches outside \instrumentRange
%%%%

Please let me know if I am overlooking a critical detail in your use case where my newer function would not be fit for purpose.


-- Aaron Hill



reply via email to

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