[Top][All Lists]

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

Force Accidentals

From: Mehmet Okonsar
Subject: Force Accidentals
Date: Sat, 16 Jul 2005 10:10:49 +0300

Here is a short .ly to illustrate what I expect :
\version "2.6.0"

forceAlterations =
  #(def-music-function (parser location music) (ly:music?)
     (music-map (lambda (m)
                  (if (eqv? (ly:music-property m 'name) 'NoteEvent)
                      (set! (ly:music-property m 'force-accidental) #t))

\forceAlterations {
  \time 4/4
    c'4 %this one should get a natural, that'S ok
    c'8 %this should NOT get a natural because it is the same note repeated
in the same octave and the same measure
    c'' %this one should get a natural because it is another octave
    cis' % ok
    cis' %this one should NOT have a sharp because same bar same octave..
    cis'' %this one should have a sharp
    c' % this one should get a natural
    %------------------------------------ bar 2
    c' % this one should get a natural
If the above functionality is added, that would fill in, what I believe is a
big hole in Lilypond, (concerning the modern composer).

Best Regards,
Mehmet Okonsar, pianist-composer

reply via email to

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