lilypond-user
[Top][All Lists]
Advanced

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

Re: default note duration


From: Gianmaria Lari
Subject: Re: default note duration
Date: Fri, 22 Jan 2016 23:25:25 +0100

Thank you Simon for the "cheat", this is exactly what I wanted to know :)
g.

On Fri, Jan 22, 2016 at 9:28 PM, Simon Albrecht <address@hidden> wrote:
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]