|
From: | Gilles THIBAULT |
Subject: | Re: transposing and changePitch |
Date: | Mon, 1 Feb 2010 00:12:01 +0100 |
Ok, i understand now.
Well, i think the \brokenOctaves has to be a little
more complex.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.12"
\include "changePitch.ly" brokenOctaves = #(define-music-function (parser location music) (ly:music?) (let loop ((x music)) (let ((e (ly:music-property x 'element)) (es (ly:music-property x 'elements))) (cond ((eq? 'EventChord (ly:music-property x 'name)) (if (and (pair? es) (eq? 'NoteEvent (ly:music-property (car es) 'name))) (set! x (make-sequential-music (list x #{\transpose c c' $x #}))))) (else (if (ly:music? e) (ly:music-set-property! x 'element (loop e))) (if (pair? es)(ly:music-set-property! x 'elements (map loop es)))))) x)) test = { c8. c16} \new Staff { \changePitch \test \brokenOctaves { c' d' e' } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Gilles
|
[Prev in Thread] | Current Thread | [Next in Thread] |