|
From: | bannersite |
Subject: | Nesting ly:music-property error |
Date: | Sat, 29 Jan 2011 23:28:45 +0000 |
Evening all. I've been working on some scheme functions currently working on displaying the actual scheme coding while referring primarily to 6.3.2 Music Properties The following is working _______________________________________________________ myN = #(define-music-function (parser location myx ) (ly:music?) #{ #(display-scheme-music (ly:music-property $myx 'elements)) #}) \myN c Which Returned ==> (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1 1) 'pitch (ly:make-pitch -1 0 0))) ________________________________________________________ However when I try and display the pitch only with ________________________________________________________ myN = #(define-music-function (parser location myx ) (ly:music?) #{ #(display-scheme-music (ly:music-property (ly:music-property $myx 'elements) 'pitch)) #}) \myN c I get an error GNU lilypond 2.12.3 Processing "displaymusic.ly" Parsing... <string>:2:1: error: GUILE signaled an error for the _expression_ beginning here #<display-scheme-music (ly:music-property (ly:music-property lilyvartmpb (quote elements)) (quote pitch))) Wrong type argument in position 1 (expecting Music): (#(Prob: Music C++: Music((duration . #(Duration 4 )) (pitch . #(Pitch c )) (origin . #(location displaymusic.ly:8:13))((display-methods #(procedure #f (note parser))) (name . NoteEvent) (types general-music event note-event rythmis-event melodic-event)) > ) displaymusic/ly:0: warning: no \version statement found, please add \version "2.12.3" for future compatibility warning: no music found in score _________________________________________________________ I've looked at the manual several times and haven't recognized a solution. So what am I missing? Thanks Scott |
[Prev in Thread] | Current Thread | [Next in Thread] |