bug-lilypond
[Top][All Lists]
Advanced

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

Define custom/new \accidentalStyles (dodecaphonic minus repeated notes)


From: Urs Liska
Subject: Define custom/new \accidentalStyles (dodecaphonic minus repeated notes)
Date: Mon, 03 Feb 2014 10:16:32 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi,

searching the docs and the lilypond-user archive I couldn't find any relevant information.

I am looking for a custom \accidentalStyle. Actually I think this is quite commonly used, so it would also seem like a useful addition to LilyPond proper.

a)
Every note gets an explicit accidental (including a natural),
as in the 'dodecaphonic style,
_except_ when a note is repeated immediately in the same voice.

That is:
{ c fis c c fis } should be printed as in the attached image, like
{ c! fis! c! c fis! } (note the missing ! after the last c

The only reference to a similar (same?) request I found was this:
http://lists.gnu.org/archive/html/lilypond-user/2007-02/msg00667.

###

When looking into music-functions.scm and its set-accidental-style I see

 ((equal? style 'dodecaphonic)
  (set-accidentals-properties #f
                              `(Staff ,(lambda (c p bn mp) '(#f . #t)))
                              '()
                              context))


So it seems the way to go to make a copy of that definition (e.g. with comparing against 'dodecaphonic-no-repeat) and modifying the definition.

Unfortunately I don't have a clue how to proceed. Any trials are simply anwered by errors, so I'd prefer not to _try_ but to do at least _informed guesses_ ;-)

I assume that the
    `(Staff
expression returns the
    context pitch barnumber measureposition
arguments for
    set-accidental-properties
so this seems the place to define the right arguments.

Unfortunately I haven't _fully_ understood lambda expressions and _barely_ understood quoting and unquoting.

So I'd be glad about hints/explanations/solutions to

a)
create a differing but valid argument list at all and
b)
determining which '(#f . #t) combinations to use for my purpose.

TIA
Urs

Attachment: document.png
Description: PNG image


reply via email to

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