lilypond-user
[Top][All Lists]
Advanced

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

Re: default note duration


From: Simon Albrecht
Subject: Re: default note duration
Date: Fri, 22 Jan 2016 21:28:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 22.01.2016 19:16, Gianmaria Lari wrote:
Hello,

the lilypond default note duration is 1/4. For example if I write

{ a b }

lilypond generates two quarter notes. There is any way to set the _default_ note value to another value for example to 1/8 so that the previous code would generate two 1/8 notes?

I don’t know of a ‘proper’ way. This is something which is done by the parser, and can’t be easily customised. However, there is a ‘cheat’: :-)

%%%%%%
\version "2.19.35"
\void { 8 } % for 2.18., use { c8 } or whatever pitch
{ c' }
%%%%%%

\void means that the argument is interpreted, but not returned. Thus, Lily won’t print the first music expression, but when the parser reads the second music expression and doesn’t find a duration, he will use the last one he encountered. Normally, that would be an undesired side effect, but here it helps.

HTH, Simon



reply via email to

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