Re: \\bookOutputName not working if a \\paper block uses a previously defined variable

2012-03-27 Thread Eluze



Am 26.03.2012 19:23, schrieb James:
Sure, go for it. Could you though de-html-ize it unless you are going 
to do the patch. I'd personally rather work with plain text 
instruction. Thanks James


thanks - added in 
https://code.google.com/p/lilypond/issues/detail?id=2442colspec=ID%20Type%20Status%20Stars%20Owner%20Patch%20Needs%20Summary


Eluze

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


define-event-class breaks file containment

2012-03-27 Thread David Kastrup

commit 552df4791dc0ed890e92c8a37bd2676267ebd90f
Author: Mike Solomon m...@apollinemike.com
Date:   Mon Oct 4 00:19:10 2010 +0100

Add `define-event-class' and scheme spanner regtest


exposes non-local structures and is unsuitable for multiple-file
compilations.

It was introduced as
Issue 1238:[PATCH] Extra check in define-event-class
URL:http://code.google.com/p/lilypond/issues/detail?id=1238

(never mind the misleading issue name) with the review
URL:http://codereview.appspot.com/1867050.

Since it is was written with complete disregard towards bleedover, it
may be related to oscillating regtests.

I would suggest reverting it and reopening the original issue until a
solution has been designed that confines changes to a single parser
incarnation.

-- 
David Kastrup


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


music sheet

2012-03-27 Thread GODWIN
i want to get lilypnond to edit musical sheet



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


Re: Center a number above a measure

2012-03-27 Thread Colin Hall

On Mon, Mar 26, 2012 at 11:08:51PM +, Clément wrote:
 Hello,
 
 I've encountered many limits when trying to put numbers above measures.

Thanks very much for the bug report, Clement.

I've had a look at the problems you reported. See my comments below.

 1) I found no possibility to print number 1 above multi-measure rests.
 This is no crazy idea of mine, Breitkopf does it :
 http://erato.uvt.nl/files/imglnks/usimg/f/ff/IMSLP11706-Mozart-
 Horn_Concerto_No.1_horn_part.pdf

Looking at that horn part I only see the number 1 above single bar rests. So, 
does the following code meet your needs?

Documented here:
http://lilypond.org/doc/v2.14/Documentation/notation/writing-rests#full-measure-rests

{
  \set Staff.instrumentName = \markup \column { \line {With} \line {markup} }
  R1*1^\markup \huge \bold 1 | R1*1^\markup \huge \bold 1 | R1*1^\markup 
\huge \bold 1
}



 2) Printing numbers above measures is limited to multi-measure rests and 
 percent
 repeats.

Yes, I think you are correct.

 I have 3 requests:
 1) The possibility to print number 1 above multi-measure rests (of course, it 
 should begin by default on number 2 (just as now) in the case of multi-staff 
 scores) and the first measure in the case percent repeats.

I think you can just attach markup to the rest, see above.

 2) Extent of count-percent-repeat to other types of repeats such as unfold 
 (useless if the following function is implemented).

The reply from Thomas Morley will lead you to some suitable code which is 
credited to David Nalesnik.

I attach a copy that I have edited up to include something similar to your 
example.

 3) A function which could print numbers or series of numbers above 
 measures, such as:
 I would like to have a function (implemented in Lilypond) which could print a 
 number above a measure, and why not series of numbers, for instance:
 \time 4/4 \numberedMeasure 1 c2 c | \numberedMeasure 5 c2 c | etc.
 or:
 \time 4/4 \startNumberedMeasures c2 c | c c | etc. | c c \stopNumberedMeasures
 or also:
 \time 4/4 \startNumberMeasures \repeat unfold 8 { c2 c } \stopNumberedMeasures

I'll add this as a feature request. The code from David would make a good 
starting point.

Cheers,
Colin.

--

Colin Hall
\version 2.14.2

% Thanks to David Nalesnik

#(set-global-staff-size 20)

#(define (sort-by-X-coord sys grob-lst)
Arranges a list of grobs in ascending order by their X-coordinates
   (let* ((X-coord (lambda (x) (ly:grob-relative-coordinate x sys X)))
  (comparator (lambda (p q) ( (X-coord p) (X-coord q)
  
 (sort grob-lst comparator)))

#(define (find-bounding-grobs bar-line grob-lst)
   (let* ((sys (ly:grob-system bar-line))
  (X-coord (lambda (n) (ly:grob-relative-coordinate n sys X)))
  (bar-line-X (X-coord bar-line)))

  (define (helper lst)
(if (and ( (X-coord (car lst)) bar-line-X)
 ( (X-coord (cadr lst)) bar-line-X))
(cons (car lst) (cadr lst))
(if (null? (cddr lst))
(cons bar-line bar-line)
(helper (cdr lst)

  (helper grob-lst)))

#(define (read-out ls1 ls2 ls3 symbol)
Filters all elements of ls1 from ls2 and appends it to ls3
(set! ls3 (append ls3 (filter (lambda (x) (eq? (car ls1) (symbol x))) ls2)))
  (if (null? (cdr ls1))
  ls3
  (read-out (cdr ls1) ls2 ls3 symbol)))
  
#(define ((center-text-script x-offs) grob)
 (let* ((sys (ly:grob-system grob))
(elements-lst (ly:grob-array-list (ly:grob-object sys 
'all-elements)))
(grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta) 'name)))
(X-extent (lambda (q) (ly:grob-extent q sys X)))
(lst-1 (filter (lambda (x) (eq? 'BarLine (grob-name x))) 
elements-lst))
(add (cdr (ly:grob-property (car lst-1) 'X-extent)))
  ;; Grobs to center between
(args (list 'BarLine 
'TimeSignature
'KeySignature
'KeyCancellation
'Clef))
(grob-lst (read-out args elements-lst '() grob-name)) 
(new-grob-lst (remove (lambda (x) (interval-empty? (X-extent x))) 
grob-lst))
(sorted-grob-lst (sort-by-X-coord sys new-grob-lst))
  ;; Bounds
(bounds (find-bounding-grobs grob sorted-grob-lst))
(left (cdr (X-extent (car bounds
(right (car (X-extent (cdr bounds

(basic-offset
  (- (average left right)
 (* -1 add)
 (interval-center (X-extent grob))
 (* -1 x-offs ;; End of Defs in let*
   ;; Calculation
 (ly:grob-translate-axis! grob basic-offset X)))

centerTextScriptOn = {
\override TextScript #'after-line-breaking = #(center-text-script 0)
}

centerTextScriptOff = {
\revert TextScript #'after-line-breaking
}

onceCenterTextScript =

Re: music sheet

2012-03-27 Thread Colin Hall


On Tue, Mar 27, 2012 at 11:52:17AM +, GODWIN wrote:
 i want to get lilypnond to edit musical sheet

Please say more.

-- 

Colin Hall

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


Re: Center a number above a measure

2012-03-27 Thread Colin Hall
On Tue, Mar 27, 2012 at 11:18:20PM +0100, Colin Hall wrote:
 
 On Mon, Mar 26, 2012 at 11:08:51PM +, Clément wrote:
  Hello,
  
  I've encountered many limits when trying to put numbers above measures.
 
 Thanks very much for the bug report, Clement.
 
 
  3) A function which could print numbers or series of numbers above 
  measures, such as:
  I would like to have a function (implemented in Lilypond) which could print 
  a 
  number above a measure, and why not series of numbers, for instance:
  \time 4/4 \numberedMeasure 1 c2 c | \numberedMeasure 5 c2 c | etc.
  or:
  \time 4/4 \startNumberedMeasures c2 c | c c | etc. | c c 
  \stopNumberedMeasures
  or also:
  \time 4/4 \startNumberMeasures \repeat unfold 8 { c2 c } 
  \stopNumberedMeasures
 
 I'll add this as a feature request. The code from David would make a good 
 starting point.

Here is the issue tracker for your enhancement request:

http://code.google.com/p/lilypond/issues/detail?id=2445

Cheers,
Colin.

-- 

Colin Hall

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


Re: Center a number above a measure

2012-03-27 Thread Xavier Scheuer
On 28/03/2012, Colin Hall colingh...@gmail.com wrote:

 Looking at that horn part I only see the number 1 above single bar rests.
 So, does the following code meet your needs?

 Documented here:
 http://lilypond.org/doc/v2.14/Documentation/notation/writing-rests#full-measure-rests

 {
   \set Staff.instrumentName = \markup \column { \line {With} \line {markup}
 }
   R1*1^\markup \huge \bold 1 | R1*1^\markup \huge \bold 1 | R1*1^\markup
 \huge \bold 1
 }


This is complicated and tricky, IMHO.
Why not use

  \set restNumberThreshold = #0


 I'll add this as a feature request. The code from David would make a good
 starting point.

As I said on the tracker (BTW, with the new lilypond-auto mailing list
should we send our comments as comments on the tracker (which would
be buried on lilypond-auto) or reply as a normal e-mail to
bug-lilypond?), this is an advanced version of issue #146 .
http://code.google.com/p/lilypond/issues/detail?id=146

Cheers,
Xavier

-- 
Xavier Scheuer x.sche...@gmail.com

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