lilypond-user
[Top][All Lists]
Advanced

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

Re: Creation of a generic pattern


From: David Raleigh Arnold
Subject: Re: Creation of a generic pattern
Date: Sun, 27 Feb 2011 15:30:27 -0500
User-agent: KMail/1.13.5 (Linux/2.6.32-4-686-bigmem; KDE/4.4.5; i686; ; )

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 



reply via email to

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