[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: control notelength via variable?
From: |
David Kastrup |
Subject: |
Re: control notelength via variable? |
Date: |
Mon, 21 Mar 2011 09:30:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
"Dmytro O. Redchuk" <address@hidden> writes:
> On Sat 19 Mar 2011, 12:15 TaoCG wrote:
>> Hi,
> Hi!
>
>> I need to control the length of rest and notes with a variable.
>> something like:
>> len = 2
>> r\len
>>
>> this doesn't work of course but is there a way to do this?
>> I tried overriding duration-log but it only changes the visual appearance.
> Strange, lilypond *does* compile this:
>
> len = #1
> {
> c''#len
> }
>
> but engrave[s] c''4 actually. It's interesting.
Not particularly. You can intersperse Scheme expressions with music
events, and they are evaluated and the value, in general, is ignored.
Nothing more, nothing less. With one exception:
#(define len (ly:export (ly:make-duration 1 0)))
{
c''#len
}
--
David Kastrup