Re: Reheaseals with irregular bars

2012-11-05 Thread Wim van Dommelen

Hi Jacques,

Difficult for me to answer, because I don't know the programmer  
internals of LP to give you a correct answer. Also I see in reality  
different kinds of numbering also in scores done by commercial  
publishers. For example the numbering of the bars underneath the first  
repeat alternatives is done in several ways. I don't know if there is  
any agreement on how it should be done. Sometimes engravers continue  
the numbering, sometimes these bars are numbered the same. In your  
example as you change the length of a measure, should one still count  
is a one (1) complete measure, or count it as partial (3/4) or  
whatever. In general one can only code in any program (including LP)  
what you can write down in an algorithm to start with. And such an  
algorithm needs firm rules: if this situation then we do that, etc.


In the past I've seen multiple situations in which LP didn't know the  
right number (as I think it should be) anymore because of changes  
(partial measures, etc.), so then I did set it right manually. After  
all the musical score is my goal.


Maybe someone with internals knowledge on the bar-numbering can look  
at this?


And/Or from a musical theoretical point: what are the rules for this?

One remark on your code: You mention you use the measureLength in LP  
2.17. That trick is already available in earlier versions, but then  
your code states 2.15.11. Be carefull mixing things you would think  
(assume) would work from one version into another. Here it works  
because it was already available, but in other situations you might  
have some surprises.


Regards,
Wim.


On 5 Nov 2012, at 07:20 , Jacques Menu wrote:


Hello Wim,

Going further on my work, I bumped into irregular alternatives too.  
I spent much time struggling with bars 8 and 17, even knowing there  
was a bug to be circumvented.


The solution was to set Timing.measureLength explicitly in the  
alternatives, which I found in the doc of LP 2.17.

I can't imagine, though, that nobody ran into this before me.

My question is thus : can't LP keep track of what's going on in the  
alternatives and figure out what the partial bars lengths are?


The example is attached.

Thanks for your help and time!

Le 29 oct. 2012 à 10:54, Wim van Dommelen m...@wimvd.nl a écrit :


Hi Jacques,

There is a LP problem in the bar numbers in this case (which I  
really should register as a bug, it increases the measure numbers  
twice for some reason).


JMRehearsals.ly


Regards,

--

Jacques Menu
Ch. de la Pierre 12
1023 Crissier

mailto:jacques.m...@tvtmail.ch






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


Re: Reheaseals with irregular bars

2012-11-04 Thread Jacques Menu
Hello Wim,Going further on my work, I bumped into irregular alternatives too. I spent much time struggling with bars 8 and 17, even knowing there was a bug to be circumvented.The solution was to set Timing.measureLength explicitly in the alternatives, which I found in the doc of LP 2.17.I can't imagine, though, that nobody ran into this before me.My question is thus : can't LP keep track of what's going on in the alternatives and figure out what the partial bars lengths are?The example is attached.Thanks for your help and time!Le 29 oct. 2012 à 10:54, Wim van Dommelen m...@wimvd.nl a écrit :Hi Jacques,There is a LP problem in the bar numbers in this case (which I really should register as a bug, it increases the measure numbers twice for some reason).

JMRehearsals.ly
Description: Binary data
Regards,--Jacques MenuCh. de la Pierre 121023 Crissiermailto:jacques.m...@tvtmail.ch

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


Re: Reheaseals with irregular bars

2012-10-29 Thread Wim van Dommelen

Hi Jacques,

I'm not going to answer all your questions, that is just too much. One  
advise: cut things in pieces and look for smaller problems. There is a  
LP problem in the bar numbers in this case (which I really should  
register as a bug, it increases the measure numbers twice for some  
reason). And indeed \partial is NOT usable inside a part, because it  
was really only intended for the beginning to set your barchecks on  
the right point. But you also don't need it.


For example some of your problems around bar 64 can be done like this,  
no errors in my compile (using LP 2.16.0 on OS X):



\version 2.16.0

\relative c {
% some easy debugging settings:
\set Score.barNumberVisibility = #all-bar-numbers-visible
\override Score.BarNumber #'break-visibility = #'#(#t #t #t)

\clef bass
\key bes \major
\time 6/8

% because LP will omit this at the beginning of a score,
% but would show if this was done in the middle:
\bar |:
\repeat volta 2 {
% bar number of the partial measure:
%   \set Score.currentBarNumber = #63
\partial 8 d8\p |
% bar number of the next full measure:
\set Score.currentBarNumber = #64
bes'8( a) bes-. d4. |
d8( c) d-. ees4. ~  |
ees8( d) c ~ c bes4 |
bes4. a8 r d,\f |
bes'( a) bes-. c4. |
d8( c) d-. ees4. ~ |
ees8( d) c ~ c( bes) a-. |

% here you just OMIT the barcheck!
g r r r4
}
\repeat volta 2 {
% bar number of the partial measure:
%   \set Score.currentBarNumber = #71
% because it is HERE!
d'8\p |
% bar number of the next full measure:
\set Score.currentBarNumber = #72
f8( es) d-. d( c) b?-. |
c16-.\f c,-. d-. ees-. f-.( g-. a-. b?-. c d es8) |
es(\p b) c-. c( bes?) a-. |
bes bes c d4 d,8\f |
bes'( a) bes-. c4. |
d8( c) d-. es4.\fermata\p |
d8-. d( c) bes-. bes( a) |
% and again:
g4. r4
}
\key g \major
\time 2/4
\break
\repeat volta 2 {
% here is the check:
s4
r8 |
bes8-.\f r d-. r |
g-. r g-. r |
g f? e g |
fis? e d16 r r8 |
}
}


Notes:
- Look carefully which barnumer is displayed where before drawing  
conclusions. I did set both the partial bars and the whole bars, you  
can leave out some of the lines, see for yourself;
- Note the placement of the barchecks, I omit them after for example  
bar 72 before the volta ends, because the bar is not full yet, I place  
it after the eight note in the second volta;
- I substituted bes8 (a) for bes8( a). Although the second syntax  
also works, I see the ( symbol attached to notes, because the slurs  
start on these notes;
- I also substituted ^. for -., I let LP find out where to put the  
dot. Only when it goes wrong (which i.m.h.o. is never) I state it  
explicitly.


The spacing of the s4 (in the 2/4 section) is ugly, but I just placed  
a \break so you see you can determine the line-break yourself. With  
more note it will smooth out more. Otherwise throw out the \break line.


Regards,
Wim.


On 28 Oct 2012, at 21:35 , Jacques Menu wrote:


Hello folks,

I've been using Lilypond for some time, but Beethoven's Trio X für  
Klavier, Flöte und Fagott causes me much trouble : \partial is not  
usable inside a part, and Thema andante con variazioni contains  
tricky rehearsals, like:


TrickyRehearsalsWithIncompleteBars.tiff

After fighting a lot with the problem, I found:

partialInline = #(define-music-function
(parser location nom den mus)
(integer? integer? ly:music?)
#{
\set Score.measurePosition = #(ly:make-moment (- $nom) $den)
$mus
#}
)

on the Internet.

This helped me obtain the above result, but doesn't solve all issues.

In the remainder of the piece, I never figured out how to obtain the  
transition from variation IV to variation V:


TransitionFromVar4ToVar5.tiff

I always run into messages such as the following (hence my bar  
numbers are wrong) :


	Beethoven_WoO37_Fagott_ThemaAndanteConVariazioni.ly:493:16:  
warning: Barcheck failed got 79 expect 81


because I don't know how to specify the correct size for the  
partial bars involved (by the way, bar number 64 is already wrong):



ScoreFragment.tiff



Here is the code I use:


\tempoMark #3.0 #Var. IV

%  
-

\repeat volta 2
%  
-

{

\partialInline #1 #8
d'8\p |

\myDisplayBarNum\barNumberCheck #65

bes'8 (a) bes^. d4. |
d8 (c) d^. ees4. ~  |
ees8 (d) c ~ c bes4 |
bes4. a8 r8 d,8\f |
bes'8 (a) bes^. c4. |
d8 (c) d^. ees4. ~ |


%  

Re: Reheaseals with irregular bars

2012-10-29 Thread Jacques Menu TvTMail
Hello Wim,

Thanks for this fast and detailed answer, it is much appreciated!

I'll put your suggestions in practise.
As for the current numbering error, I can circumvent it temporarily by forcing 
the expected numbers explicitly.

A nice day!

Regards,

PS Is there some site where I could contribute the results of my Lilypondings, 
such as the flute and bassoon parts of this Beethoven trio?

Le 29 oct. 2012 à 10:54:14, Wim van Dommelen m...@wimvd.nl a écrit :

 Hi Jacques,
 
 I'm not going to answer all your questions, that is just too much. One 
 advise: cut things in pieces and look for smaller problems. There is a LP 
 problem in the bar numbers in this case (which I really should register as a 
 bug, it increases the measure numbers twice for some reason). And indeed 
 \partial is NOT usable inside a part, because it was really only intended for 
 the beginning to set your barchecks on the right point. But you also don't 
 need it.
 
 For example some of your problems around bar 64 can be done like this, no 
 errors in my compile (using LP 2.16.0 on OS X):
 
 
 \version 2.16.0
 
 \relative c {
   % some easy debugging settings:
   \set Score.barNumberVisibility = #all-bar-numbers-visible
   \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
 
   \clef bass
   \key bes \major
   \time 6/8
 
 % because LP will omit this at the beginning of a score,
 % but would show if this was done in the middle:
 \bar |:
 \repeat volta 2 {
   % bar number of the partial measure:
 % \set Score.currentBarNumber = #63
   \partial 8 d8\p |
   % bar number of the next full measure:
   \set Score.currentBarNumber = #64
   bes'8( a) bes-. d4. |
   d8( c) d-. ees4. ~  |
   ees8( d) c ~ c bes4 |
   bes4. a8 r d,\f |
   bes'( a) bes-. c4. |
   d8( c) d-. ees4. ~ |
   ees8( d) c ~ c( bes) a-. |
 
 % here you just OMIT the barcheck!
   g r r r4
 }
 \repeat volta 2 {
   % bar number of the partial measure:
 % \set Score.currentBarNumber = #71
 % because it is HERE!
   d'8\p |
   % bar number of the next full measure:
   \set Score.currentBarNumber = #72
   f8( es) d-. d( c) b?-. |
   c16-.\f c,-. d-. ees-. f-.( g-. a-. b?-. c d es8) |
   es(\p b) c-. c( bes?) a-. |
   bes bes c d4 d,8\f |
   bes'( a) bes-. c4. |
   d8( c) d-. es4.\fermata\p |
   d8-. d( c) bes-. bes( a) |
 % and again:
   g4. r4
 }
 \key g \major
 \time 2/4
 \break
 \repeat volta 2 {
 % here is the check:
   s4
   r8 |
   bes8-.\f r d-. r |
   g-. r g-. r |
   g f? e g |
   fis? e d16 r r8 |
 }
 }
 
 
 Notes:
 - Look carefully which barnumer is displayed where before drawing 
 conclusions. I did set both the partial bars and the whole bars, you can 
 leave out some of the lines, see for yourself;
 - Note the placement of the barchecks, I omit them after for example bar 72 
 before the volta ends, because the bar is not full yet, I place it after the 
 eight note in the second volta;
 - I substituted bes8 (a) for bes8( a). Although the second syntax also 
 works, I see the ( symbol attached to notes, because the slurs start on 
 these notes;
 - I also substituted ^. for -., I let LP find out where to put the dot. 
 Only when it goes wrong (which i.m.h.o. is never) I state it explicitly.
 
 The spacing of the s4 (in the 2/4 section) is ugly, but I just placed a 
 \break so you see you can determine the line-break yourself. With more note 
 it will smooth out more. Otherwise throw out the \break line.
 
 Regards,
 Wim.
 
 
 On 28 Oct 2012, at 21:35 , Jacques Menu wrote:
 
 Hello folks,
 
 I've been using Lilypond for some time, but Beethoven's Trio X für Klavier, 
 Flöte und Fagott causes me much trouble : \partial is not usable inside a 
 part, and Thema andante con variazioni contains tricky rehearsals, like:
 
 TrickyRehearsalsWithIncompleteBars.tiff
 
 After fighting a lot with the problem, I found:
 
 partialInline = #(define-music-function 
  (parser location nom den mus) 
  (integer? integer? ly:music?) 
  #{ 
  \set Score.measurePosition = #(ly:make-moment (- $nom) $den) 
  $mus 
  #} 
  )
 
 on the Internet.
 
 This helped me obtain the above result, but doesn't solve all issues. 
 
 In the remainder of the piece, I never figured out how to obtain the 
 transition from variation IV to variation V:
 
 TransitionFromVar4ToVar5.tiff
 
 I always run into messages such as the following (hence my bar numbers are 
 wrong) :
 
  Beethoven_WoO37_Fagott_ThemaAndanteConVariazioni.ly:493:16: warning: 
 Barcheck failed got 79 expect 81 
 
 because I don't know how to specify the correct size for the partial bars 
 involved (by the way, bar number 64 is already wrong):
 
 
 ScoreFragment.tiff
 
 
 
 Here is the code I use:
 
 
 \tempoMark #3.0 #Var. IV
 
 % 

Re: Reheaseals with irregular bars

2012-10-29 Thread Reinhold Kainhofer

On 2012-10-28 21:35, Jacques Menu wrote:

Hello folks,

I've been using Lilypond for some time, but Beethoven's Trio X für
Klavier, Flöte und Fagott causes me much trouble : \partial is not
usable inside a part, and Thema andante con variazioni contains tricky
rehearsals, like:



After fighting a lot with the problem, I found:

partialInline = #(define-music-function
(parser location nom den mus)
(integer? integer? ly:music?)
#{
\set Score.measurePosition = #(ly:make-moment (- $nom) $den)


You don't want (- $nom) here, since that might skip one measure!
In your case you want to set the measure position at the begin of the 
second volta to #(ly:make-moment 0 8), if you want the second volta to 
have the same bar number as the first.


If you want the second volta to have the barnumber of the first volta + 
1, then I would try to set the measure position at the end of the first 
volta to #(ly:make-moment 4 8). I haven't tried it out, but I think that 
should work.




I always run into messages such as the following (hence my bar numbers
are wrong) :

Beethoven_WoO37_Fagott_ThemaAndanteConVariazioni.ly:493:16: warning:
Barcheck failed got 79 expect 81

because I don't know how to specify the correct size for the partial
bars involved (by the way, bar number 64 is already wrong):


I suppose bar 25 is already wrong, right?




Here is the code I use:

[...]

\tempoMark #3.0 #Var. V

% -
\repeat volta 2
% -
{

\partialInline #1 #8


Here you don't want to set the measure position to #(ly:make-moment (- 
1) 8) of measure 79, since you are already in measure 79. If you set it 
to -1/8, like you do, then this means after the next eighth note measure 
79 will start...


You rather want to set the measure position to 3/8 of bar 79, which 
means that after the eight rest measure 80 will start...



The only reason why \partial sets the measure position to -1/8 is that 
the first full bar is supposed to be measure 1.
In all other cases (i.e. inside some piece), you don't ever want to set 
the measure position to a negative value, as that will skip a measure in 
the measure count.


Cheers,
Reinhold

--
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://www.kainhofer.com
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com

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


Re: Reheaseals with irregular bars

2012-10-29 Thread David Kastrup
Reinhold Kainhofer reinh...@fam.tuwien.ac.at writes:

 On 2012-10-28 21:35, Jacques Menu wrote:
 Hello folks,

 I've been using Lilypond for some time, but Beethoven's Trio X für
 Klavier, Flöte und Fagott causes me much trouble : \partial is not
 usable inside a part, and Thema andante con variazioni contains tricky
 rehearsals, like:



 After fighting a lot with the problem, I found:

 partialInline = #(define-music-function
 (parser location nom den mus)
 (integer? integer? ly:music?)
 #{
 \set Score.measurePosition = #(ly:make-moment (- $nom) $den)

 You don't want (- $nom) here, since that might skip one measure!
 In your case you want to set the measure position at the begin of the
 second volta to #(ly:make-moment 0 8), if you want the second volta to
 have the same bar number as the first.

This is 2.14 stuff, right?  With 2.16, you could write

partialInline = #(define-music-function
(parser location frac mus)
(fraction? ly:music?)
#{
\set Score.measurePosition = #(ly:make-moment (- (car fraction)) (cdr
  fraction)) ,,,

and use it as

\partialInline 3/4 ...

Or you use a duration argument like \partial itself does.  That is
likely more flexible.

That does not address any of the problems you are dealing with, it is
just something convenient on the side.

-- 
David Kastrup


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


Re: Reheaseals with irregular bars

2012-10-29 Thread Wim van Dommelen

Hi Jacques,

There is the Mutopia project, but I'm unsure about the current status.  
I've seen no activity on the mailing list for a long time. And for my  
last project, which I registered on Mutopia, I even didn't get a  
confirmation at all. So I also never submitted the result :-(


Does anyone here have more info?

Regards,
Wim.

On 29 Oct 2012, at 11:53 , Jacques Menu TvTMail wrote:


Hello Wim,

Thanks for this fast and detailed answer, it is much appreciated!

I'll put your suggestions in practise.
As for the current numbering error, I can circumvent it temporarily  
by forcing the expected numbers explicitly.


A nice day!

Regards,

PS Is there some site where I could contribute the results of my  
Lilypondings, such as the flute and bassoon parts of this Beethoven  
trio?


Le 29 oct. 2012 à 10:54:14, Wim van Dommelen m...@wimvd.nl a écrit :


Hi Jacques,

I'm not going to answer all your questions, that is just too much.  
One advise: cut things in pieces and look for smaller problems.  
There is a LP problem in the bar numbers in this case (which I  
really should register as a bug, it increases the measure numbers  
twice for some reason). And indeed \partial is NOT usable inside a  
part, because it was really only intended for the beginning to set  
your barchecks on the right point. But you also don't need it.


For example some of your problems around bar 64 can be done like  
this, no errors in my compile (using LP 2.16.0 on OS X):



\version 2.16.0

\relative c {
% some easy debugging settings:
\set Score.barNumberVisibility = #all-bar-numbers-visible
\override Score.BarNumber #'break-visibility = #'#(#t #t #t)

\clef bass
\key bes \major
\time 6/8

% because LP will omit this at the beginning of a score,
% but would show if this was done in the middle:
\bar |:
\repeat volta 2 {
% bar number of the partial measure:
%   \set Score.currentBarNumber = #63
\partial 8 d8\p |
% bar number of the next full measure:
\set Score.currentBarNumber = #64
bes'8( a) bes-. d4. |
d8( c) d-. ees4. ~  |
ees8( d) c ~ c bes4 |
bes4. a8 r d,\f |
bes'( a) bes-. c4. |
d8( c) d-. ees4. ~ |
ees8( d) c ~ c( bes) a-. |

% here you just OMIT the barcheck!
g r r r4
}
\repeat volta 2 {
% bar number of the partial measure:
%   \set Score.currentBarNumber = #71
% because it is HERE!
d'8\p |
% bar number of the next full measure:
\set Score.currentBarNumber = #72
f8( es) d-. d( c) b?-. |
c16-.\f c,-. d-. ees-. f-.( g-. a-. b?-. c d es8) |
es(\p b) c-. c( bes?) a-. |
bes bes c d4 d,8\f |
bes'( a) bes-. c4. |
d8( c) d-. es4.\fermata\p |
d8-. d( c) bes-. bes( a) |
% and again:
g4. r4
}
\key g \major
\time 2/4
\break
\repeat volta 2 {
% here is the check:
s4
r8 |
bes8-.\f r d-. r |
g-. r g-. r |
g f? e g |
fis? e d16 r r8 |
}
}


Notes:
- Look carefully which barnumer is displayed where before drawing  
conclusions. I did set both the partial bars and the whole bars,  
you can leave out some of the lines, see for yourself;
- Note the placement of the barchecks, I omit them after for  
example bar 72 before the volta ends, because the bar is not full  
yet, I place it after the eight note in the second volta;
- I substituted bes8 (a) for bes8( a). Although the second  
syntax also works, I see the ( symbol attached to notes, because  
the slurs start on these notes;
- I also substituted ^. for -., I let LP find out where to put  
the dot. Only when it goes wrong (which i.m.h.o. is never) I state  
it explicitly.


The spacing of the s4 (in the 2/4 section) is ugly, but I just  
placed a \break so you see you can determine the line-break  
yourself. With more note it will smooth out more. Otherwise throw  
out the \break line.


Regards,
Wim.


On 28 Oct 2012, at 21:35 , Jacques Menu wrote:


Hello folks,

I've been using Lilypond for some time, but Beethoven's Trio X für  
Klavier, Flöte und Fagott causes me much trouble : \partial is  
not usable inside a part, and Thema andante con variazioni  
contains tricky rehearsals, like:


TrickyRehearsalsWithIncompleteBars.tiff

After fighting a lot with the problem, I found:

partialInline = #(define-music-function
(parser location nom den mus)
(integer? integer? ly:music?)
#{
\set Score.measurePosition = #(ly:make-moment (- $nom) $den)
$mus
#}
)

on the Internet.

This helped me obtain the above result, but doesn't solve all  
issues.


In the remainder of the piece, I never figured out how to obtain  
the transition from variation IV to variation V:


TransitionFromVar4ToVar5.tiff

I always run into messages such as 

Re: Reheaseals with irregular bars

2012-10-29 Thread Rutger Hofman

On 10/29/2012 01:29 PM, Wim van Dommelen wrote:

Hi Jacques,

There is the Mutopia project, but I'm unsure about the current status.
I've seen no activity on the mailing list for a long time. And for my
last project, which I registered on Mutopia, I even didn't get a
confirmation at all. So I also never submitted the result :-(

Does anyone here have more info?

Regards,
Wim.

On 29 Oct 2012, at 11:53 , Jacques Menu TvTMail wrote:


Hello Wim,


[snip]


PS Is there some site where I could contribute the results of my
Lilypondings, such as the flute and bassoon parts of this Beethoven trio?


And certainly you can publish on http://www.imslp.org, the Petrucci library.
Besides the pdfs for parts/score, their policy is to allow one entry (a 
zip file) for the 'engraving files', so you can also publish your 
lilypond source there if you so desire.


Rutger



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