[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme question regarding hiding accidentals
From: |
Reinhold Kainhofer |
Subject: |
Re: Scheme question regarding hiding accidentals |
Date: |
Sat, 5 Dec 2009 03:31:37 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31-15-generic; KDE/4.3.4; i686; ; ) |
Am Samstag, 5. Dezember 2009 01:42:16 schrieb Robin Bannister:
> Aaron Dalton wrote:
> > I want to be able to hide the accidental.
>
> There is Mark Polesky's suppress-accidental
> http://lists.gnu.org/archive/html/lilypond-devel/2009-07/msg00384.html
> but that is probably overkill in your case.
>
> You can do it by switching the style in a music function
> http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Music-functions
Alternatively, you can take a look at the 'teaching accidental style, which
explicitly displays the accidentals implied by the key signature as warning
accidentals.
The cooll thing about this style is that if two equal pitches succeed each
other, the second one never gets an accidental, but if there is at least one
note in between, the second one does. E.g. if you have
\relative c' {
\key es \major
#(set-accidental-style 'teaching)
es es g e
es g es e |
}
Then the in the first measure the second es will not get an accidental (since
it immediately follows another es), while in the second measure the second es
will get an accidental (since it follows a different pitch)...
The definition of the teaching style is in scm/music-functions.scm...
Attached is a starting point where you "only" need to take the my-madrigal-
accidental-rule and adjust it to your own use case (yeah, I know, that sounds
so easy... To be honest, I haven't digested the code to exactly understand how
to adjust the rul.)...
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
acc.ly
Description: Text Data