On Sunday 27 February 2011 14:35:51 voyageur wrote: > Hi, > I have a score with a reccurent rythmic pattern. > This is an example : > > \times 2/3 {c16\>[(d c\!) } e16 \staccato c \staccato] > > I want to create some kind of template to save me typing the code > many times. > > I'm not sure template is the appropriate word, perhaps something like > a C macro would be more descriptive. > > >From the lilypond tutorial, I made the assumption it could be done > >with scheme > > functions. However I didn't found enough examples to get started. > > Could you give some direction on how you would do that ? Write your template with "*"s for values, copy it, list your values before, and run this on the whole file or on a selection in a capable editor. Regards, daveA
# substar.sed replaces alpha beta re * gub * gub # with re alpha gub beta gub # Will leave backslashed star alone: \* # save backslashed stars s/[\][*]/WriteStar/g :dostar /[*]/{ # remove leading spaces s/^ *// # copy first word to after first star s/\([^ ]*\)[^*]*[*]/&\1/ # delete first word s/[^ ]*// # delete first star s/[*]// t dostar } s/WriteStar/*/g -- For beginners: very easy guitar music, solos, duets, exercises. Early intermediate guitar solos. One best scale set for all guitarists. http://www.openguitar.com/scalescomparison.html ::: plus new and better chord and arpeggio exercises. http://www.openguitar.com _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user