Re: Fixed space after time- key-signatures (issue 4964059)

2011-09-03 Thread Trevor Daniels


passes Make but I get a lot of (probably expected) reg test 
differences.

Attached the most significant shifts here


These changes are all expected consequences of the
patch.  All are improvements, although the grace
note in lyric-hyphen-grace.ly seems closer to the
time signature than normal notes.  Any idea why this
is, Keith?

Trevor



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


Re: Fixed space after time- key-signatures (issue 4964059)

2011-09-03 Thread tdanielsmusic

LGTM, thanks Keith.

Trevor

http://codereview.appspot.com/4964059/

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


Re: Contexts properties dump suggestion

2011-09-03 Thread Marc Hohl

Am 02.09.2011 18:43, schrieb Mark D. Blackwell:

For LilyPond newbies, figuring out the proper LilyPond syntax to set any
property, in all the various possible places (both named contexts and context
types) seems to take effort, though it is doable. (Maybe my projects are
unusual. BTW, this isn't why, I suppose, but I am a Ruby programmer.)

This happens when a LilyPond file sufficiently differs from a template in the
LilyPond documentation. (This is a Good Thing, IMO.)

Prompting this is a project (e.g.) with the statement, '\new VaticanaVoice'. I
am trying to alter its equivalent for:

\override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4)

Now, I could learn LilyPond better, or learn to browse the Internals Reference
better, but for LilyPond newbies, may I make this point?:

It would be greatly useful (IMHO) for those who desire to alter a property (but
don't know how) for there to be:

IMHO, this would be somehow doable, but overkill. Have a look at

http://lilypond.org/doc/v2.14/Documentation/internals/contexts

there are *a lot* of properties which can be overridden/tweaked/etc.
and I think this would clutter up the file with a huge amount of
(for your purposes) useless informations, and finding the bits you need
takes probably more time that clicking through the internal documentation
which can stay open in a separate browser window.

Just my 2ct.

Regards,

Marc

An instruction (perhaps implemented in Scheme?) to dump (to a given file)
information about all currently-alive contexts and their properties.

(The dump would identify the filename and line number where it was called.)

To see the properties created by any given LilyPond statement, or for some other
purpose, the user might again dump from a different place (in her project) and
then compare (probably with the 'diff' tool).

Optimally, for each (currently alive) context property, the dump (it seems to
me) would show the exact LilyPond statement (with correct syntax) usable (in
that place) to 'alter' the property to its same (or current) value.

The user, in a text editor, and referring to the Internals Reference manual,
would select these property-setting statements and alter the values as desired.



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




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


Re: Uses langdefs.py to create language list for create-weblinks-itexi.py (issue 4951047)

2011-09-03 Thread percival . music . ca

On 2011/09/02 06:25:59, jan.nieuwenhuizen wrote:

If that works, then why not have



+import langdefs
+langs = [i.code if i.code != 'en' else '' for i in

langdefs.LANGUAGES]

I agree.

Phil, why did you push this patch without implementing this, or at least
responding to Jan to say why you thought it was a bad idea?  I think
this is bad form; we want to encourage developers to review patches, but
if we ignore their suggestions that pretty much kills any incentive for
people to review stuff.

Please revert the patch and let's talk about Jan's suggestion.


http://codereview.appspot.com/4951047/

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


Re: Uses langdefs.py to create language list forcreate-weblinks-itexi.py (issue 4951047)

2011-09-03 Thread Phil Holmes
- Original Message - 
From: percival.music...@gmail.com

To: philehol...@googlemail.com; jan.nieuwenhui...@gmail.com
Cc: re...@codereview.appspotmail.com; lilypond-devel@gnu.org
Sent: Saturday, September 03, 2011 10:28 AM
Subject: Re: Uses langdefs.py to create language list 
forcreate-weblinks-itexi.py (issue 4951047)




On 2011/09/02 06:25:59, jan.nieuwenhuizen wrote:

If that works, then why not have



+import langdefs
+langs = [i.code if i.code != 'en' else '' for i in

langdefs.LANGUAGES]

I agree.

Phil, why did you push this patch without implementing this, or at least
responding to Jan to say why you thought it was a bad idea?  I think
this is bad form; we want to encourage developers to review patches, but
if we ignore their suggestions that pretty much kills any incentive for
people to review stuff.

Please revert the patch and let's talk about Jan's suggestion.



Please see my previous email to you directly. I was trying to push a minor 
documentation change in another branch, and by mistake pushed this instead. 
I asked you to revert it because I don't know how.  If you let me know, I'll 
add it to my list of git commands.


I was waiting to get that sorted before responding to Jan.  My response is 
that I'm not very good at Python, and so was essentially writing Python in 
C-style.  Personally I find it easier to understand - I find a lot of the 
Python short cuts confusing style that probably add little in the way of 
performance, but I'm happy to change the line.


--
Phil Holmes



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


Re: Uses langdefs.py to create language list forcreate-weblinks-itexi.py (issue 4951047)

2011-09-03 Thread Graham Percival
On Sat, Sep 03, 2011 at 10:36:28AM +0100, Phil Holmes wrote:
 Phil, why did you push this patch without implementing this, or at least
 responding to Jan to say why you thought it was a bad idea?  I think
 
 Please see my previous email to you directly.

ah, sorry.  I don't use percival.music.ca@ for email, so I didn't
see that message.
I've been meaning to switch my lilypond google account to graham@
for a while, but it never had high enough priority that I felt
good abandoning releases or regtests to actually get it done.

 I was trying to push a minor documentation change in another
 branch,

I see; I've done this before.  I think that
  git push
uploads stuff in all branches you have, but I'm not certain.  You
_might_ be about to avoid this by doing
  git push mybranch origin
or something like that, but I'm out of my depth here.


other emails will wait until the conference is over.

Cheers,
- Graham

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


Re: centering text on a measure

2011-09-03 Thread Trevor Daniels


David Nalesnik


However, I'd like to be able to
center the text on the measure regardless of what's in it (or, by 
extension,
center it between items of my choosing).  I'm hoping that there's 
a way to
do this without relying on 'extra-offset, so that other grobs will 
move up

to avoid collisions.  Is this possible?


Hhm.  Can't think of a way without doing some
coding.  It would be nice if TextSpanner could
centre its text between the left and right
bounds (like the number on a tuplet bracket)
but it doesn't, AFAIK.  It would be a nice
extension to request, though.

MultiMeasureRestText can also be moved with
\once \override MultiMeasureRestText #'self-alignment-X = #-2
and this will enable collisions to be avoided
at the new position.

Trevor




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


Re: Memleaks or not?

2011-09-03 Thread Reinhold Kainhofer
Am Wednesday, 24. August 2011, 20:30:20 schrieb Reinhold Kainhofer:
 Running lilypond on a lot of files in one run, I observe that lilypond's
 memory usage slowly goes up with time, i.e. it seems that lilypond does not
 properly free all memory used for one score, before it starts with the next
 one.

Following up on this, I have discovered the (check-memory) scheme function in 
lily.scm and let it display some Scheme memory stats when running on multiple 
files:

After the first file we have:
Processing `accidental-ancient.ly'
VMDATA: 91360
((gc-time-taken . 15) (cells-allocated . 4117699) (total-cells-allocated . 
5066751) (cell-heap-size . 10737028) (bytes-malloced . 3726859) (gc-malloc-
threshold . 4037751) (gc-times . 6) (gc-mark-time-taken . 15) (cells-marked . 
34142411.0) (cells-swept . 35398335.0) (malloc-yield . 23) (cell-yield . 17) 
(protected-objects . 1177) (cell-heap-segments (140744704 . 140779520) 
(2988156928 . 3044208640) (3047643136 . 3067260928) (3067570176 . 
3078098944)))


But after compiling all regtests starting with [abc]*.ly, we have:

Processing `custos.ly'
VMDATA: 120884
((gc-time-taken . 2623) (cells-allocated . 75745641) (total-cells-allocated . 
513621680) (cell-heap-size . 10737028) (bytes-malloced . 35585796) (gc-malloc-
threshold . 45739370) (gc-times . 227) (gc-mark-time-taken . 2623) (cells-
marked . 2013812174.0) (cells-swept . 2451995085.0) (malloc-yield . 12) (cell-
yield . 20) (protected-objects . 2576) (cell-heap-segments (140744704 . 
140779520) (2988156928 . 3044208640) (3047643136 . 3067260928) (3067570176 . 
3078098944)))


Notice that the VMDATA goes up (almost linearly in the files processed), and 
similarly the bytes-malloced, as well as the protected-objects and most other 
counts. 
The cells-allocated got up, too, although I don't really know what cells 
really means here.

Since I really don't know too much about the internals of guile, the question 
that immediately comes to my mind: Doesn't this indicate that we don't release 
all guile memory after processing a file? In particular, are we missing some 
objects from garbage collection, or are we not removing the used mark of some 
SCM objects after one file is finished?

Cheers,
Reinhold
-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

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


Re: Memleaks or not?

2011-09-03 Thread Han-Wen Nienhuys
On Wed, Aug 24, 2011 at 3:30 PM, Reinhold Kainhofer
reinh...@kainhofer.com wrote:
 Running lilypond on a lot of files in one run, I observe that lilypond's
 memory usage slowly goes up with time, i.e. it seems that lilypond does not
 properly free all memory used for one score, before it starts with the next
 one.

 1) In Pango_font::text_stencil we have
    PangoLayout *layout = pango_layout_new (context_);
 but after using the layout, we never call g_object_unref (layout).

looks like a leak.

 3) There are many, many warnings about possibly lost memory in
 pango_layout_get_lines calls, but I don't see how they can be real memory
 leaks from the pango docs. Still, the numbers go up linearly in the number of
 files...

looks suspect. Pango_font::text_stencil allocates stuff but does not deallocate.

 4) In all-font-metrics.cc we have
  PangoFontMap *pfm = pango_ft2_font_map_new ();
  pango_ft2_fontmap_ = PANGO_FT2_FONT_MAP (pfm);
 And in All_font_metrics::~All_font_metrics we have:
  g_object_unref (pango_ft2_fontmap_);

 Still, valgrind reports that pango_ft2_fontmap_ is possibly lost, and the
 number of bytes goes up linearly in the number of files...

The font handling is fugly; there is a global variable holding a list
of a fonts somewhere. Getting this fixed is dirty work, without much
benefit.

For the scheme side: when running multiple files, a GC is run after
every file.  There is a warning about object should be dead that
should trigger if we find any live scheme objects that should have
died.  The GC allocation strategy may still cause memory to go up
overall, as it will accomodate for the peak memory use (ie. the most
expensive file).

-- 
Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen

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


Re: centering text on a measure

2011-09-03 Thread Trevor Daniels


David Nalesnik wrote Saturday, September 03, 2011 6:36 PM


I've adapted the snippet for centering text on hairpins
http://lsr.dsi.unimi.it/LSR/Snippet?id=233
to give an approximation of this.  Basically,  I've replaced the 
default
TextSpanner stencil with a blank with the same extents to which I 
add a
text.  The argument allows you to position this text using an 
alignment
value.  The example shows a few alignments over one-measure groups 
on the
first line, two-measure groups on the second.  (Unfortunately, if 
I don't
blank out the default stencil, the text appears on top of the 
extender line,
and of course the distance between the individual dashes or dots 
isn't
adapted to make for a nice fit.  Insert bad memories of another 
notation

program here.)


You can kill the extender line by setting
'dash-period negative, if that helps.

Now, I suppose the text's position is dependent on the NoteColumn 
grobs to
which the spanner is attached.  Would it be possible to reset the 
attachment
point to another grob? (I could use offsets as in the original 
function, but

that will once again bring in the 'extra-offset issue.)


Not sure I understand.  The spanner start and end
points are defined by the positions of \startTextSpanner
and \stopTextSpanner.  ??

I agree that this would be great feature for LilyPond.  How would 
I go about

making a request?


Well, you could add a snippet to the LSR to
show how you've done it.  This might then
find its way into the documentation if others
like it.  Instructions are on the LSR site:
http://lsr.dsi.unimi.it/, see Contributing.

And you could send a request for an enhancement
to bug-lilyp...@gnu.org, explaining why it would
be useful, and, if you have added a snippet to the
LSR, pointing to it.

Trevor



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


Re: Fixed space after time- key-signatures (issue 4964059)

2011-09-03 Thread Keith OHara

On Sat, 03 Sep 2011 00:13:56 -0700, Trevor Daniels t.dani...@treda.co.uk 
wrote:


although the grace
note in lyric-hyphen-grace.ly seems closer to the
time signature than normal notes.  Any idea why this
is, Keith?


That is how grace notes were spaced in the last two stable versions.

Grace notes get 80% the space that a note would get to the prefatory item,
but that 80% space is measured from /left/ edge of the prefatory item, so
for wide items that results in grace notes being placed as close to the
right edge of wide prefatory item as the non-collision condition allows.

Now the space-alist mechanism is more sophisticated, specifying space to
either the left- or right- edge as appropriate for each prefatory item.
I'll try computing the desired grace note position based on this more
sophisticated specification, and propose the change if it looks good.

The proposed fix for issue 724 will add 0.8 staff-space between time-
signature and grace note anyway, by adjusting the non-collision condition.


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


Re: merging regtests

2011-09-03 Thread Reinhold Kainhofer
Am Tuesday, 30. August 2011, 07:39:06 schrieb Graham Percival:
 On Tue, Aug 30, 2011 at 06:25:44AM +0100, Graham Percival wrote:
  As a temporary workaround, I will now reduce the number of
  regression tests.  In particular, I will merge the segfault
  regtests -- we don't care about the output of those; we just want
  to make sure that lilypond doesn't crash.
 
 This abomination was pushed as
 a330f10f9fdf00408598031f4b2cb691039b2c92

Can we revert this regtest merge again, now that the build should work in that 
case again?

Cheers,
Reinhold

-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

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


[PATCH] Flush all ports after each file

2011-09-03 Thread Reinhold Kainhofer
So far, the output of the safe.ly regtest showed up randomly
in some later regtest, because stdout was buffered when redirected
to a file.
This patch flushes all ports after each processed file (only relevant
when multiple files are processed at once).

Unfortunately, it seems stdout is not an open Scheme port when
Scheme doesn't print anything to stdout. So, when displaying all
options (done in C++), we have to flush stdout directly after printing all
options.

Please review:
http://codereview.appspot.com/4956062

Cheers,
Reinhold
-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

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


Re: Fix 1805: AmbitusAccidental needs avoid-slur, needed when the notes in the ambitus have a slur (issue 4904049)

2011-09-03 Thread pkx166h

passes Make and reg tests

http://codereview.appspot.com/4904049/

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