Hi Harm, On Thu, Apr 30, 2015 at 6:36 PM, Thomas Morley <thomasmorle...@gmail.com> wrote:
> 2015-05-01 1:23 GMT+02:00 David Nalesnik <david.nales...@gmail.com>: > > > > %%%%%%%%%%%%%%%%%%%%%%%%%% > > > > \version "2.18" > > > > \language "italiano" % the closest preset :) > > > > test = > > #(define-music-function (parser location music) > > (ly:music?) > > (let ((t (ly:make-pitch 0 0))) ; C is the default tonic > > (music-map > > (lambda (mus) > > (if (music-is-of-type? mus 'key-change-event) > > (set! t (ly:music-property mus 'tonic))) > > (if (music-is-of-type? mus 'note-event) > > #{ > > \transpose #(ly:make-pitch 0 0) #t #mus > > #}) > > mus) > > music) > > music)) > > > > This seems to work as well, or am I missing something? > > \test > \new Staff { > \new Voice { > { > \key re \major > do'4 mi' sol' do'' <do' mi' sol'>1 > } > { > \key fa \major > do'4 mi' sol' do'' <do' mi' sol'>1 > } > { > \key sol \minor > do'4 mib' sol' do'' <do' mib' sol'>1 > } > } > } > > > Cheers, > Harm > Huh. I tried to make it easy on myself and purposely write something that wouldn't work like that :) Thanks! David P.S. Now I'm going to set out to break it...
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user