lilypond-user
[Top][All Lists]
Advanced

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

Re: efficient score and part production


From: Nicolas Sceaux
Subject: Re: efficient score and part production
Date: Tue, 14 Oct 2003 23:30:38 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux)

Mon, 13 Oct 2003 19:50:14 -0700, Paul a dit : 

 > I have posted variations of this before and I am at least curious what
 > some of you do to save work here. 
 > [...] 
 > That means I only have to type all of that information once no matter
 > how may parts/voices there are.  It also means once I get the "global"
 > right I don't to worry about mistakes like leaving out bars, etc. out
 > of individual parts.  I realize that producing the full score first as
 > a composer would do eliminates some of that kind of error if the part
 > extraction is done correctly.  OTOH it doesn't eliminate some of the
 > redundant typing.  And now how easy is it to produce the individual
 > parts?  Because of its structure Lily certainly does help a lot here.
 > But then there is all the other markup etc. that needs to appear at
 > least at the top of the score and also in each of the individual parts.
 > [...]

LilyPond extensibility helps here. For the markup issue you're
mentionning, I use lisp macros to define markups that appear above and
below full score systems, and can also be used in individual parts,
with a single statement like this:

   #(def-marks (#:down marksDown #:up marksUp #:single marksSingle)
     (skip 0 0 1 1)
     (segno #:up 2 3 #:down -2 -3)
     (skip 0 0 2 1)
     (fine)
     (skip 0 0 3 1)
     (dalsegno #:down -1 -2))

It defines 3 variables: 
  - marksDown for marks that appear below the full
    score systems;
  - marksUp : idem, but above;
  - marksSingle: marks to be used in individual parts.

"#:up 2 3" means "add (2 . 3) extra-offset in marksUp".

Then, I just use \markDown, \marksUp and \marksSingle, where it is
appropriate.

Digging in LilyPond scheme sources provides the usefull information
for this kind of things. One can also think of an alternate figured
bass notation, using markups, and lisp macros:

#(define myFigures
         (def-figures
           6 *4.     ;; <==> <6>4.
           (4 6) -   ;; <==> <4 6>
           (+3 7) -  ;; <==> <3+ 7>
           () *1*3/4 ;; <==> <_>1*3/4
           6 *2      ;; <==> <6>2
 ))

I confess that this example is silly, but it can be done, with
relatively little trouble. And it is user-defined: don't have to
change the LilyPond compiler. The same think could be done for lyrics
for instance (which would also be silly, hmph).

Please correct me if I'm wrong, but there are some limitations,
though. For instance, one would like to define the full score and
individual parts in a single \score-equivalent statement.

#(defscore
  (context StaffGroup
    (part (context Staff        ;; the first part to be extracted
               ....))
    (part (context PianoStaff   ;; a second part
               ....)))
  #:extract-parts #t)       ;; please also extract individual parts


(I have been tempted to do something like this)

However, the LilyPond compiler treats a score only if the "\score"
token is encountered in the source: a "defscore" macro cannot be
defined in scheme (I would be pleased to be corrected). 

#(defscore
  ....
     (context Voice
       (ly:include "my-voice.ly") ;; <--- this would be cool also
       ...))

However, I do realize that my expectations and needs concerning
user-programming in LilyPond might not be shared by many other
LilyPonders and thus would be quite low on a wish list.

nicolas





reply via email to

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