I was following the caption subject in lily user list.I run the following (copy 
from the lists).  I got error, please see the log at the end of lily code.
Thanks,
Ming

%lily code starts %%%%%%%%%%%%%%%%%
\version "2.17.27"
colorizeDir =
#(define-music-function (parser location item)
(symbol-list-or-music?)
(define (grob-colorize-dir grob)
(let ((ev (event-cause grob)))
(case (ly:event-property ev 'direction)
((1) red)
((-1) blue)
(else '())))))
#{ \tweak color #grob-colorize-dir #item #})
\new Staff \with { \colorizeDir Slur } {
c''^(
d'')
c''(
d'')
\undo \colorizeDir Staff.Slur
c''_(
d'')
<c'' e''>-\once \colorizeDir ^(
<d'' f''>)
}
% lily code ends %%%%%%%%%%%%%%


log file messAGE:
Starting lilypond-windows.exe 2.17.27 [Untitled (2)]...
Processing 
`c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly'
Parsing...
c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly:12:5:
 error: GUILE signaled an error for the expression beginning here
#
{ \tweak color #grob-colorize-dir #item #})
c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly:12:21:
 error: GUILE signaled an error for the expression beginning here
#{ \tweak color #
grob-colorize-dir #item #})
c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly:12:40:
 error: GUILE signaled an error for the expression beginning here
#{ \tweak color #grob-colorize-dir #
item #})
c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly:12:39:
 error: wrong type for argument 3.  Expecting symbol list or music, found 
#<unspecified>
#{ \tweak color #grob-colorize-dir 
#item #})
c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly:12:46:
 error: GUILE signaled an error for the expression beginning here
#{ \tweak color #grob-colorize-dir #item #
})
c:/users/tsang/appdata/local/temp/frescobaldi-ylykff/tmpad4njh/document.ly:12:47:
 error: syntax error, unexpected EVENT_IDENTIFIER
#{ \tweak color #grob-colorize-dir #item #}
)
Unbound variable: {
Unbound variable: grob-colorize-dir
Unbound variable: item
Unbound variable: }
C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/ly-syntax-constructors.scm:56:23:
 In procedure memoization in expression (apply (ly:music-function-extract fun) 
parser ...):
C:/Users/Tsang/Dropbox/LilyPond/usr/share/lilypond/current/scm/ly-syntax-constructors.scm:56:23:
 Missing body expression in ((define (grob-colorize-dir grob) (let ((ev 
(event-cause grob))) (case (ly:event-property ev (quote direction)) ((1) red) 
((-1) blue) (else (quote ())))))).
Exited with return code 1.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to