lilypond-user
[Top][All Lists]
Advanced

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

Re: conditional


From: David Raleigh Arnold
Subject: Re: conditional
Date: Thu, 2 Oct 2003 12:35:02 -0400

On Thursday 02 October 2003 07:37 am, Mats Bengtsson wrote:
> I don't really understand what you mean, but it seems that you
> are making things more complicated than necessary.
>
> If you want to separate the music input, the titling and the
> actual definitions of what should be included in a specific score,
> you could put the definitions in separate files and use the
> \include command to combine the information from the different
> files. For example, something like
> ---------------

I think you will want some central directory for these files, rather
than copies in the directory of each piece of music.

\include "/path/commonSettings.ly"
> \include "/path/stringParts.ly"
> \include "/path/annotations.ly"
> \include "/path/SwedishHeadings.ly"
>
> \score{
>    \context Staff < \SwedishAnnotations \violinI >
>    \heading{ instrument = "Violin 1"}
> }
> ------------------
> The same input files could then be used in some other context.
>
> I'm probably old-fashioned thinking in terms of files instead of
> database entries, but I think it's fairly convenient.
>
> You should probably take some time to come up with a convenient
> naming scheme, both for files and for identifiers within the files,
> and determine what things you can put in the same file and what you
> want in different. Of course, you could have all your definitions
> in one huge file, but it's probably more convenient to split it
> into several.
>
> Arnold will certainly recommend you to use his tool 'sly' to
> combine the different parts, but I think the \include mechanism
> is convenient enough.

I don't have anything to combine parts, only to split a database-style 
score into parts *for* \inclusion.  I wish I could filter a sly file
and create another sly file as well as parts, because that would make
sly even more an editing tool, but I haven't put Humpty-Dumpty together
again yet because I want to do it with something other than a bash
script and I've got some learning to do.

I don't see how splitting a file into columns would help with
managing headers.  Sly is for notes.

It shouldn't be difficult for a real programmer to write a script that 
would divide a file into sections sequentially and pipe the sections,
but aren't separate files easier?

Lyinclude can flatfile an .ly score, but that is exactly what Aaron
doesn't want.  That has nothing to do with sly.  One could
use grep or whatever with some other tag than \include "filename",
but why do that?
>
> Also, in Lily version 2.0, there is a new mechanism to add tags
> within the music definitions and use them to make different
> versions of the same music, see
> http://lilypond.org/doc/v2.0/input/regression/out-www/collated-files.
> html#tag-filter.ly

I haven't tried that yet, but it is also possible to use
comments for your own tags with grep or sed or whatever
you desire.  %{keysig-3%} and
%{/keysig-3%} could be used to edit any .ly file
to change the three notes b e and a to bes ees and aes,
for example, and \nat b could indicate b natural, where
nat = %{nat tag%}.  It certainly could be done, but I don't
see the point of going to the trouble of making the
input file a valid .ly file in that particular case, since
it would sound quite strange before filtering. 

You could also do some unholy combination of these ideas.  Lilypond can 
produce the first line as a .png.  Why not use that feature in your 
script?

When you have something, please put it on your website.
See   http://www.openguitar.com/arrangements.html
I might want to use something like you suggest
myself.  daveA

-- 
Br`er Fox told Br`er Rabbit that the Tar Baby had dissed him, and Fox 
made a
dummy out of tar and put him in Rabbit's path.  When the Tar Baby 
failed to
return a civil greeting, Rabbit punched him with a right, a left, both 
feet and
butted him with his forehead.  Along came Br`er Fox who saw that he was
thoroughly "stuck up".  Br`er Fox is much smarter than Br`er Rabbit, 
and in
spite of all Rabbit's pleas for help, no one is going to unstick him 
and throw
him in the briar patch, so now Br`er Fox is liesurely eating Rabbit's 
liver.
D. Raleigh Arnold dra@ http://www.openguitar.com address@hidden




reply via email to

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