Version 2.14

While trying to debug something else I found that Lilypond sometimes
engraves its notes in a strange order. If you print the same piece
repeatedly, the order changes. I changed my program to display
pitch-semitones.  With input

piece = \relative c' {
  c4 d e f g a b c,, d f g a
}

\score { \piece}
\score { \piece}


the relevant part of the output is

Drawing systems...
Notes: (-7 -10 -5 -3 5 4 7 2 0 11 9 -12)
Notes: (11 -5 -7 -12 9 0 4 7 2 -3 5 -10)
Layout output to `order.ps'...
Converting to `./order.pdf'...
success: [cut]

The typeset output is correct. Please is this supposed to happen? I
cannot find it documented. I hope to attach my program (sorry about
the length, I dont think I can make it shorter).
\version "2.14.2"

#(define n-list '() )

%{ pitch-to-color modified: print black and generate messages %}

#(define (pitch-to-color pitch)
  (let* (( nn (ly:pitch-semitones pitch))
	 ( m '(0 0 0 ) ))

    (set! note-i (1+ note-i))
   (set! n-list (cons nn n-list ))
   (if (>= note-i count-notes)
    (begin
     (set! note-i 0 )
     (ly:message "Notes: ~a \n" (reverse n-list ))
     (set! n-list '() ) ))

   m ))

#(define (color-notehead grob)
  (pitch-to-color
    (ly:event-property (event-cause grob) 'pitch)))



%{Test piece. %}

\layout {
  \context {
    \Voice
    \override NoteHead #'color = #color-notehead
}}

piece = \relative c' {
  c4 d e f g a b c,, d f g a 
}


#(define count-notes 12)
#(define note-i 0)

\score { \piece}
\score { \piece}

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to