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 _______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user