Hello everybody, hello Pierre,

(is there a specific way to submit LSR bugs?)
The version of snippet No. 445 <http://lsr.di.unimi.it/LSR/Item?id=445> currently in the repo doesn't work correctly since 2.16.0 due to NoteEvents not being wrapped in EventChord anymore. I attach an updated version: just replace "mus" in the music function by "(event-chord-wrap! mus)" and everything works fine.
Greetings,

Simon
\version "2.18.0"

#(define (octave-up m t)
 (let* ((octave (1- t))
      (new-note (ly:music-deep-copy m))
      (new-pitch (ly:make-pitch
        octave
        (ly:pitch-notename (ly:music-property m 'pitch))
        (ly:pitch-alteration (ly:music-property m 'pitch)))))
  (set! (ly:music-property new-note 'pitch) new-pitch)
  new-note))

#(define (octavize-chord elements t)
 (cond ((null? elements) elements)
     ((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
       (cons (car elements)
             (cons (octave-up (car elements) t)
                   (octavize-chord (cdr elements) t))))
     (else (cons (car elements) (octavize-chord (cdr elements ) t)))))

#(define (octavize music t)
 (if (eq? (ly:music-property music 'name) 'EventChord)
       (ly:music-set-property! music 'elements (octavize-chord
(ly:music-property music 'elements) t)))
 music)

makeOctaves = #(define-music-function (parser location arg mus) (integer? 
ly:music?)
 (music-map (lambda (x) (octavize x arg)) (event-chord-wrap! mus)))

 \relative c' {
   \time 3/8
   \key gis \minor
   \makeOctaves #1  { dis8( e dis')~ dis8.( cis16 b8} 
   \makeOctaves #-1 { ais' gis dis) cis( dis <dis gis'>) }
 }
_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to