trying to learn scheme...

2007-10-13 Thread Wilbert Berendsen
I am currently learning Scheme to master lilypond even better but I miss some clear docs about music-map and define-music-function. I try to write a function that replaces pitches in a repetitive pattern (e.g. : c8 d16 c d8 c d16 c d8 c d ) with other pitches. so that I can say: myPattern =

Re: trying to learn scheme... (solved)

2007-10-13 Thread Wilbert Berendsen
this worked: #(define (transform m p1 p2) (let ((p (ly:music-property m 'pitch))) (if (ly:pitch? p) (let ((n (ly:pitch-notename p))) (if (= n 0) (ly:music-set-property! m 'pitch