lilypond-user
[Top][All Lists]
Advanced

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

Re: non-relative relative mode?


From: David Raleigh Arnold
Subject: Re: non-relative relative mode?
Date: Fri, 27 Feb 2004 08:55:50 -0500
User-agent: KMail/1.5.4

On Thursday 26 February 2004 19:58, donald_j_axel wrote:
> On Thu, 26 Feb 2004 17:57:19 -0500
>
> David Raleigh Arnold <address@hidden> wrote:
> > http://www.openguitar.com/files/octly.txt
>
> Ok - creative bid on another solution.
>
> I have considered formating piano and scores something like this:
>
> %<bar 1 .. 4>
> <violino>{   a | b   c'  d'  b  |  c'  d'  e'  c'  | d'  e'  f2 |
> <vlcello>{   a,| b,  c   d   b, |  c   d   e   c   | d   e   f2 |
> <pnotreble>{ a | b   etc.
> <pnobas>   { a,| b,  etc.
>
> %<bar 5 .. 6>
>
> and have gawk or another parser splitting/reformating.

Done, with python.  The new version of sly will split into parts content
formatted in any combination of fields and lines.  More features are
planned, but it all works and I'll try to get it up on my website by
Monday.

It works like this.  The first two bytes are your field separator.

!!

That is followed by a search specification for the lines, if you
want more than one.  The first one is preceded by an "=" equals
sign:

!! =brs 

Then target filenames:

!! =brs !! tpt.ly !! tb.ly
str!! vln.ly
perci!! piano.ly
percii!! piano2.ly

The header is ended by a repeated search spec:

!! =brs !! tpt.ly !! tb.ly
str !! vln.ly
pi !! piano.ly
pii !! piano2.ly
brs !!

and then you have your parts.  You can do without any search specs

!! bass.ly !! voc.ly !! fl.ly !! glob.ly
bass notes !! voc notes  !! fl notes !! globals
bass notes !! voc notes  !! fl notes !! globals
bass notes !! voc notes  !! fl notes !! globals

But you have to have the field separator.  A line without a search spec
is considered to have the same search spec as the previous line:

!! =bass !! bass.ly
voc!! voc.ly
fl!! fl.ly
glb!! glob.ly
bass !! notes
more bass notes
more bass notes
fl!! notes
more fl notes
etc....

Because the format can easily handle an orchestral score, the format of
your notes is checked to the end, not just to the first mistake, for the
right number of parts per line.  The header itself is not checked.

Let me recommend building the ly file in the usual way:

trumpet = {\notes \key etc.
etc.
\include "tpt.ly"
}

pianoI = etc

\score....

Because then if you want to flatfile it later using lyinclude.py you
will still be able to make sense of it.  daveA

-- 
It's not that hard to understand the lesson of Viet Nam.  Never never
never never defend one tyrant against another, because The worst thing
that can happen is you might win.  The *Gulf* war was worse than Nam.
D. Raleigh Arnold dra@ (http://www.) openguitar.com address@hidden






reply via email to

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