On Fri, Jan 16, 2015 at 4:02 PM, and...@andis59.se <and...@andis59.se> wrote: > I store two pitches in a pair variable > x = #'(b . cis') > > But then I want to retrieve each one as a pitch in a music-function > foo = #(define-music-function (parser location bar) (ly:music?) > (define from (car x)) > (define to (cdr x)) > #{ > \transpose $from $to $bar > #} > > but when I use this > \foo a > > I get Expecting pitch, found (quote b) > > So what am I doing wrong and how can I do it right? > > // Anders > PS! The foo function is just a snippet the real function does a bit more...
pitches = #(cons #{ b #} #{ cis' #}) #(display (ly:pitch? (car pitches))) => #t Notes: - It needs to be lilypond and not scheme which interprets the pitches. The #{ #} do that inside a scheme expression. - It won't work within a quoted list (e.g. #'(#{ b #} . #{ cis' #}) won't get you pitches.) -----Jay _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user