lilypond-devel
[Top][All Lists]
Advanced

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

Re: accidentals : contrary of !


From: Valentin Villenave
Subject: Re: accidentals : contrary of !
Date: Thu, 1 May 2008 13:45:34 +0200

2008/4/21 Legrand Jean-Marc <address@hidden>:

> This ancient habit has one single exception which is not, to my mind,
> supported by Lilypond : when 'n' identical and successive notes are altered
> the same way, the accidental IS NOT repeated on the 'n' following notes.

It's interesting: I've been looking for the *exact* same style, but
for contemporary music notation: see
http://lists.gnu.org/archive/html/lilypond-devel/2007-08/msg00131.html

> The only way to do so today is :
> #(set-accidental-style 'forget)
> #(set-accidental-style 'default)
> #(set-accidental-style 'forget)

> which is quite a heavy way to write some code !

...or you can use a shortcut such as:

defAcc =
#(define-music-function (parser location music) (ly:music?)
#{
  #(set-accidental-style 'default)
  $music
  #(set-accidental-style 'forget)
#})

> Would it be possible to use #(set-accidental-style 'forget) and have
> something that is the contrary of ! , to be used "accidentally" ?

Yes, but only in a non-hardcoded way (i.e. no sign such as ! or ?):

noAcc = { \once \override Accidental #'stencil = ##f }

Here's a demonstration of these two shorcuts:

\relative {
c4 d ees f g2 ees
\defAcc {aes4 aes aes aes }
g ees g2
aes4 \noAcc aes \noAcc aes \noAcc aes
g1
}

> Or, better than that, would it be possible to have something like
> #(set-accidental-style 'baroque) which would do what I say ?

Rune had found a way to implement it, but his code has not been merged
so far. You can find it on the dev/rune branch of the git repository,
but it's a bit tricky to achieve. The easiest way so far is still to
use simple shorcuts such as \defAcc and \noAcc -- unless you have a
whole opera to typeset :-)

Cheers,
Valentin




reply via email to

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