lilypond-user
[Top][All Lists]
Advanced

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

Re: Catch direction operators


From: MING TSANG
Subject: Re: Catch direction operators
Date: Sun, 29 Sep 2013 06:37:41 -0700 (PDT)

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.

reply via email to

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