lilypond-user
[Top][All Lists]
Advanced

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

mmrest-of-length and partial measures/time chnages


From: Urs Liska
Subject: mmrest-of-length and partial measures/time chnages
Date: Mon, 12 Dec 2016 09:24:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

Hi all,

I have a set-up where pausing sections in a part can be handled by
automatically inserting multimeasure rests whose length is determined by
a meta variable for the sections.

As a MWE this looks like this:

\version "2.19.52"

sectionOne = {
  c,1 |
  c,1
}

{
  #(mmrest-of-length sectionOne)
}

which nicely prints a staff with two measures of rest.

However, when the referenced variable starts with (or actually contains)
a partial measure, LilyPond gets confused:

sectionTwo = {
  \partial 8 
  c'8 |
  c'1 |
  c'1
}

{
  #(mmrest-of-length sectionTwo)
}

Of course the multi-measure rest now is 17/8 long but doesn't know about
the partial and consequently gives me barcheck errors and wrong output.

The same is true when the referenced variable contains music in other
than 4/4 time signature because mmrest-of-length by default seems to
produce 4/4 rests.
I can't simply add a \time command in front of the mmrest because this
is actually a complex set-up where the variables are retrieved from
previously parsed music expressions.

So my question is: is there a reliable and more or less convenient way
to produce a "rest" part/section from a referenced section, regardless
of what's in there. I think basically there are two approaches:
a)
analyse the music expression for partials and time changes
b)
copying the music but replace everything with rests.

Any pointers would be appreciated

Best
Urs




reply via email to

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