Kieren MacMillan <kie...@kierenmacmillan.info> writes: > Hi all, > > Thank you for the rapid-iteration non-isochronous Scheme class! :) > > Before I do the next step, is this optimal at this point? > > %%% SNIPPET BEGINS > \version "2.25.11" > > adjustPitch = > #(define-music-function (pitchIn pitchOut music) (ly:pitch? ly:pitch? > ly:music?) > (music-map > (lambda (m) > (if (music-is-of-type? m 'note-event) > (ly:message "Pitch is: ~a" (ly:music-property m 'pitch)) > #f) > m) > music)) > > \adjustPitch es es \fixed c' { c4 d e f g a b c' } > %%% SNIPPET ENDS
To say something is "optimal", you have to state your objective. music-map is used for changing music, and you don't appear to do any useful changes to the music. In fact, you replace note events with *undefined* which appears comparatively useless. So what are you trying to achieve here? -- David Kastrup