Provide Scheme sandbox. (issue 5453045)

2011-12-07 Thread k-ohara5a5a

Very nice.
If you make it this easy, I might learn Scheme...
nah.


http://codereview.appspot.com/5453045/diff/1/Documentation/extending/scheme-tutorial.itely
File Documentation/extending/scheme-tutorial.itely (right):

http://codereview.appspot.com/5453045/diff/1/Documentation/extending/scheme-tutorial.itely#newcode76
Documentation/extending/scheme-tutorial.itely:76: available calling
available with this command-line
@example
lilypond scheme-sandbox.ly
@end example

http://codereview.appspot.com/5453045/

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


Re: Adds padding between Hairpins and SpanBars. (issue 5438060)

2011-12-07 Thread k-ohara5a5a

Mike,
 The old code was making a distinction between hairpins that end at the
end of a line and those that continue on the next line.
 Sadly, the meaning of the boolean 'broken[]' stores at first whether
the bound on either end of a hair pin is at a line break, and then
broken[RIGHT] is changed so that it stores whether the hairpin itself
was broken into pieces on the right hand side.
 Does your code preserve this distinction?


http://codereview.appspot.com/5438060/diff/2027/lily/hairpin.cc
File lily/hairpin.cc (right):

http://codereview.appspot.com/5438060/diff/2027/lily/hairpin.cc#newcode138
lily/hairpin.cc:138: if (broken[RIGHT])
The former code determining which hairpins were broken on the right, in
the sense of broken in the middle of the hairpin {c2\< c \break c c\f},
is still around, and it is difficult to tell whether it still does
anything.

http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.scm
File scm/define-grob-properties.scm (right):

http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.scm#newcode1049
scm/define-grob-properties.scm:1049: be drawn above and below the staff.
 If no span bar is in a position,
be drawn below and above the staff, respectively.

http://codereview.appspot.com/5438060/

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


Re: center NoteColumn

2011-12-07 Thread Thomas Morley
Hi David,

2011/12/7 David Nalesnik 

> Hi Harm,
> (...)
> It would be nice to "tap into" the mechanism for centering full-measure
> rests to use in your function, but I don't have any idea how this could be
> done.
>

that would be very nice, but I can't even find, where it is defined.

"Using stem-dir as a multiplier" is the sort of thing I should have seen on
my own. Seems I was a little blockhead.

To get the possibility to adjust the NoteColumn in the rare cases, when
there is a difference between a MultiMeasureRest and a centered NoteColumn,
I added x-offs to the definition and made onceCenterNoteColumn a function
with this argument.

Trying to compile the file with "2.15.20" gives a worse output. I'll start
a new thread to clearify this.


> Sorry I can't be more helpful...
>
>
Your help is always great


Thanks a lot!
  Harm
\version "2.14.2"

% Thanks to David Nalesnik
 
#(set-global-staff-size 20)

#(define (helper ls1 ls2 ls3)
 "Constructs an alist with the elements of ls1 and ls2"
 (set! ls3 (assq-set! ls3 (car ls1) (car ls2)))
 	(if (null? (cdr ls1))
 	  ls3
 	  (helper (cdr ls1) (cdr ls2) ls3)))
 	  
#(define (helper-2 lst number)
  "Search the first element of the sorted lst, which is greater than number"
  (let ((ls (sort lst <)))
  (if (> (car ls) number)
  (car ls)
  (if (null? (cdr ls))
  (begin 
(display "no member of the list is greater than the number")
(newline))
  (helper-2 (cdr ls) number)

#(use-modules (srfi srfi-1))

#(define (delete-adjacent-duplicates lst)
  "Deletes adjacent duplicates in lst
  eg. '(1 1 2 2) -> '(1 2)"
(fold-right (lambda (elem ret)
  (if (equal? elem (first ret))
  ret
  (cons elem ret)))
(list (last lst))
lst))

#(define (position-in-list obj ls)
  "Search the position of obj in ls"
	(define (position-in-list-helper obj ls bypassed)
	  (if (null? ls)
	  #f
	  (if (equal? obj (car ls))
	  bypassed
	  (position-in-list-helper obj (cdr ls) (+ bypassed 1))
	  )))
	
  (position-in-list-helper obj ls 0))
   
#(define ((center-note-column x-offs) grob)

 (let* ((sys (ly:grob-system grob))
(array (ly:grob-object sys 'all-elements))
(grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta) 'name)))
(note-heads (ly:grob-object grob 'note-heads))
(X-extent (lambda (q) (ly:grob-extent q sys X)))
  ;; NoteHeads
(note-heads-grobs (if (not (null? note-heads))
		 (ly:grob-array->list note-heads)
		 '()))
(one-note-head (if (not (null? note-heads-grobs))
		(car note-heads-grobs)
		'()))
(one-note-head-length (if (not (null? one-note-head)) 
	 	 (interval-length (ly:grob-extent one-note-head sys X))
	 	 0))
  ;; Stem 	 	 
(stem (ly:grob-object grob 'stem))
(stem-dir (ly:grob-property stem 'direction))
(stem-length-x (interval-length (ly:grob-extent stem sys X)))
  ;; DotColumn 	 
(dot-column (ly:note-column-dot-column grob))
  ;; AccidentalPlacement
(accidental-placement (ly:note-column-accidentals grob)) 
  ;; Arpeggio
(arpeggio (ly:grob-object grob 'arpeggio))
  ;; Rest
(rest (ly:grob-object grob 'rest))
  ;; NoteColumn
(note-column-coord (ly:grob-relative-coordinate grob sys X))
(grob-ext (ly:grob-extent grob sys X))
(grob-length (interval-length grob-ext))
  ;; BarLine
(lst-1 (filter (lambda (x) (eq? 'BarLine (grob-name x)))
(ly:grob-array->list array)))
(bar-coords (map (lambda (x) (ly:grob-relative-coordinate x sys X)) lst-1))
(bar-alist (helper bar-coords lst-1 '()))
  ;; KeySignature
(lst-2a (filter (lambda (x) (eq? 'KeySignature (grob-name x)))
(ly:grob-array->list array)))
(lst-2 (remove (lambda (x) (interval-empty? (X-extent x))) lst-2a))
(key-sig-coords (map (lambda (x) (ly:grob-relative-coordinate x sys X)) lst-2))
(key-sig-alist (if (not (null? lst-2)) 
	   (helper key-sig-coords lst-2 '())
	   '()))
  ;; KeyCancellation
(lst-3 (filter (lambda (x) (eq? 'KeyCancellation  (grob-name x)))
(ly:grob-array->list array)))
(key-canc-coords (map (lambda (x) (ly:grob-relative-coordinate x sys X)) lst-3))
(key-canc-alist (if (not (null? lst-3)) 
	  	(helper key-canc-coords lst-3 '())
	  	'()))
  ;; TimeSignature
(lst-4 (filter (lambda (x) (eq? 'TimeSignature 

Re: Set global staff size as command line option

2011-12-07 Thread Francisco Vila
2011/12/7 Francisco Vila :
>  lilypond -e '(define-public size 40)' a.ly

And of course there were more typos. It is not a.ly but example.ly in
my example above.

Sorry!

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com

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


Re: Set global staff size as command line option

2011-12-07 Thread Francisco Vila
2011/12/7 Francisco Vila :
> It is a way but the problem I find is that the file won't compile with
> that commandline option.

Oh sorry, I meant the file won't compile _without_ that commandline option.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com

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


Re: Set global staff size as command line option

2011-12-07 Thread Francisco Vila
2011/12/7 Xavier Scheuer :
> Hi,
>
> Is it possible to set global staff size as command line option?
> Like it is possible to specify paper size with
>
>  lilypond -dpaper-size=\"letter\"  myfile.ly
>
> I'd like a similar command line option for #(set-global-staff-size 14) .
> Is there a way to achieve this with current version?


It is a way but the problem I find is that the file won't compile with
that commandline option.

Say your file is

% this is example.ly
#(use-modules (guile-user))
#(set-global-staff-size size)
\repeat unfold 20 { c'1 }

%END

you can call it with

  lilypond -e '(define-public size 40)' a.ly

and the value of size will be honoured as global staff size.
-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com

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


Re: GOP-PROP 13: patch management tools

2011-12-07 Thread olafBuddenhagen
Hi,

On Thu, Dec 01, 2011 at 01:55:15AM +0100, Reinhold Kainhofer wrote:

> KDE uses reviewboard... Until a few years ago, patch reviews were only
> done for patches by newcomers, and that went over the mailing lists.
> But now more and more features are reviewed on reviewboard.

Well, it doesn't seem to do much good though... While I can't judge this
for myself, I have heard from quite a lot of people recently that the
quality of KDE has detoriated to a point where it's no longer really
usable at all :-(

-antrik-

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


Re: Trashy Novels

2011-12-07 Thread olafBuddenhagen
Hi,

On Thu, Dec 01, 2011 at 01:29:30AM +0100, David Kastrup wrote:
>  writes:

> > [...] "Jane Eyre" is firmly planted as one of the two most famous
> > English novels :-)
> 
> Huh?  Obviously "Wuthering Heights" would be one of those you'd
> consider more famous (runs in the family), but I don't think "Jane
> Eyre" can hold a candle regarding famosity to a number of novels, like
> "Vanity Fair", "Oliver Twist", "The Picture of Dorian Grey", "Pride
> and Prejudice" and so forth and so on.  Even "Frankenstein" would
> likely ring a bell with more people than "Jane Eyre".

Well, Pride and Prejudice is obviously the other one among the two
most famous :-)

As for the others, they are of course all very popular; but actual polls
among British readers at least (I could try to digg up the links if you
are *really* interested) consistently show these two at the top.

For another measure, just check the sheer number of screen adaptations
-- you won't find anything close to Jane Eyre I'd wager :-)

(Pride and Prejudice has somewhat fewer, but more successful ones; so
all in all they come out about even I'd say...)

-antrik-

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


Set global staff size as command line option

2011-12-07 Thread Xavier Scheuer
Hi,

Is it possible to set global staff size as command line option?
Like it is possible to specify paper size with

  lilypond -dpaper-size=\"letter\"  myfile.ly

I'd like a similar command line option for #(set-global-staff-size 14) .
Is there a way to achieve this with current version?

Anyway, I think that would be a nice new feature.
Dear bug squad, could you add this request on the tracker ?
Thanks!

Cheers,
Xavier

-- 
Xavier Scheuer 

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


Doc: NR improve 1.6.3 examples (issue 5448129)

2011-12-07 Thread dak


http://codereview.appspot.com/5448129/diff/1/Documentation/notation/staff.itely
File Documentation/notation/staff.itely (right):

http://codereview.appspot.com/5448129/diff/1/Documentation/notation/staff.itely#newcode869
Documentation/notation/staff.itely:869: }
As explained previously, _this_ _will_ _not_ _work_.  You need to
enclose the music following \with { ... } in braces or only the very
first term will belong to the new Staff.

http://codereview.appspot.com/5448129/diff/1/Documentation/notation/staff.itely#newcode886
Documentation/notation/staff.itely:886: }
Again, the following music needs to be enclosed in braces so that it is
actually part of the Staff.  Later examples are changed appropriately,
so this is likely just an oversight.

http://codereview.appspot.com/5448129/

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


Re: Initial reduction of make doc op - Issue 2075 (issue 5453046)

2011-12-07 Thread graham

Great start!  There's a problem but I think I found out why.

1) (not the problem)  could you print a blank line before+after the
"Please see" block?  That would help it to "stand out" more.

2) (problem)  I added a mistake to something in tutorial.itely, and then
got this:

Child returned 1
Error ignored by lilylib
Error trapped by lilypond-book
Please see
/main/src/lilypond/build/out/lybook-db/snippet-names--8702389846796748212.log
make[2]: *** [out-www/learning.texi] Error 1
make[2]: Leaving directory `/main/src/lilypond/build/Documentation'
make[1]: *** [WWW-1] Error 2
make[1]: Leaving directory `/main/src/lilypond/build'
make: *** [doc-stage-1] Error 2

gperciva@chikara:~/src/lilypond/build$ more
/main/src/lilypond/build/out/lybook-db/snippet-names--8702389846796748212.log
/main/src/lilypond/build/out/lybook-db/snippet-names--8702389846796748212.log:
No such file or directory



http://codereview.appspot.com/5453046/diff/1/python/lilylib.py
File python/lilylib.py (right):

http://codereview.appspot.com/5453046/diff/1/python/lilylib.py#newcode196
python/lilylib.py:196: stderr_filename = ' '.join([log_file, '.log'])
I think this should be:
   stderr_filename = ''.join([log_file, '.log'])
or just
   stderr_filename = llog_file + '.log'

I mean, we don't want a space in the filename, right?

http://codereview.appspot.com/5453046/

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