On Wednesday 14 January 2004 17:57, Kieren Richard MacMillan wrote: > [ Mac OS X 10.2.8; Lilypond 2.1.7-3 ] > > Howdy, y'all! > > Just wondering if there's a way to define a directive/variable > "inline"? > > e.g. > > Rather than: > > innerDef = { g2 g } > stuff = \notes > { > a4 a a a > \innerDef > c4 c c c > \innerDef > } > > [Result: a4 a a a g2 g c4 c c c g2 g] > > you might be able to do: > > stuff = \notes > { > a4 a a a > innerDef = { g2 g } > \innerDef > c4 c c c > \innerDef > } > > [Result (n.b., the same as above) = a4 a a a g2 g c4 c c c g2 g] > > or, better still, define it as (during) the first call: > > stuff = \notes > { > a4 a a a > { g2 g } == innerDef > c4 c c c > \innerDef > } > > [Result (n.b., the same as above) = a4 a a a g2 g c4 c c c g2 g] > > The benefit, of course, would be that you would be able to keep > similar definitions "inline" and "together" (e.g., notes in the > \notes block, time switches in the \global block, etc.), and in a > well-defined "scope", which could help reduce score complexity. > > Any comments?
In your example, you are illustrating an editing task. It would be quicker to copy the notes, even if there were a lot more of them. If you were defining a command, you would do it to use throughout the score, but that's not the main thing. Putting definitions all in one place makes the file easier to maintain through syntax changes. Hunting down multiple definitions through a score could be hardly any fun at all. daveA -- Failure is certain when you fail to identify your enemy and invade the wrong country. Our troops defend the enemy and weaken our country by making new enemies and fighting them instead. Thus, our "leaders" give our terrorist enemies aid and comfort for a pittance of Arab oil money. D. Raleigh Arnold dra@ (http://www.) openguitar.com [EMAIL PROTECTED] _______________________________________________ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user