Re: \repeat with upbeat (partial) and alternatives

2009-03-02 Thread Mats Bengtsson

Why not simply include the following setting at the top of your
score
   \set Timing.barCheckSynchronize = ##t
and insert a bar check | at the end of the measure you want to
end prematurely? OK, you will still get a warning printout, but
otherwise it solves all the problems.

  /Mats

Dan Eble wrote:

 E.Weehaeli writes:
  
it is only after a long search that I found an easy way to repeat a part of a 
melody 
- with an upbeat 
- ending before the end of a measure 
- having different durations in the alternatives

- without producing warnings in the log

\version 2.11.49
{ 
 \repeat volta 2 { \partial 8 c'8 | c'2.}

 \alternative {{ f'8 } { \partial 4 f'4 | }}
 d'1 |
 }




I'm sorry to be the bearer of bad tidings, but this trick is not
generally useful. \partial moves the timing counter backwards, which effectively
combines the last measure of the first alternative with the
first measure of the second alternative, forming one longer-than-usual
measure that is split visually by a repeat sign.

From your example, it doesn't seem like a big deal, but change your
f to fis and see what happens.  The sharp sign will be missing from
the second alternative.  Another thing you can do is turn on bar numbers
and add enough measures to the example to make lilypond print one.  You
will see that the first alternative is not counted as a measure.

Try using the following \measure function instead of \partial 4 in
your example.  It should be used in the same place, at the beginning of
the second alternative, otherwise it will cause problems if you ever
unfold the repeat.

% End a measure prematurely.  For example, when an alternate ending
% ends in a partial measure.
measure =
#(define-music-function
   (parser location) ()
   (let ((m (make-music 'ApplyContext)))

 (define (do-it context)
   (let* ((measurePos (ly:context-property context 'measurePosition))
  (measureLen (ly:context-property context 'measureLength)))

 (if (and (ly:moment? ZERO-MOMENT measurePos)
  (ly:moment? measurePos measureLen))
 (ly:context-set-property! context 'measurePosition measureLen

 (set! (ly:music-property m 'procedure) do-it)

 (context-spec-music m 'Timing)))

If there are any scheme gurus in the audience, I don't mind criticism.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
  



--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: mats.bengts...@ee.kth.se
WWW: http://www.s3.kth.se/~mabe
=



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-17 Thread Dan Eble
 E.Weehaeli writes:
 it is only after a long search that I found an easy way to repeat a part of a 
 melody 
 - with an upbeat 
 - ending before the end of a measure 
 - having different durations in the alternatives
 - without producing warnings in the log
 
 \version 2.11.49
 { 
  \repeat volta 2 { \partial 8 c'8 | c'2.}
  \alternative {{ f'8 } { \partial 4 f'4 | }}
  d'1 |
  }
 

I'm sorry to be the bearer of bad tidings, but this trick is not
generally useful. \partial moves the timing counter backwards, which effectively
combines the last measure of the first alternative with the
first measure of the second alternative, forming one longer-than-usual
measure that is split visually by a repeat sign.

From your example, it doesn't seem like a big deal, but change your
f to fis and see what happens.  The sharp sign will be missing from
the second alternative.  Another thing you can do is turn on bar numbers
and add enough measures to the example to make lilypond print one.  You
will see that the first alternative is not counted as a measure.

Try using the following \measure function instead of \partial 4 in
your example.  It should be used in the same place, at the beginning of
the second alternative, otherwise it will cause problems if you ever
unfold the repeat.

% End a measure prematurely.  For example, when an alternate ending
% ends in a partial measure.
measure =
#(define-music-function
   (parser location) ()
   (let ((m (make-music 'ApplyContext)))

 (define (do-it context)
   (let* ((measurePos (ly:context-property context 'measurePosition))
  (measureLen (ly:context-property context 'measureLength)))

 (if (and (ly:moment? ZERO-MOMENT measurePos)
  (ly:moment? measurePos measureLen))
 (ly:context-set-property! context 'measurePosition measureLen

 (set! (ly:music-property m 'procedure) do-it)

 (context-spec-music m 'Timing)))

If there are any scheme gurus in the audience, I don't mind criticism.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-07 Thread James E. Bailey

Am 07.07.2008 um 00:44 schrieb Eluze Weehaeli:




2008/7/1, Neil Puttock [EMAIL PROTECTED]:
I've approved the snippet using the first example

(http://lsr.dsi.unimi.it/LSR/Item?u=1id=490).

This works perfectly.

Using http://lsr.dsi.unimi.it/ you can search - e.g. for upbeat or  
repeat - the snippet repository but you will not find this snippet


Using Browse you can find it after scrolling through several pages...
What's the problem here?

Thanks

Eluze

I've wondered this for a long time. I've stopped using the lsr because  
of it. There are people here, kieren, for example who can find  
anything on the lsr. I can't. I search the lsr by asking here and  
waiting until someone posts a link.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-06 Thread Eluze Weehaeli
2008/7/1, Neil Puttock [EMAIL PROTECTED]:

 I've approved the snippet using the first example
 (http://lsr.dsi.unimi.it/LSR/Item?u=1id=490).

 This works perfectly.

Using http://lsr.dsi.unimi.it/ you can search - e.g. for *upbeat* or *repeat
-* the snippet repository but you will not find this snippet

Using *Browse* you can find it after scrolling through several pages...

What's the problem here?

Thanks

Eluze
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-04 Thread Risto Vääräniemi
2008/7/4 Reinhold Kainhofer:

 Actually, all choir scores that I have do it exactly this way. I have never
 seen any choir score, where the volta does not span whole measures.

I have. I'm writing a song book right now and during the process I've
seen a couple. I'm trying to avoid such things, though. I've attached
a real-world example. Hopefully it gets through, the size is 27 kB.

Do you think it's OK to change a song that way: changing partial
repeats to full repeats and adding alternative endings, which wouldn't
have existed with the partial repeat version?

More common are songs that begin with an upbeat and have two or more
verses. They are often ended with a measure that's not written to the
full length so that the subsequent verses can be started with an
upbeat, too.

-Risto
attachment: halvan.jpg___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-03 Thread Robin Bannister
Reinhold Kainhofer wrote:
 All the choral scores that I have seen put the pickup note before the |: and 
 use whole measures for the voltas (like in the attached example). 
 
 Patrick Horgan wrote:
  What else are you going to do if there's a pickup note 
  and the 2nd ending goes on?  You can write the second ending as an end 
  followed by a partial pickup, but this solution seems more elegant, and why 
  reading voice would certainly be simpler to read.  Choirs are filled with 
  folks whose reading skills are minimal to nonexistant. 

 Exactly, that's why voltas typically span whole measures... 



This is surely not the whole story. 
The repeated music |: to :| is then not congruent with the lyrics. 
In a song with several verses the first verse is ok, 
but subsequent verses get split. 
Their upbeat lyrics are off somewhere on another page. 
But for easy reading, these should be up front, especially if words get split.

___

1. Close your | eyes and I'll ...

  | 2. tend that I'm ...

___

1. Es war schon | dunkel, als ...

| 2. zählten sie ...
___

Cheers,
Robin



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-03 Thread Reinhold Kainhofer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am Donnerstag, 3. Juli 2008 schrieb Robin Bannister:
 This is surely not the whole story.
 The repeated music |: to :| is then not congruent with the lyrics.
 In a song with several verses the first verse is ok,
 but subsequent verses get split.
 Their upbeat lyrics are off somewhere on another page.
 But for easy reading, these should be up front, especially if words get
 split.

Actually, all choir scores that I have do it exactly this way. I have never 
seen any choir score, where the volta does not span whole measures.

Cheers,
Reinhold

- -- 
- --
Reinhold Kainhofer, Vienna University of Technology, Austria
email: [EMAIL PROTECTED], http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung Jung-Wien, http://www.jung-wien.at/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIbW7nTqjEwhXvPN0RAv4aAKDPOFxH2L+/n6yBn/0BXwddYfIj8wCgouo0
4TpFlJWOjpSdFUd0Mz/HPKw=
=WOIf
-END PGP SIGNATURE-


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-02 Thread Valentin Villenave
2008/7/1 Neil Puttock [EMAIL PROTECTED]:

 I think OK is just a more polite way of closing the window than
 clicking on the close window button; it doesn't save anything.

As far as I know, save saves without closing the window, while OK
saves *and* closes the window.

Cheers,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-01 Thread Eluze Weehaeli
Am 28.06.2008, 00:11 Uhr, schrieb Mats Bengtsson  
[EMAIL PROTECTED]:



You may want to submit it to the LSR, though.



I did so with two examples.

but in the preview only one shows up. and when you click on the picture to  
see the code, the full code is there.


on my PC (windows xp) this works perfectly.

any help available?

tia

Eluze



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-01 Thread Neil Puttock
Hi Eluze,

2008/7/1 Eluze Weehaeli [EMAIL PROTECTED]:

 I did so with two examples.

Thanks.

 but in the preview only one shows up. and when you click on the picture to
 see the code, the full code is there.

In your example, there are effectively two separate scores. If you
want them both to show up, you need to tick the Standalone snippet
box, though I'm not sure it's really desirable since you'll get a full
page snippet with a tagline at the bottom.

I've approved the snippet using the first example
(http://lsr.dsi.unimi.it/LSR/Item?u=1id=490).

Regards,
Neil


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-07-01 Thread Neil Puttock
2008/7/1 Eluze Weehaeli [EMAIL PROTECTED]:
 Am 01.07.2008, 21:41 Uhr, schrieb Neil Puttock [EMAIL PROTECTED]:


 In your example, there are effectively two separate scores. If you
 want them both to show up

 that's what I wanted, but I could not put them in one score, since after a
 \break or something like that in the 2nd repeat a starting bar would have
 been shown.

 thanks anyway!

 Eluze

 ps: may I ask: what is the difference between OK and save in the snippet
 creating/modifying process?

I think OK is just a more polite way of closing the window than
clicking on the close window button; it doesn't save anything.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-06-28 Thread Patrick Horgan




Mats Bengtsson wrote:
In my
experience, it's fairly uncommon in printed music to have this kind of
  
different durations in the two alternatives, so I don't think that it's
common enough to deserve a specific example in the manual. You may want
to submit it to the LSR, though.
  

It's not that uncommon. I've seen it in choral music fairly
regularly through the years. What else are you going to do if there's
a pickup note and the 2nd ending goes on? You can write the second
ending as an end followed by a partial pickup, but this solution seems
more elegant, and why reading voice would certainly be simpler to
read. Choirs are filled with folks whose reading skills are minimal to
nonexistant.

Patrick




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-06-28 Thread Reinhold Kainhofer
Am Samstag, 28. Juni 2008 schrieb Patrick Horgan:
  Mats Bengtsson wrote:
 In my experience, it's fairly uncommon in printed music to have this kind
 of different durations in the two alternatives, so I don't think that it's
 common enough to deserve a specific example in the manual. You may want to
 submit it to the LSR, though.

  It's not that uncommon.  I've seen it in choral music fairly regularly
 through the years. 

All the choral scores that I have seen put the pickup note before the |: and 
use whole measures for the voltas (like in the attached example).


 What else are you going to do if there's a pickup note 
 and the 2nd ending goes on?  You can write the second ending as an end
 followed by a partial pickup, but this solution seems more elegant, and why
 reading voice would certainly be simpler to read.  Choirs are filled with
 folks whose reading skills are minimal to nonexistant.

Exactly, that's why voltas typically span whole measures...

Cheers,
Reinhold


-- 
--
Reinhold Kainhofer, Vienna University of Technology, Austria
email: [EMAIL PROTECTED], http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung Jung-Wien, http://www.jung-wien.at/
\version 2.11.50

\score {
  \context Staff 
\context Voice = Soprano \relative c'' { 
  \partial 8 c8 |
  \repeat volta 2 { c4 c c c }
  \alternative { {c4 c r4 r8 c8 } {c4 c r2 }}
  c1 
  % etc.
}
  
}


pickup-volta-choral.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


\repeat with upbeat (partial) and alternatives

2008-06-27 Thread E . Weehaeli
it is only after a long search that I found an easy way to repeat a part of a 
melody 
- with an upbeat 
- ending before the end of a measure 
- having different durations in the alternatives
- without producing warnings in the log

isn't this a third way that should/could be added to the examples in the manual 
[NR 1.4.1.1 Normal repeats: Repeats with upbeats can be entered in two 
ways]
or ... - did I miss something?

\version 2.11.49
{ 
 \repeat volta 2 { \partial 8 c'8 | c'2.}
 \alternative {{ f'8 } { \partial 4 f'4 | }}
 d'1 |
 }



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \repeat with upbeat (partial) and alternatives

2008-06-27 Thread Mats Bengtsson

E. Weehaeli wrote:

it is only after a long search that I found an easy way to repeat a part of a 
melody 
- with an upbeat 
- ending before the end of a measure 
- having different durations in the alternatives

- without producing warnings in the log

isn't this a third way that should/could be added to the examples in the manual 
[NR 1.4.1.1 Normal repeats: Repeats with upbeats can be entered in two 
ways]

or ... - did I miss something?

\version 2.11.49
{ 
\repeat volta 2 { \partial 8 c'8 | c'2.}

\alternative {{ f'8 } { \partial 4 f'4 | }}
d'1 |
}
 


What you propose is similar to one of the solutions proposed in
http://code.google.com/p/lilypond/issues/detail?id=355q=alternative

In my experience, it's fairly uncommon in printed music to have this kind of
different durations in the two alternatives, so I don't think that it's 
common enough to deserve a specific example in the manual. You may want 
to submit it to the LSR, though.


  /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user