lilypond-user
[Top][All Lists]
Advanced

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

Re: Little scheme question


From: Nicolas Sceaux
Subject: Re: Little scheme question
Date: Wed, 06 Dec 2006 21:05:53 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Sebastien Gross <address@hidden> writes:

> The question is how to factorise an expression like:
> \tag #'tab {<ees bes' d>4} tag #'score {<ees bes' d>8 ~ <ees bes' d>}
> to something like:
>
> \tabRhythme {<ees bes' d>} #'(4) #'(8 8)
>
> I thought to write a function like:
>
> tabRhythme = #(define-music-function (parser location music tab score)
>       (ly:music? integer? integer?)
>       ...
>       )


The first thing to do is to observe what the input music looks like, and
what the output of your function should look like, using
\displayMusic. The purpose of your function will then be to transform
one into the other.

  \displayMusic <ees bes' d>4
  \displayMusic { \tag #'tab {<ees bes' d>4}
                  \tag #'score {<ees bes' d>8 ~ <ees bes' d>} }

nicolas




reply via email to

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