lilypond-user
[Top][All Lists]
Advanced

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

Re: force accidentals


From: Nicolas Sceaux
Subject: Re: force accidentals
Date: Mon, 11 Jul 2005 19:38:45 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

"Stephen" <address@hidden> writes:

> Nicoas,
>
> Mehmet meant to say "Can the function be modified to not put an
> accidental or natural on notes repeated in the same measure."
>
> Put it another way and the question is: "Can we make the accidental
> engraver treat the natural exactly the way it treats the sharp and
> flat?"
>
> In Atonal music, there is not key signature. Normally, if there are
> not accidentals in the key signature, that means the key is either C
> Major or a minor. So how do we indicate on paper that there is no key
> signature? Simple. Put the natural on the same footing as the sharp
> and flat, treat each note as if it has an equal chance of being a
> natural, sharp, or flat.
>
> Accidentals are only normally put on a note the first time they occur
> in a measure, so we want the natural to be treated that way
> too. Instead of putting an accidental on every note, we want notes
> repeated in the same measure to be absent an accidental.

Here is *very* dirty trick, which produces lots of warnings, but the
output seems to be OK. The good way would be to pay Han-Wen to implement
that feature.

  \version "2.7.0"
  
  atonicKey = 
  #(def-music-function (parser location) ()
     #{ #(ly:export (make-music 'EventChord
                     'origin $location
                     'elements (list (make-music 'KeyChangeEvent
                                      'tonic (ly:make-pitch -1 4 0)
                                      'pitch-alist '((4 . 5)
                                                     (5 . 5)
                                                     (6 . 5)
                                                     (0 . 5)
                                                     (1 . 5)
                                                     (2 . 5)
                                                     (3 . 5))))))
        \set Score . extraNatural = ##f #})
  
  \layout { raggedright = ##t }
  
  { 
    \atonicKey
    c'8 c' c'' c'' d' d' d'' d''
    cis'8 cis' cis'' cis'' des' des' des'' des''
    c'8 c' c'' c'' d' d' d'' d''
    cis'8 cis' cis'' cis'' des' des' des'' des''
  }

nicolas




reply via email to

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