Re: override TupletNumber . Custom text

2012-02-10 Thread jakob lund
Sigh.. This is a bit confusing..

9. feb. 2012 23.45 skrev Pavel Roskin pro...@gnu.org:
 On Thu, 9 Feb 2012 22:53:09 +0100
 jakob lund jakob.be...@gmail.com wrote:

 9. feb. 2012 22.12 skrev Pavel Roskin pro...@gnu.org:

  It's weird indeed.  If Default_bar_line_engraver is placed above
  Timing_translator, then the beats are correct.

 You mean placed below? ... I'll go to sleep Now!

 I mean placed above.  This produces wrong output (3 beats in the first
 measure):

 \score {
  
    \new Staff \with {
      \consists Timing_translator
      \consists Default_bar_line_engraver
    } 
      \new Voice \repeat unfold 8 { d'4 }
    
  
  \layout {}
 }

 But this is OK (4 beats everywhere):

 \score {
  
    \new Staff \with {
      \consists Default_bar_line_engraver
      \consists Timing_translator
    } 
      \new Voice \repeat unfold 8 { d'4 }
    
  
  \layout {}
 }

If you add
  \context { \Score \remove Timing_translator }
to your \layout in both of the above snippets, the reverse situation occurs.
It seems to me that the normal thing would be to remove it; somehow
it seems logical that the barline engraver would use the info
generated by the timing translator to decide where to place barlines,
so the barline engraver should be last.

I'm *guessing* that if not explicitly removed from Score, there will
be TWO Timing_translators going in parallel, creating some sort of
race condition?!

Taking the example from the docs and commenting out \remove
Timing_translator also messes things up.



 Thanks for pointing that out... I made a comment there suggesting a
 text to update the docs, it should be in there :-)

 Yes, it would be more useful to post our insights in the bug tracker if
 we can add something valuable to the discussion.

Right now I'm not sure that I *do* have anything valuable to add, at
least not in terms of writing a concise description of the situation
for putting in the documentation :-/ (though I still think there ought
to be one)


 --
 Regards,
 Pavel Roskin

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


override TupletNumber . Custom text

2012-02-09 Thread Nils
Hello, 

I like to work with full tuplet numbers because it makes it clear which version 
of quintuplet is meant (2:5 or 4:5).

Since I don't like errors, however 'traditional' they may have become, I would 
like to change the 3:2 of a triplet in a more correct 2/3.

How can I get this format into

\override TupletNumber #'text = [...]   %old: #tuplet-number::calc-fraction-text


greetings, 

Nils

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


Re: override TupletNumber . Custom text

2012-02-09 Thread Pavel Roskin
On Thu, 9 Feb 2012 17:15:50 +0100
Nils l...@nilsgey.de wrote:

 Hello, 
 
 I like to work with full tuplet numbers because it makes it clear
 which version of quintuplet is meant (2:5 or 4:5).
 
 Since I don't like errors, however 'traditional' they may have
 become, I would like to change the 3:2 of a triplet in a more
 correct 2/3.
 
 How can I get this format into
 
 \override TupletNumber #'text = [...]   %old:
 #tuplet-number::calc-fraction-text

{
  \override TupletNumber #'text = \markup { 2/3 }
  \times 2/3 { c'4 e' g' }
}

-- 
Regards,
Pavel Roskin

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


Re: override TupletNumber . Custom text

2012-02-09 Thread jakob lund
9. feb. 2012 19.25 skrev Pavel Roskin pro...@gnu.org:
 On Thu, 9 Feb 2012 17:15:50 +0100
 Nils l...@nilsgey.de wrote:

 Hello,

 I like to work with full tuplet numbers because it makes it clear
 which version of quintuplet is meant (2:5 or 4:5).

 Since I don't like errors, however 'traditional' they may have
 become, I would like to change the 3:2 of a triplet in a more
 correct 2/3.

 How can I get this format into

 \override TupletNumber #'text = [...]   %old:
 #tuplet-number::calc-fraction-text

The original function is defined in scm/output-lib.scm, and can be
modified easily:

correctFraction = #(lambda (grob)
  (let ((ev (event-cause grob)))
(format #f ~a/~a
(ly:event-property ev 'numerator)
(ly:event-property ev 'denominator

 {
   \override TupletNumber #'text = \correctFraction
   \times 2/3 { c'4 e' g' }
 }


Jakob

 {
  \override TupletNumber #'text = \markup { 2/3 }
  \times 2/3 { c'4 e' g' }
 }

 --
 Regards,
 Pavel Roskin

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

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


Re: override TupletNumber . Custom text

2012-02-09 Thread Pavel Roskin
On Thu, 9 Feb 2012 19:50:24 +0100
jakob lund jakob.be...@gmail.com wrote:

 9. feb. 2012 19.25 skrev Pavel Roskin pro...@gnu.org:
  On Thu, 9 Feb 2012 17:15:50 +0100
  Nils l...@nilsgey.de wrote:
 
  Hello,
 
  I like to work with full tuplet numbers because it makes it clear
  which version of quintuplet is meant (2:5 or 4:5).
 
  Since I don't like errors, however 'traditional' they may have
  become, I would like to change the 3:2 of a triplet in a more
  correct 2/3.
 
  How can I get this format into
 
  \override TupletNumber #'text = [...]   %old:
  #tuplet-number::calc-fraction-text
 
 The original function is defined in scm/output-lib.scm, and can be
 modified easily:

Once I sent my reply, I realized that the poster was asking for
something more automatic.  So I started with
tuplet-number::calc-fraction-text and
tuplet-number::append-note-wrapper and reduced them to this:

{
  #(define ((tuplet-fraction) grob)
(let ((ev (event-cause grob)))
  (markup
(format #f ~a/~a
  (ly:event-property ev 'numerator)
  (ly:event-property ev 'denominator)
  \override TupletNumber #'text = #(tuplet-fraction)
  \times 2/3 { c'4 e' g' }
}

-- 
Regards,
Pavel Roskin

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


Re: override TupletNumber . Custom text

2012-02-09 Thread Nils
On Thu, 9 Feb 2012 19:50:24 +0100
jakob lund jakob.be...@gmail.com wrote:

 9. feb. 2012 19.25 skrev Pavel Roskin pro...@gnu.org:
  On Thu, 9 Feb 2012 17:15:50 +0100
  Nils l...@nilsgey.de wrote:
 
  Hello,
 
  I like to work with full tuplet numbers because it makes it clear
  which version of quintuplet is meant (2:5 or 4:5).
 
  Since I don't like errors, however 'traditional' they may have
  become, I would like to change the 3:2 of a triplet in a more
  correct 2/3.
 
  How can I get this format into
 
  \override TupletNumber #'text = [...]   %old:
  #tuplet-number::calc-fraction-text
 
 The original function is defined in scm/output-lib.scm, and can be
 modified easily:

Thank you two very much. 
Finally there is no mistunderstanding anymore when seeing something like this: 
http://lily.sytes.net/v2k2ju/1

Nils

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


Re: override TupletNumber . Custom text

2012-02-09 Thread jakob lund
9. feb. 2012 21.13 skrev Nils l...@nilsgey.de:
 On Thu, 9 Feb 2012 19:50:24 +0100
 jakob lund jakob.be...@gmail.com wrote:

 9. feb. 2012 19.25 skrev Pavel Roskin pro...@gnu.org:
  On Thu, 9 Feb 2012 17:15:50 +0100
  Nils l...@nilsgey.de wrote:
 
  Hello,
 
  I like to work with full tuplet numbers because it makes it clear
  which version of quintuplet is meant (2:5 or 4:5).
 
  Since I don't like errors, however 'traditional' they may have
  become, I would like to change the 3:2 of a triplet in a more
  correct 2/3.
 
  How can I get this format into
 
  \override TupletNumber #'text = [...]   %old:
  #tuplet-number::calc-fraction-text

 The original function is defined in scm/output-lib.scm, and can be
 modified easily:

 Thank you two very much.
 Finally there is no mistunderstanding anymore when seeing something like 
 this: http://lily.sytes.net/v2k2ju/1

All very well. However, in that example, the first bar appears to be
only four beats, and the cause seems to be the
Default_bar_line_engraver
Isn't that wierd?

The same happens here:
http://lily.sytes.net/wi55ub/1

Is it some sort of bug or am I too long past my bedtime :-/

That is one neat web app btw!


Jakob


 Nils

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


Re: override TupletNumber . Custom text

2012-02-09 Thread Pavel Roskin
On Thu, 9 Feb 2012 21:45:55 +0100
jakob lund jakob.be...@gmail.com wrote:

 All very well. However, in that example, the first bar appears to be
 only four beats, and the cause seems to be the
 Default_bar_line_engraver

You mean it's three beats?

 Isn't that wierd?

It's weird indeed.  If Default_bar_line_engraver is placed above
Timing_translator, then the beats are correct.

 The same happens here:
 http://lily.sytes.net/wi55ub/1

And here:
http://code.google.com/p/lilypond/issues/detail?id=673

 That is one neat web app btw!

Yes.  But I wish Shift-Del and Shift-Ins worked as expected.

-- 
Regards,
Pavel Roskin

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