lilypond-user
[Top][All Lists]
Advanced

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

Re: Having trouble with an old snippet--what to do?


From: Jay Anderson
Subject: Re: Having trouble with an old snippet--what to do?
Date: Mon, 25 Nov 2013 22:22:29 -0700

On Mon, Nov 25, 2013 at 7:18 PM, ryanmichaelmcclure
<address@hidden> wrote:
> I'm messing with the snippet found here:
>
> http://lilypond.1069038.n5.nabble.com/rhythm-template-function-td33662.html
>
> I found the snippet originally on the LSR:
>
> http://lsr.dsi.unimi.it/LSR/Snippet?id=465
>
> Looking on the mailing list message, it was created on 2.11.45. I tried to
> update the file to 2.17.29, but it still won't work. I'm getting this error:
>
> Parsing.../tmp/frescobaldi-p52m4v/tmpN5eMTc/document.ly:41:17: In procedure
> car in expression (car p):
> /tmp/frescobaldi-p52m4v/tmpN5eMTc/document.ly:41:17: Wrong type (expecting
> pair): ()
>
> I'm still learning Scheme and am not sure what's wrong. Has anyone messed
> with this snippet lately?

I'm not surprised it doesn't work anymore. With recent improvements in
lilypond there is a different technique that you should consider:

pattern = #(define-music-function (parser location p1 p2 p3 p4 p5)
(ly:pitch? ly:pitch? ly:pitch? ly:pitch? ly:pitch?)
#{ $p1 32 $p2 ( $p3 $p4 ) $p5 8 -! #})

...

\pattern c c' e c g  % results in => c32 c'( e c) g8-!

The same can be done with one pitch instead.

-----Jay



reply via email to

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