I get { { f' f' f' f' } { bflat' bflat' bflat' bflat' } { f' f' f' f' } } and I would like to get { f' f' f' f' bflat' bflat' bflat' bflat' f'f' f' f' }
1- You can try the following function : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #(define (clean-music mus) "Try to reduce the number of sequential musics" (let ((name (ly:music-property mus 'name))) (cond ((eq? name 'SequentialMusic) (ly:music-set-property! mus 'elements (fold-right (lambda (evt prev-list) (if (eq? (ly:music-property evt 'name) 'SequentialMusic)(append (ly:music-property (clean-music evt) 'elements) prev-list)
(cons (clean-music evt) prev-list))) '() (ly:music-property mus 'elements)))) ((eq? name 'SimultaneousMusic) (ly:music-set-property! mus 'elements (map clean-music (ly:music-property mus 'elements)))) ((memq name (list 'RelativeOctaveMusic 'UnrelativableMusic)) (ly:music-set-property! mus 'element (clean-music (ly:music-property mus 'element))))) mus)) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% you just have to modify your \chuchu function like that : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% chuchu = #(define-music-function (parser location music)(ly:music?) (clean-music (music-map (lambda (x) (if (eq? 'EventChord (ly:music-property x 'name)) (toma x) x)) music))) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2-However, i don't know exactly what your are trying to achieve, but perhaps you will be interested by this thread :
http://lists.gnu.org/archive/html/lilypond-user/2011-08/msg00002.html I have joined the latest version of chordsToSeq.ly Gilles
chordsToSeq.ly
Description: Binary data
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user