lilypond-user
[Top][All Lists]
Advanced

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

Re: "functions" in lilypond


From: David Raleigh Arnold
Subject: Re: "functions" in lilypond
Date: Tue, 7 Oct 2003 15:49:38 -0400

On Monday 06 October 2003 08:19 am, Kieren Richard MacMillan wrote:
> Hello, all --
>
> I know you can set up predefined "variables" containing a bunch of
> different directives (including notes, tweaks, markings, etc.), but
> can you set up "functions" where the "parameters" can be decided at
> "runtime"?
>
> For example, can I set up a "tuplet within a quadruplet, with slurs
> between notes 2 and 4, a phrasing slur over the whole thing, and a
> crescendo on the last two notes" and supply the specific pitches only
> when I actually use the "stamp":
>
>      \myCoolNoteSetDefinition {bes a c b cis cisis d}

Almost.  This is an editing task, and the developers don't like the
idea of user variables, for fear it may result in preprocessing.
Also, you want a finished product so you can add fingering, etc.,
when you have finished the notes.

You will find something close in ptfilter.txt, specifically
substitute.sed.  Change the <> to [] though, because of the
change in lilypond chord syntax.  You want one measure on
each line in your infile.  I'm going to rework that pretty
soon.

a bis c cis  Your []4 xx- []8copied []-stuff here []4

sed -f substitute.sed infile.ly > newfile.ly  produces:

Your a4 xx- bis8copied c-stuff here cis4

and doing this isn't that hard:

[]4 xx- []8copied []-stuff here []4
[]4 xx- []8copied []-stuff here []4
[]4 xx- []8copied []-stuff here []4
[]4 xx- []8copied []-stuff here []4
[]4 xx- []8copied []-stuff here []4

daveA




reply via email to

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