3 #(define (voicify-list lst number)
4 "Make a list of Musics.
6 voicify-list :: [ [Music ] ] -> number -> [Music]
7 LST is a list music-lists.
11 (cons (context-spec-music
12 (make-sequential-music
14 (make-voice-props-set number)
15 (make-simultaneous-music (car lst))))
17 "Voice" (number->string number))
18 (voicify-list (cdr lst) (+ number 1))
22 #(define (voicify-chord ch)
23 "Split the parts of a chord into different Voices using separator"
24 (let* ((es (ly-get-mus-property ch 'elements)))
27 (ly-set-mus-property!! ch 'elements
28 (voicify-list (split-list es music-separator?) 0))
32 #(define (voicify-music m)
33 "Recursively split chords that are separated with \\ "
40 ((es (ly-get-mus-property m 'elements))
41 (e (ly-get-mus-property m 'element))
45 (and (equal? (ly-music-name m) "Simultaneous_music")
46 (reduce (lambda (x y ) (or x y)) (map music-separator? es)))
50 (ly-set-mus-property!! m 'elements (map voicify-music es)))
52 (ly-set-mus-property!! m 'element (voicify-music e)))
59 \score { \notes \context Staff \relative c''
60 \apply #voicify-music {
61 c4 <g' \\ c, \\ f \\ d > f g < c \\ d> a