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: Voyageur Galactique
Subject: Re: Creation of a generic pattern
Date: Mon, 28 Feb 2011 00:59:20 +0100

Thank you for your answers.

>From what has been said sofar, I see there is at least two possible directions 
>:

- scheme function
- preprocessor

The scheme solution seems a bit too verbose but I will study that
seriously. It can bring a lot of flexibility I will need in the future

Along with the sed script given before,  I tried GPP
(http://en.nothingisreal.com/wiki/GPP). This is a General Purpose
Preprocessor.

I can use several several kind of predefined macro syntax and user
defined syntax.

I choose to use a tex-like syntax for this first experiment.

I works well.

In my lilypond code, I define a macro named pattern1 with 5 arguments:

\define{\pattern1{a1}{a2}{a3}{b1}{b2}}{\times 2/3 {\a1 16\>[(\a2
\a3\!) } \b1 16 \staccato

Then if I want to use the macro

\pattern1{g}{a}{g}{e}{a}

Finally, when I'm done with editing the code, I use the preprocessor :

gpp -T myscore_pre.ly > myscore.ly

The resulting file can be rendered with lilypond :
lilypond myscore.ly



reply via email to

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