lilypond-user
[Top][All Lists]
Advanced

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

Re: [WAS: Re: handbells] Tabulating notes used in a score


From: David Nalesnik
Subject: Re: [WAS: Re: handbells] Tabulating notes used in a score
Date: Mon, 26 May 2014 08:33:05 -0500


Simon,

On Mon, May 26, 2014 at 7:54 AM, Simon Albrecht <address@hidden> wrote:

The version statement should be \version "2.19", since the music contains standalone durations like @code{ ees4~ 16 }, which can’t be handled by 2.18.


True, didn't notice that.  Also interesting is that omitting the pitchname on tied notes gives a different count for the affected note than repeating the name does.  Attach the following lines to the file above to get the count:

countOccurrences =

#(define-scheme-function

  (parser location lst)

  (list?)

  (let* ((pitch-list (sort (delete-duplicates lst) ly:pitch<?))

          (tabulation (make-list (length pitch-list) '())))

    (map (lambda (p)

               (cons p (count (lambda (x) (equal? x p)) lst)))

      pitch-list)))


#(display #{ \countOccurrences \extractPitches \Bach #})

%%%%

-David

reply via email to

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