Stefan Thomas <kontrapunktste...@gmail.com> writes: > Dear community, > is it possible to transpose a sequence of notes with only one motif several > times at once? > I'have in mind something like this: > motiv = { c'4 d' e' c' } > \multitranspose d e fis gis \motiv > % result: d'4 e' fis' d' e' fis' gis' e' e' fis' gis' e' gis' > ais' bis' gis' > Or maybee something like recursive transposition could be done? > For example, as in the snippet above, a motif is to be transposed several > times by a certain interval.
Try
multitranspose = #(define-music-function (seq motiv) (ly:music? ly:music?) (music-clone seq 'elements (map (lambda (p) #{ \transpose c #(ly:music-property p 'pitch ) $motiv #}) (ly:music-property seq 'elements)))) motiv = { c'4 d' e' c' } \multitranspose { d e fis gis } \motiv
-- David Kastrup