lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About pitch


From: Reedmace Star
Subject: Re: About pitch
Date: Tue, 19 May 2015 21:07:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

* 2015-05-19 18:18 +0200:
> The aim would be to add  two notes to all the languages.
> I write
>  #(define fisarmonica
>   '(
>     (i .  (ly:make-pitch 8 0 DOUBLE-SHARP))   ; input note, ie a closing
> note
>     (o . (ly:make-pitch 8 0 DOUBLE-FLAT))    ; output note, ie a drawing
> note
>   ))
> 
> then
> #(define language-pitch-names
>    (map
>      (lambda (x) (append (list (car x)) (append (cdr x)      fisarmonica)))
>      language-pitch-names)) 
> 
>  gives something ending by
> (si . #<Pitch b >) (sik . #<Pitch bis >) (sikk . #<Pitch bisis >) (i
> ly:make-pitch 8 0 DOUBLE-SHARP) (o ly:make-pitch 8 0 DOUBLE-FLAT)))
> so it does not work
> Have you an idea?

You need the backquoting mechanism described by Ralf Mattes.
ly:make-pitch is a *function* that needs to be evaluated to produce a
pitch object, but your whole definition of fisarmonica is quoted with ',
so this does not happen.

Change it to

  #(define fisarmonica
     `((i . ,(ly:make-pitch 8 0 DOUBLE-SHARP))
       (o . ,(ly:make-pitch 8 0 DOUBLE-FLAT))))

and it should work.


Best regards,
RS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]