[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to pass a fraction as a parameter for a Scheme function
From: |
Ralf Mattes |
Subject: |
Re: How to pass a fraction as a parameter for a Scheme function |
Date: |
Tue, 09 Jun 2020 22:12:48 +0200 |
User-agent: |
SOGoMail 2.3.20 |
Am Dienstag, 09. Juni 2020 21:43 CEST, Paolo Prete <paolopr976@gmail.com>
schrieb:
> Hello,
>
> I don't understand how to use a fraction as a parameter for a scheme
> function. More specifically, this gives me an error:
>
> %%%%%%%%%%%%
>
> proportionalNotationDur = #(define-music-function (parser location frac)
> (scheme?) #{ \set
> Score.proportionalNotationDuration = #(ly:make-moment frac) #})
> {
> \proportionalNotationDur 1/16
> c' c' c' c'
> }
>
> %%%%%%%%%%%%
>
> How can I fix it?
You declare the function to take a scheme value. Shouldn't that
then be passed one, i.e:
{
\proportionalNotationDur #1/16
c' c' c' c'
}
> Thanks!
--
Ralf Mattes
Hochschule für Musik Freiburg
Projektleitung HISinOne
Schwarzwaldstr. 141, D-79102 Freiburg
http://www.mh-freiburg.de