lilypond-user
[Top][All Lists]
Advanced

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

Trying to create a custom markup command


From: Romel Anthony S. Bismonte
Subject: Trying to create a custom markup command
Date: Fri, 13 Jul 2007 00:33:54 +1000

I liked the idea of a segue so much, that I decided that I should write a custom markup command for it:
 
#(define-markup-command (segue layout props tosong)
    (string?)
    (interpret-markup layout props
        (markup #:small #:column "segue to" #:italic tosong)
    )
)
 
The usage (as I extrapolated from the "character" and "smallCaps" examples in the documentation) would be something like
 
c1_\segue #"Something Else"
 
Needless to say, it didn't work. ^_^
 
Some information that may help in trying to fix my error:
 
1. I have a main file which \include's the individual score files:
 
% main.ly
#(define-markup-command (segue layout props tosong)
    (string?)
    (interpret-markup layout props
        (markup #:small #:column "segue to" #:italic tosong)
    )
)
\include "music.ly"
-----
 
% music.ly
\score {
    c1_\segue #"Something Else"
}
-----
 
2. Here's the result of trying to run my example:
/main.log/
music.ly:2:7: error: unknown escaped string: `\segue'
    c1_
       \segue #"Something Else"
 
music.ly:2:14: error: syntax error, unexpected SCM_TOKEN
    c1_\segue
              #"Something Else"
 
There's no output. (I was expecting some...)
 
3. I've written two other markup commands. Neither of them work, for reasons I was hoping I can discover from insight from all of you guys. What I noticed is that they get through the lilypond program fine--that is, until I try to use it. I'm guessing that Lilypond won't check it's correct (or whatever the problem is with the command) until it's being used.
 
By the way, I am interested in contributing to the documentation. It's worthy to read, and has so far eaten up most of my day today. ^_^ If it improves, we'll know when people spend less time reading it and more time making music. I'd like to take part in that one.
 
Thanks for all the help so far... regards to all.
Romel

reply via email to

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