[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The life of a Grob

From: Joe Neeman
Subject: The life of a Grob
Date: Sat, 16 Sep 2006 23:40:59 +1000

Understanding the LilyPond source often boils down to figuring out what
is happening to the Grobs. Where (and why) are they being created,
modified and destroyed? I've spent many hours tracing Lily through a
debugger and it is mind-blowingly tedious.

So I quickly hacked a few things together and came up with something a
bit better. I added hooks into internal_grob_set_property and
make_grob_from_properties. You can register a scheme callback which will
get called whenever a Grob is modified or created. The scheme callback
will receive the file and line numbers in the C++ source where the call
was made. This can help you to trace cause and effect through the C++

This is very hackish right now (I only started this morning), but I
thought I'd share a quick application. The file produces a
graphviz output file, "", that lets you visualise the changes
in Grobs throughout LilyPond execution. For now, you'll need to add a
closing brace to the end of

I attach a patch, an example input file and a sample output.

Attachment: life_of_a_grob.patch
Description: Text Data

Description: application/gzpostscript

Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]