lilypond-user
[Top][All Lists]
Advanced

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

Re: Mozart Requiem, help needed


From: Urs Liska
Subject: Re: Mozart Requiem, help needed
Date: Sat, 08 Nov 2014 09:40:57 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


Am 08.11.2014 01:25, schrieb Karl Hammar:
--------
Urs Liska:
Am 07.11.2014 21:29, schrieb address@hidden:
Urs:
Am 07.11.2014 13:59, schrieb address@hidden:
...
Also I wounder how to make the source available so you can make your
own edition with your own preferences, and I've tried to separate
content from presentataion. That work is incomplete. I looked at
http://lilypondblog.org/ and Urs has some ideas wich I havn't been
able to digest it yet. Anyone intereseted in theese kind of problems,
and how to apply it to this music ?
If you tell me what kind of ideas you are referring to I may give some
hints. No chance joining the project, though, sorry.
__The 1st problem is: Paper sizes and margins

I use A4 or a little smaller format I call choirbook (size taken from
a Bärenreiter choirbook) suitable to be printed on A3, folded,
stapled and cut to size. And could possible envision making pocket
scores to be included with recordings. In other parts of the world
there is different paper preferences.

Changing papersizes/margins directly influences ones decision about
\break's and staff size.

This could be accomplished if one could use lilypond like

   lilypond my_paper_block.ily --ly_code "#(set-global-staff-size 14)" \
   my_page_breaks.ily my_prefs.ily the_music.ily satb_score.ly \
   -o the_music.pdf

i.e. a solution would be to make lilypond work on on the fly
concatenation of files and code. But lilypond arguments does not work
that way. One could make a "preprocessor" to handle that, but I'm
woundering if that that there is a better way to do it.
I'm not fully looking through it, but I see several approaches:

a)
you can pass an include file through the command line.
That's probably how I would approach this: Write all possible style
information in a number of style files and use the include file you
provide through the command line to choose appropriate ones for the
intended target.
  Don't seem to work:
$ cat II.ly
\version "2.19.0"
%{
\header {
   title = "Kyrie"
   %subtitle = ""
   composer = "W.A. Mozart"
}
%}
\include "score_glb.ily"
\include "II.ily"
\include "score_ps.ily"
\include "score_midi.ily"
$

  commenting score_glb away in II.ly and running works:

$ lilypond  -o zz --ps -dinclude-settings=score_glb.ily II.ly

  commenting away II.ily too, don't:

$ lilypond  -o zz --ps -dinclude-settings=score_glb.ily 
-dinclude-settings=II.ily II.ly
GNU LilyPond 2.19.13
Processing `II.ly'
Parsing...
II.ily:80:3: error: unknown escaped string: `\midi_sop'
...
score_ps.ily:14:5: warning: cannot find Voice `Vbas'

\lyricsto Vbas \Lbas
Preprocessing graphical objects...
Interpreting music...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `zz.ps'...
fatal error: failed files: "II.ly"
$

The problem seem that you can include-settings for one file only _or_
that you cannot use settings from the first one in the second -
\midi_sop is defined in score_glb.ily and used in II.ily.

No, your set-up is not what I meant.
See the attached files, compile document.ly and -dinclude either one.ily or two.ily.
I think it's self-explanatory, otherwise please ask again.


b)
If you can make your alternative versions controllable by tags you can
benefit from the new command line options with which you can pass a list
of tags to keep or to remove through the command line.
I'm not sure if that enhancement is already in the latest release or if
it will only be in the next one, though.
I'll check that, would be useful.

c)
You can test for commandline options in the code ( with
#(ly:get-option)) and choose your layout according to the presence or
absence of certain options. You can use arbitrary options (e.g.
-dchoirbook-layout) and test for them. LilyPond will issue a warning
about the unknown option but it will work nevertheless.
 From reading the usage.pdf I got the impression it was only for the
specified (on p.4-8) variables, but it seems to work, thought I get a
warning:

$ cat a.ly
\version "2.19.0"

#(define aa (ly:get-option 'sz))
#(define bb (ly:get-option 'backend))
#(display "\naa = <")
#(display aa)
#(display ">\nbb = <")
#(display bb)
#(display ">")
$ lilypond -dsz=tt -dbackend=ps a.ly
GNU LilyPond 2.19.13
warning: no such internal option: sz
Processing `a.ly'
Parsing...
aa = <tt>
bb = <ps>
Success: compilation successfully completed
$

///

And to set the staff-size it works (with a warning):

$ cat a.ly
\version "2.19.0"

#(set-global-staff-size (ly:get-option 'sz))

\relative f { c'4 c c c }
$ lilypond -dsz=12 a.ly
GNU LilyPond 2.19.13
warning: no such internal option: sz
...

Great, thanks, though the warning seems a little misplaced,
perhaps one could append something to
scheme-options-definitions defined in scm/lily.scm, but it is probably
too late when my .ly is looked at.

Yes, that's a nice feature. I used that initially when implementing the layout control modes in Frescobaldi but realized that it should be changed when the first complaints about this warning came from end users.

Maybe one could somewhat weaken the option control mechanism by adding a "generic" option that could be passed a list like

-dcustom-options="#'(paper-one our-fancy-font-styles)"

So that these options could be checked in the input file without the warning.
But I don't expect this kind of weakening to be accepted as a feature wish.


[...]
But regarding the separation of content from presentation this is
definitely something where you should look at Jan-Peter Voigt's edition
engraver. I haven't understood how to use it so far, but maybe Kieren
can give you some tips?
   Is this it:
http://lilypondblog.org/2014/07/trees-music-and-lilypond/
Not really. THe editionEngraver is at least two or three posts in the
future ...

https://github.com/openlilylib/openlilylib.git
https://github.com/openlilylib/openlilylib/tree/master/editorial-tools/edition-engraver
Ok, found it.

I kind of like the:

   \putMusic "massInC/kyrie/soprano/melody" \relative c'' { c2 d4 c }

and when I program I usually use data structures. But I don't know
how to do my own datastructures in lilypond except simple variables.
And I wounder if you cannot do the above without to much writing
and in plain scheme/lilypond (i.e. mostly following notaion.pdf and
without going "too" deep into scheme, where the definition of deep
waries with person).
Well, if you should happen to understand all this one day, please come
back to me and help me understanding it too ;-)
Currently, my understanding (which can be way off) of data
structures in lisp (scheme, guile) is that there is only one of them
- the "dotted pair". Such pairs can be connected to give you a lists.

http://groups.csail.mit.edu/mac/ftpdir/scheme-reports/r5rs.ps
seems to be the definition of scheme, it mentions some basic types
(like numbers, and strings), pairs, lists, and vectors (well, it seems
I was wrong about the "only" thing). Any other data structures you have
to implement yourself.

Searching what \putMusic means leads eventually to
scheme-lib/lalily/storage.scm where define-class is used:

(define-class <tree> ()
   (children #:accessor children #:init-thunk make-hash-table)
   (key #:accessor key #:init-keyword #:key #:init-value 'node)
   (value #:accessor value #:setter set-value! #:init-value #f)
   )

which probably is the storage structure Jan-Peter Voigt is using.
Now, define-class isn't mentioned in
  
http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Procedure-Index.html#Procedure-Index
but is in
  http://www.gnu.org/software/guile/manual/guile.pdf (p.719)
so this is a Guile 2 only thing ??

I think understanding storage.scm is the key to understand \putMusic.

OK. Maybe I'll give that another try.
I think there is so much potential in it, I'm always ashamed when inventing a solution knowing that there would be a much more powerful one also available.

Best
Urs


Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57



Attachment: document.ly
Description: Text Data

Attachment: one.ily
Description: Text document

Attachment: paper-size-one.ily
Description: Text document

Attachment: paper-size-two.ily
Description: Text document

Attachment: two.ily
Description: Text document


reply via email to

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