[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: splitting .ly files into chunks
From: |
Felipe Massia Pereira |
Subject: |
Re: splitting .ly files into chunks |
Date: |
Thu, 13 Jun 2002 20:10:48 -0300 (EST) |
I think he could comment out the \includes he does not want to hear. A
better way to do it would be pre-process the file someway. So one could
use conditional compilation. Like this
#ifndef PART
#define PART1
#define PART2
#define PART3
#endif
\notes {
#ifdef PART1
\include part1.ly
#endif
#ifdef PART2
\include part2.ly
#endif
...
This file could be processed with 'cpp' as
$ cpp master-file.ly -DPART -DPART1 > part1.ly
$ cpp master-file.ly > all_parts.ly
This was not tested but should work. If scheme has similar conditional
building, I think it's better use it instead, so the user does not need
to use cpp (in the case above I cant pass master-file to lilypond
directly).
[]s
--
Felipe Massia Pereira <http://www.ic.unicamp.br/~ra000493>
CS MSc Student @ IC-UNICAMP
On Thu, 13 Jun 2002, David Raleigh Arnold wrote:
>
> On Thu, 13 Jun 2002 16:04:11 Colin Cotter wrote:
> > Hello ladies and gentlemen,
> > I am using lilypond as a composing tool -I tend to think in terms of
> > manuscript so it is quicker to type stuff in than use sequencer
> > software.
> > My question is this: I am writing a piano piece with multiple parts
> > which
> > I am including into the main body of the .ly file by writing e.g.
> > \alto,
> > \tenor for the different parts. Can anyone give me any tips on how to
> > break the music into managable parts so I can listen to small chunks
> > in
> > midi instead of sitting through the whole piece each time? The
> > analogue
> > would be when I use \include in a LaTeX file and rem out all the
> > \include
> > bits I don't want to see in the DVI at that particular time.
> > COlin
>
> You \included the answer in your question!
>
> \notes { \etc etc
> \include "masterpiece1-8-pt1.ly"
> \include "masterpiece9-16-pt1.ly"
> }
> Rename the parts you don't want to hear, but touch the original
> name becaues lilypond insists on the existence of included
> files, but it is ok if they are empty.
>
> I've written a utility (sly) to greatly facilitate this, but I have
> to fix it so it can be used in/with an emacs-xemacs buffer. I
> strongly advocate getting the notes out of the .ly file.
> Here are 22 bars--lines of Bach's 1st Lute Suite Prelude transcr. for
> guitar--very simple in two parts. The *s are placeholders for
> the notes in the beginning of the measure (in the part).
> The " |" is not a barline, it is a field separator:
>
> d16 d' f' a' f' d' f' d' a d' f d' | d a f
> *4 r4 *8 *
> d16 d' f' a' f' d' f' d' a d' f d' | d a
> f *4 r4 *8 *
> d16 d' g' bf' g' d' g' d' bf d' g d' | d bf
> g *4 r4 *8 *
> d16 d' g' bf' g' d' g' d' bf d' g d' | d bf
> g *4 r4 *8 *
> d16 cs' e' g' e' cs' e' cs' bf cs' g cs' | d bf
> g *4 r4 *8 *
> d16 cs' e' g' e' cs' e' cs' bf cs' g cs' | d bf
> g *4 r4 *8 *
> d a d' f' d' a d' a f a d a | d f d
> *4 r4 *8 *
> c a d' f' d' a d' a f a d a | c f d
> *4 r4 *8 *
> bf, a d' f' d' a d' a f a d a | bf, f d
> *4 r4 *8 *
> a, a d' f' d' a d' a f a d a | a, f d
> *4 r4 *8 *
> gs, b d' f' d' b d' b f b d b | gs, f d
> *4 r4 *8 *
> gs, b d' f' d' b d' b gs b e b | gs, gs e
> *4 r4 *8 *
> a, b c' e' c' b c' b e b c b | a, e c
> *4 r4 *8 *
> a, a c' e' c' a c' a c a a, a | a, c
> a, *4 r4 *8 *
> f, c' e' a' e' c' e' c' a c' f c' | f, a f
> *4 r4 *8 *
> d b f' a' f' b f' b d b b, b | d d
> b, *4 r4 *8 *
> e, b d' gs' d' b d' b e b b, b | e, e
> b, *4 r4 *8 *
> e, b d' gs' d' b d' b e b b, b | e, e
> b, *4 r4 *8 *
> e, c' e' a' e' c' e' c' e c' c c' | e, e c
> *4 r4 *8 *
> e, d' gs' b' gs' d' gs' d' f d' d d' | e, f d
> *4 r4 *8 *
> e, e' a' c'' a' e' a' e' a e' e e' | e, a e
> *4 r4 *8 *
> e, e' gs' d'' gs' e' gs' e' b e' gs e' | e, b
> gs *4 r4 *8 *
>
> I only had to type six pitches for each 15 in the score. How sweet it
> is. I used
> "rectangular editing" which everyone else calls column copying. A
> keyboard macro
> would have been better, and I will finish the piece with one of those
> one day.
>
> ------------------------------------------------------------
> Information is not knowledge. Belief is not truth.
> Indoctrination is not teaching. Tradition is not evidence.
> David Raleigh Arnold address@hidden
>
> _______________________________________________
> Lilypond-user mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/lilypond-user
>