Partial measure moment

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Partial measure moment

Gilles Sadowski
Hi.

>
> - Partial bars:
> You probably don't want to use \partial in the middle of a piece. In your
> example, it tends to destroy the bar numbering. I think it's a better idea to
> set Timing.measureLength directly.
>

I found this in the manual:

measurePosition (moment)
    How much of the current measure have we had. This can be set manually to
    create incomplete measures.


How do I express this "moment" type in a lily file?
I tried

  g2. \set Timing.measurePosition = #1 |

but lilypond complains:

    g2. \set Timing.measurePosition = #1
                                         |
type check for `measurePosition' failed; value `1' must be of type `moment'[24]



Thanks,
Gilles


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Partial measure moment

Gilles Sadowski
Hi.

The problem is presented in the following:

  http://lists.gnu.org/archive/html/bug-lilypond/2005-10/msg00169.html
 
I thought that it might be a bug but:

> >
> > - Partial bars:
> > You probably don't want to use \partial in the middle of a piece. In your
> > example, it tends to destroy the bar numbering. I think it's a better idea to
> > set Timing.measureLength directly.
> >
>

Hence I tried
 
>
> measurePosition (moment)
>     How much of the current measure have we had. This can be set manually to
>     create incomplete measures.
>

  g2. \set Timing.measurePosition = #(ly:make-moment 2 2) |


But I still get a "barcheck failed" warning from lilypond :-{
I also tried to \set "Timing.mesureLength" but then I got a whole bunch of warnings...

Surely, I'm missing something obvious about how to set this properly (?)
as the construct (please see above post) is so common.  What's the right
way to obtain it?


Gilles


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Partial measure moment

Michael Welsh Duggan
In reply to this post by Gilles Sadowski
Gilles <[hidden email]> writes:

>>
>> - Partial bars:
>> You probably don't want to use \partial in the middle of a piece. In your
>> example, it tends to destroy the bar numbering. I think it's a better idea to
>> set Timing.measureLength directly.
>>

One thing that might be easier is using \cadenzaOff, which will handle
setting Timing.measurePosition correctly for you.  (See also
\cadenzaOn, which turns off timing.)

--
Michael Welsh Duggan
([hidden email])


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Partial measure moment

Mats Bengtsson-6
Forwarded to bug-lilypond, see below.

The original question was for a standard situation like
\version "2.6.0"
\relative c'' {
  \time 4/4
\repeat volta 2 {
  \partial 4 d4 |
    e8 d e d e d e d |
  }
  \alternative {
    { f2. }
    { f8 e f e f e f g | }
  }
}

which should not require any fiddling at all with the timing. After all,
the
three beats of the first ending should correspond to beat 1,2,3 not 2,3,4
so \partial is clearly wrong. Also, the second ending should begin at the
same beat as the first ending according to elementary music theory, right.

I clearly think it is a bug that the second alternative starts at beat 4
and not
at beat 1 in the above example. Also, I would like to hear an authoritative
explanation from the main LilyPond hackers on how to input this kind of
repeat that is not aligned with a measure. In early LilyPond versions, I
clearly remember that the above type of construch without any extra
\partial or whatever time fiddling worked just fine.

Another "proof" that the above example makes full sense as it is written is
to apply \applymusic #unfold-repeats  on it.

   /Mats

Michael Welsh Duggan wrote:

>Gilles <[hidden email]> writes:
>
>  
>
>>>- Partial bars:
>>>You probably don't want to use \partial in the middle of a piece. In your
>>>example, it tends to destroy the bar numbering. I think it's a better idea to
>>>set Timing.measureLength directly.
>>>
>>>      
>>>
>
>One thing that might be easier is using \cadenzaOff, which will handle
>setting Timing.measurePosition correctly for you.  (See also
>\cadenzaOn, which turns off timing.)
>
>  
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

"\unfoldRepeats" bug? [was: Partial measure moment]

Gilles Sadowski
In reply to this post by Michael Welsh Duggan
Hello.

>
> >>
> >> - Partial bars:
> >> You probably don't want to use \partial in the middle of a piece. In your
> >> example, it tends to destroy the bar numbering. I think it's a better idea to
> >> set Timing.measureLength directly.
> >>
>
> One thing that might be easier is using \cadenzaOff, which will handle
> setting Timing.measurePosition correctly for you.  (See also
> \cadenzaOn, which turns off timing.)
>
The problem comes from "\unfoldRepeats" !
See the attached files for a stripped-down but complete example
of the construct; the desired print output is achieved using
"\cadenzaOn" and "\cadenzaOff", as suggested.

(1)
First, is this in effect the most straightforward way to obtain
the expected result?
What would the equivalent incantation using "Timing.measurePosition"?

(2)
In the 3rd attached file, when "\unfoldRepeats" is put back in,
warnings show up:

$ lilypond all.ly
GNU LilyPond 2.6.3
Processing `all.ly'
Parsing...
Interpreting music... [8][9]
Preprocessing graphical objects...
Calculating line breaks... [3][6][9][10]
Interpreting music...
one.ly:8:17: warning: barcheck failed at: 1
    g4 b8 a g4 f
                 |
two.ly:8:17: warning: barcheck failed at: 1
    g4 b8 a g4 f
                 |
MIDI output to `all.midi'...
Track...
Calculating page breaks...
Layout output to `all.ps'...
Converting to `all.pdf'...



Gilles

_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond

one.ly (357 bytes) Download Attachment
two.ly (357 bytes) Download Attachment
all.ly (243 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: "\unfoldRepeats" bug? [was: Partial measure moment]

Erik Sandberg
On Tuesday 15 November 2005 14.37, Gilles wrote:

> Hello.
>
> > >> - Partial bars:
> > >> You probably don't want to use \partial in the middle of a piece. In
> > >> your example, it tends to destroy the bar numbering. I think it's a
> > >> better idea to set Timing.measureLength directly.
> >
> > One thing that might be easier is using \cadenzaOff, which will handle
> > setting Timing.measurePosition correctly for you.  (See also
> > \cadenzaOn, which turns off timing.)
>
> The problem comes from "\unfoldRepeats" !
> See the attached files for a stripped-down but complete example
> of the construct; the desired print output is achieved using
> "\cadenzaOn" and "\cadenzaOff", as suggested.

(btw, it can be further reduced e.g. by removing two.ly)

> (1)
> First, is this in effect the most straightforward way to obtain
> the expected result?

No, a problem is that \cadenzaOff doesn't mark the end of the bar (there will be four beats before the candenza bar is finished).

> What would the equivalent incantation using "Timing.measurePosition"?

I guess it'd be something like
\set Timing.measurePosition = #(make-moment 1 4)
where you now inserted \cadenzaOn. But I don't know, so please experiment.

> (2)
> In the 3rd attached file, when "\unfoldRepeats" is put back in,
> warnings show up:

That's becaue you don't end the cadenza within the repeat. Repeat unfolding works in principle by copy&paste, so you will have two \cadenzaOn:s followed by two cadenzaOff:s in your example; this may give unexpected results.

--
Erik
_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: Partial measure moment

Han-Wen Nienhuys
In reply to this post by Mats Bengtsson-6
Mats Bengtsson wrote:
> at beat 1 in the above example. Also, I would like to hear an authoritative
> explanation from the main LilyPond hackers on how to input this kind of
> repeat that is not aligned with a measure. In early LilyPond versions, I

There is no clean way at the moment.



--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Partial measure moment

Mats Bengtsson-6
OK! I hope you add it to the list of feature requests (or the list of
sponsorable
features).

   /Mats

Han-Wen Nienhuys wrote:

> Mats Bengtsson wrote:
>
>> at beat 1 in the above example. Also, I would like to hear an
>> authoritative
>> explanation from the main LilyPond hackers on how to input this kind of
>> repeat that is not aligned with a measure. In early LilyPond versions, I
>
>
> There is no clean way at the moment.
>
>
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: "\unfoldRepeats" bug? [was: Partial measure moment]

Gilles Sadowski
In reply to this post by Erik Sandberg
Hi.

> > (1)
> > First, is this in effect the most straightforward way to obtain
> > the expected result?
>
> No, a problem is that \cadenzaOff doesn't mark the end of the bar (there will be four beats before the candenza bar is finished).
>

I don't get what you mean; maybe you could correct the "one.ly" example.
 
> > What would the equivalent incantation using "Timing.measurePosition"?
>
> I guess it'd be something like
> \set Timing.measurePosition = #(make-moment 1 4)
> where you now inserted \cadenzaOn. But I don't know, so please experiment.
>

I don't seem to get it any better with these "moments":  In addition to the
warnings, I get a bar printed at the wrong place :-{

> > (2)
> > In the 3rd attached file, when "\unfoldRepeats" is put back in,
> > warnings show up:
>
> That's becaue you don't end the cadenza within the repeat. Repeat unfolding works in principle by copy&paste, so you will have two \cadenzaOn:s followed by two cadenzaOff:s in your example; this may give unexpected results.
>

Well...  The authoritative (Han-Wen) answer seems to indicate that there is
currently no way to improve the notation and get rid of the warnings.


Thanks,
Gilles


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: "\unfoldRepeats" bug? [was: Partial measure moment]

Mats Bengtsson-6
It seems that the best you can do is something like:

\version "2.6.0"

\score{
% \applymusic #unfold-repeats
\relative c'' {
  \time 4/4
\repeat volta 2 {
  \partial 4 d4 |
    e8 d e d e d e d |
  }
  \alternative {
    { f2. }
    { \set Timing.measurePosition = #(ly:make-moment 0 4) f8 e f e f e f
g | }
  }
}
}

which gets rid of the warning and prints all the automatic beams
correctly.

   /Mats

Gilles wrote:

>Hi.
>
>  
>
>>>(1)
>>>First, is this in effect the most straightforward way to obtain
>>>the expected result?
>>>      
>>>
>>No, a problem is that \cadenzaOff doesn't mark the end of the bar (there will be four beats before the candenza bar is finished).
>>
>>    
>>
>
>I don't get what you mean; maybe you could correct the "one.ly" example.
>
>  
>
>>>What would the equivalent incantation using "Timing.measurePosition"?
>>>      
>>>
>>I guess it'd be something like
>>\set Timing.measurePosition = #(make-moment 1 4)
>>where you now inserted \cadenzaOn. But I don't know, so please experiment.
>>
>>    
>>
>
>I don't seem to get it any better with these "moments":  In addition to the
>warnings, I get a bar printed at the wrong place :-{
>
>  
>
>>>(2)
>>>In the 3rd attached file, when "\unfoldRepeats" is put back in,
>>>warnings show up:
>>>      
>>>
>>That's becaue you don't end the cadenza within the repeat. Repeat unfolding works in principle by copy&paste, so you will have two \cadenzaOn:s followed by two cadenzaOff:s in your example; this may give unexpected results.
>>
>>    
>>
>
>Well...  The authoritative (Han-Wen) answer seems to indicate that there is
>currently no way to improve the notation and get rid of the warnings.
>
>
>Thanks,
>Gilles
>
>
>_______________________________________________
>lilypond-user mailing list
>[hidden email]
>http://lists.gnu.org/mailman/listinfo/lilypond-user
>  
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond