lilypond-user
[Top][All Lists]
Advanced

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

How do I define an Lilypond/Scheme alist as cons of two a lists?


From: Jay Vara
Subject: How do I define an Lilypond/Scheme alist as cons of two a lists?
Date: Sat, 13 Sep 2014 21:53:52 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I have pitch names defined as a alist in Lilypond as below and it works 
fine. \version "2.18.2"


pitchname = #`(
                (saa . , (ly:make-pitch -1 0 NATURAL))
                (raa . , (ly:make-pitch -1 1 FLAT))


                (sa . , (ly:make-pitch -1 0 NATURAL))
                (ri . , (ly:make-pitch -1 1 FLAT))
                (ga . , (ly:make-pitch -1 2 NATURAL))                 
                )                               

#(ly:parser-set-note-names parser pitchname)

musicA = \relative sa' { sa4 ri ga sa ri ga sa ri ga ri saa ga ri sa ga 
raa  }

\score {\musicA}

I would like to define the variable pitchname as sum/join/append/cons of 
two a lists, as below:


     firstpart = #`(
                    (saa . , (ly:make-pitch -1 0 NATURAL))
                    (raa . , (ly:make-pitch -1 1 FLAT))
                   )

    secondpart = #'(
                     (sa . , (ly:make-pitch -1 0 NATURAL))
                    (ri . , (ly:make-pitch -1 1 FLAT))
                    (ga . , (ly:make-pitch -1 2 NATURAL))               
                    )

and combine the two, say:


pitchname = (cons #firstpart #secondpart) 

OR

pitchname = (append #firstpart #secondpart)

The last statement combining the two parts is not working. Can someone 
tell me what I am doing wrong here?




reply via email to

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