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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user