09 December 2008

Millions of Functions

LilyPond's documentation is quite extensive, and it's a great source of information if you're interested in learning how to use the software. Some of LilyPond's documentation is automatically generated straight from Scheme source code. This part of the documentation cover's much of LilyPond's "internals", including a complete list of music expressions, grobs, grob properties, etc. It also covers public functions that are exported to Scheme at runtime from C++ code. All of these functions begin with `ly:', so they are easy to recognize. However, there are *many* functions that are defined in the Scheme source that don't have autogenerated documentation. Some have docstrings, but many do not. Eventually I plan on getting all of these functions documented too, because some of them are incredibly useful. I didn't realize until today that some of these functions are generated *on-the-fly*, so it might be more tricky to document these particular functions. Some examples are `make-simple-markup', `make-bold-markup', etc. In fact, a `make-BLAH-markup' function is created for *every* markup command. So Lily's markup command \simple performs the same operation as `make-simple-markup' would in Scheme. Interesting stuff. I'm slowly becoming more familiar with how LilyPond operates, so the huge number of (unfortunately) undocumented Scheme functions is definitely helping me understand things better.

1 comment:

Anonymous said...

Here's a language that involves something that's "up". It's expressed in three parts:

1. Cut a hole in the box.
2. Put your junk in the box.
3. Make her open the box.

It's called "Dick in a Box".