lilypond-user
[Top][All Lists]
Advanced

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

Re: rhythm template function


From: Stefan Thomas
Subject: Re: rhythm template function
Date: Wed, 4 Jun 2008 00:30:55 +0200

Great, it works perfectly!

2008/6/3 Gilles THIBAULT <address@hidden>:
 
 
Dear Gilles,
thanks for Your tipp! But I tried it with an own example, that does not work, I don't know why:
\include "rhythmen.ly"

 sax = #(define-music-function (parser location musicA musicB musicC)
              (ly:music? ly:music? ly:music?)
#{
     \set tupletSpannerDuration = #(ly:make-moment 1 4)
   
     \times 4/5 \makeRhythm $musicA "16 16 16 16 16"
   
     \unset tupletSpannerDuration
     \makeRhythm $musicB "4"
    
#})
 
 
\new Staff \relative
{
    \sax  { c d e f g } a
 
}
It's because you define a function with 3 arguments musicA, musicB, musicC and you give only 2 arguments in 
    \sax  { c d e f g } a
If you only want 2 arguments, you have to define sax like that :
 
sax = #(define-music-function (parser location musicA musicB)
              (ly:music? ly:music?)
etc ...
 
Just delete musicC and a ly:music?.
 
Gilles
 


reply via email to

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