|
From: | David Nalesnik |
Subject: | Re: parameters in lyrics? |
Date: | Wed, 16 Dec 2015 09:46:23 -0600 |
I've finally got back to this problem, and have tried to write a wrapper around Simon's code. However, I now find myself at that peculiarly humiliating stage of grappling with Scheme code, in which one's increasingly-desperate random changes to punctuation are beginning to go round in circles. Please could someone point out my error(s)?
The code extract below generates the following error(s):
143:9: In _expression_ ((#<procedure embedded-lilypond #> parser " \\openBracket #syllable " ...)):Here's a representative sample of code. The idea is that the program chooses one or other of Simon's formatting routines, based on the value of lyricEditorialStyle.
/Users/grahamk/Documents/lilypond/music/testbed/lyric_markup_test2.ly:143:9: Wrong type to apply: #<Prob: Music C++: Music((origin . #<location /Users/grahamk/Documents/lilypond/music/testbed/lyric_markup_test2.ly:250:9>) (duration . #<Duration 4 >) (text . [blind))((display-methods #<procedure #f (lyric parser)>) (name . LyricEvent) (iterator-ctor . #<primitive-procedure ly:rhythmic-music-iterator::constructor>) (types rhythmic-event lyric-event event)) >
\version "2.19.21"
% Allow editorial additions to underlay to be italic or [bracketed] (default).
% Allow colouration in underlay, signifying reduced forces, to be
% red or italic (default).
% This only works with \lyricsto or \addlyrics due to the hardcoded duration.
% Based on Simon Albrecht's code (see lilypond-user list 4 Dec 2015):
%%% Bracketed underlay %%%
openBracket =
#(define-music-function (parser location syllable)(markup?)
#{
#(make-music
'LyricEvent
'text
(format "[~a" syllable)
'duration
(ly:make-duration 2))
#})
[Prev in Thread] | Current Thread | [Next in Thread] |