lilypond-user
[Top][All Lists]
Advanced

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

Re: SacredHarpHeads: possible solution to major/minor problem


From: Neil Puttock
Subject: Re: SacredHarpHeads: possible solution to major/minor problem
Date: Tue, 22 Apr 2008 17:42:59 +0100

Sorry, here's the correct function, without the debugging output:

sacredHarps = \applyContext #(lambda (c)
  (let* ((alts (ly:context-property c 'keySignature))
         (tonic (ly:context-property c 'tonic)))
    (if (ly:pitch? tonic)
      (begin
        (let* ((third (modulo (+ 2 (ly:pitch-notename tonic)) 7))
               (pitch (ly:make-pitch (ly:pitch-octave tonic) third (or
(ly:assoc-get third alts) NATURAL)))
               (diff (- (ly:pitch-semitones pitch) (ly:pitch-semitones tonic))))
          (if (or (eqv? diff 4) (eqv? diff -8))
            (ly:context-set-property! c 'shapeNoteStyles #(fa #f la fa
#f la mi))
            (ly:context-set-property! c 'shapeNoteStyles #(la mi fa #f
la fa #f)))
    )))
  ))




reply via email to

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