lilypond-devel
[Top][All Lists]
Advanced

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

First attempt at new accidentals in git


From: Rune Zedeler
Subject: First attempt at new accidentals in git
Date: Mon, 12 Nov 2007 01:10:24 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

I have put the first attempt at moving accidentals to scheme in dev/rune branch.
(Please check that VERSION is 2.11.32.rz3 - I have had some git-problems)

* Split pitch into pitchclass and pitch - pitchclass not containing octave information. Han-Wen please comment on code. I had some problems with getting guile to accept hierarchical smobs.

* Moved accidental rules to scheme
Now the user can write his own accidental rules in the .ly if he is not satisfied with the existing ones.

If one for instance should wish to add a cautionary accidental at the start of each measure (hmm), then one may do like this:

%%% BEGIN
\version "2.11.32"

#(define (start-of-measure-acc-rule context pitch barnum measurepos)
  (cons #f (equal? measurepos (ly:make-moment 0 1))))

mus = {
  \key des \major
  \transpose c c' {
    g16 g g g' g' d' d' d' g' g' f f gis gis g g' ges1
  }
}
<<
  \new Staff {
    \set Staff.autoCautionaries = #(list 'Staff start-of-measure-acc-rule)
    \relative c' { c4 d e f g gis a ais b2 c }
  }
>>
%%% END

* Added accidental-rules 'neo-modern and 'neo-modern-cautionary - adding even more accidentals to the modern accidentals. Notes different from the key signature now always gets an accidental if they do not directly follow a note of the same pitch.

* Added accidental-rule 'dodecaphonic - thereby obsoleting http://lsr.dsi.unimi.it/LSR/Item?id=314 :-)

TODO:

* convert-ly? I don't think this is nessesary. The change is downwards-compatible as long as the .ly do not mess around with 'autoAccidentals and 'autoCautionaries directly. Perhaps we could add a simple warning if these properties are accessed.

* Make better use of pitchclass. Currently it is only used in the key-signature.

* Some fixme's still in the code. Primarily regarding garbagecollection. Currently it probably leaks like mad.

* Bugtesting, bugtesting, bugtesting.

-Rune




reply via email to

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