|
From: | Gianmaria Lari |
Subject: | Re: default note duration |
Date: | Fri, 22 Jan 2016 23:25:25 +0100 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |