lilypond-devel
[Top][All Lists]
Advanced

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

Re: Force Accidentals


From: Stephen
Subject: Re: Force Accidentals
Date: Sun, 17 Jul 2005 09:50:54 -0500

Mehmet,

Nicolas Sceaux' last function, atonicKey, does work as you would want for Atonal Music. The only drawback is that in the context I was using it in, the key signature printed something. So I just overrid the KeySignature print function in that context:

\override PianoStaff.KeySignature #'print-function = ##f

I mistakenly thought the staffs were not breaking right, but that was due to

raggedright = ##t

I am working on examples and adding it to my project now.

Stephen

----- Original Message ----- From: "Mehmet Okonsar" <address@hidden>
To: <address@hidden>
Sent: Saturday, July 16, 2005 2:10 AM
Subject: Force Accidentals


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))
                 m)
               music)
    music)

\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
www.okonsar.com



_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel





reply via email to

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