lilypond-user
[Top][All Lists]
Advanced

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

Re: Changing voice order...


From: Paul
Subject: Re: Changing voice order...
Date: Tue, 1 Nov 2016 23:06:14 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/01/2016 09:50 PM, Paul wrote:

so I'm not sure how or even whether this kind of thing can be done in user space (at least not with existing functions like map-some-music).

Well, here's a start on something, but still not sure how to pull it off fully:

\version "2.19.49"

split =
#(define-music-function (directions music) (list? ly:music?)

   (let* ((elts (ly:music-property music 'elements))
          (elts2 (map (lambda (el dir)

                        (display dir)(newline)
                        (display el)(newline)

;; do something with each sequential music element...
                        (if (equal? dir 'up)
                            #{ \voiceOne #el #}
                            #{ \voiceTwo #el #}))

                   elts directions)))

     (make-music 'SequentialMusic 'elements elts2)))


m = { { a4 b } { c'4 d' } { e'4 f' } }

\displayMusic \m

% \new Staff
% \displayMusic
\split up,down,up \m






reply via email to

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