lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating LilyPond Object Models


From: Johannes Rohrer
Subject: Re: Creating LilyPond Object Models
Date: Thu, 23 Apr 2015 10:25:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

* 2015-04-23 01:29 +0200:
> Translators are program elements that convert music expressions to output.
>  Engravers are translators that create printed output.  Performers are
> translators that create midi output.
> 
> Translators examine the music expressions that are contained in the
> context, and create output elements.  For the case of engravers (which
> create graphical output), the output elements are grobs.  The grobs have
> properties that are used to create their appearance on the page.

This is very simplified. Translators do not operate on music expressions
directly, and music expressions are not themselves contained in
contexts. This level of understanding may get you relatively far as a
user, but is not even sufficient for reading the Internals Reference.

It has been a while since I last tried to wrap my head around this, but
from memory:

Program elements called Iterators turn music expressions into a
time-ordered stream of Events sorted into contexts. The different types
of Events produced at this stage are listed here:

<http://lilypond.org/doc/v2.18/Documentation/internals/music-expressions>

Events are categorized in a hierarchy of Event Classes. These are listed
here:

<http://lilypond.org/doc/v2.18/Documentation/internals/music-classes>

Translators selectively (based on assigned Event Classes) "accept"
Events from the stream that were sorted into "their" context and process
them. Typically, they will produce "output objects" (for Engravers:
layout objects, aka Grobs; for Performers: Audio_items) and "announce"
these. Other Translators can "acknowledge" certain types of announced
objects to process them further.

This is mostly undocumented I believe, although there are some
snippets in the contributor's guide

<http://lilypond.org/doc/v2.19/Documentation/contributor/overview-of-lilypond-architecture>

and some helpful scattered mailing list posts.


Best regards,

Johannes



reply via email to

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