lilypond-user
[Top][All Lists]
Advanced

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

Writing a book (libretto) using LilyPond


From: Valentin Villenave
Subject: Writing a book (libretto) using LilyPond
Date: Sat, 29 Sep 2007 16:40:07 +0200

Hello everybody, hello Nicolas,

(by the way: many thanks for handling the \smallCaps bug)

I'm editing (as a small book) the libretto of my opera, and I thought
it would be just great if I could do this using LilyPond, particularly
thanks to the \markuplines etc commands.

I know I'm not the only one to be interested in writing books using
only LilyPond; AFAIK Nicolas has been very succesful in it with his
great Couperin book (which has become kind of my bible btw; I always
invite all my pupils to read it :)

Basically, what I need is a Scheme macro that I could use for each
line of the dialogue. This includes:
-the name of the Character who's speaking (smallCaps, centered)
-optionally a small indication following the name (italic, in parentheses)
-the line itself, which can include short indications in italic with parentheses
-optionally an independant indication before the next character starts talking.


Example:


                                                    PUNCH

Lasci darem la mano... (he smiles) La mi dirai di si.

(Enters Judy)

                                   JUDY, without noticing him

Ach, ich füll's...


%%%%%%%%%%%%%%%%%%%%%%

% I wrote three macros, one for Punch, one for Judy and
% one for the indications

#(define-markup-list-command (punch layout props args) (markup-list?)
   (let ((indication (chain-assoc-get 'indic props "")))
     (interpret-markup-list layout props
       (make-justified-lines-markup-list (cons
          (markup #:column ( #:hspace 0 #:fill-line
            ( #:concat ( #:smallCaps "Punch" #:italic indication ))
                               #:hspace 0 )) args)))))

#(define-markup-list-command (judy layout props args) (markup-list?)
   (let ((indication (chain-assoc-get 'indic props "")))
     (interpret-markup-list layout props
       (make-justified-lines-markup-list (cons
          (markup #:column ( #:hspace 0 #:fill-line
            ( #:concat ( #:smallCaps "Judy" #:italic indication ))
                               #:hspace 0 )) args)))))

#(define-markup-command (indic layout props text) (string?)
 (interpret-markup layout props
  (markup #:italic text)))

% The code I'd like to use is something like

\markuplines {
  \punch { Lasci darem la mano... \indic #"(he smiles)"
     La mi dirai di si }
  \indic #"(Enters Judy)"
  \override-lines #'(indic . ", without noticing him") \judy {
     Ach, ich füll's }
}

%%%%%%%%%%%%%%%%%%%%%%


There are many problems, the first one being the \smallCaps bug which
Nicolas has offered to work on.

The second problem is that \indic blocks are not justified; if they're
too long, they're not wrapped by the page at all. Currently, I make
them as markups, and not markup-lists, but I can't find a way to make
it work, no matter the commands I try.

The third problem is that, unlike \markups, \markuplines can't be
stored in identifiers (e.g. if I want to include the libretto in
another file, I have to actually *copy* it, or split it into several
\markup blocks; both solutions are annoying).

The fourth problem is that I would like to make sure that, if a \punch
block occurs at the end of a page, the character's name *never* gets,
printed independently from its corresponding dialogue line. Maybe this
would imply that the whole Name+line block should be treated as a
markup; I don't know. If it's a long, long line, I do want it to be
split, but just not *before* the beginning of the actual line.

It's really a pity that such new features can't be demonstrated yet in
the LSR btw. (says the LSR editor :)

I hope someone will have an idea, thank you in advance.

Cheers,
Valentin

PS. What would really be awesome would be to have an
"automatic-lyrics-cleaning" feature, which could take the text from
the lyrics and remove the hyphens, melismas indications etc, to output
 nice plain text for the libretto, on the fly; currently, I'm using
shared identifiers for all the scenic indications in both the score
and the libretto; and doing the same for the whole text would be a
dream -- pure science-fiction though, I guess...




reply via email to

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