lilypond-user
[Top][All Lists]
Advanced

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

Re: Start music at specified measure without having to fill the previous


From: Jan-Peter Voigt
Subject: Re: Start music at specified measure without having to fill the previous.
Date: Mon, 18 Jul 2016 08:11:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Hello Dimitris, hello Carl,

if you split your global/meta-variable with all you your timesigs, you can make use of $(mmrest-of-length globalA) to create multi-measure-rests, which fill all measures in global:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

globalA = {
  \time 3/4
  \repeat unfold 3 s1*3/4
  \time 5/8
  \repeat unfold 2 s1*5/8
}
globalB = {
  \time 5/8
  \repeat unfold 1 s1*5/8
  \time 7/4
  \repeat unfold 2 s1*7/4
}

global = { \globalA \globalB }

\new Staff <<
  \global
  { $(mmrest-of-length globalA) c''8 b' d'' c'' a' }
>>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

To shorten the input, you might use a function like this:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% to create skips instead of multimeasure-rests, substitute 'R' with 's'
timespan =
#(define-music-function (num frac)(integer? fraction?)
#{ \time $frac \repeat unfold $num R$(ly:make-duration 0 0 (car frac)(cdr frac)) #})

%%%

{ \timespan 3 7/8 }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I thought about extending the edition-engraver. I'll post a comment as an answer to Urs message.

HTH
Jan-Peter


Am 18.07.2016 um 05:15 schrieb Carl Sorensen:


On 7/17/16 9:40 AM, "dtsmarin" <address@hidden> wrote:

Hello,

I'm working with a lot of time signature changes and it's very frustrating
to calculate all the rests needed to fill the measures before.
Is it possible to tell Lilypond start inserting music after a specified
number of measures even if they have different time signatures?

Can you define the time signatures to put in parallel with some other
content?

timesigs = {
\time 3/4
\repeat unfold 7 s1*3/4
\time 6/8
\repeat unfold 6 s1*6/8
\time 5/8
}


mynotes = {
\repeat unfold 103 c'8
}

\score {
   \new Staff
   <<
      \timesigs
      \mynotes
   >>
}


By using s1*<TIME FRACTION> you get a full measure skip.
By using \repeat unfold N, you N measures.

I realize that it is not quite as nice as saying "set the skip at measure
73", but it seems to me to not be that hard.

It would also be not too hard to create a Scheme function that could take
a list of (measure number, time signature) pairs and return something like
the timesigs variable above.  This would automate the process and get
almost exactly what you want.

HTH,

Carl


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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