lilypond-user
[Top][All Lists]
Advanced

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

Re: What is a voice context?


From: Urs Liska
Subject: Re: What is a voice context?
Date: Thu, 23 Apr 2015 18:45:09 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Am 23.04.2015 um 18:37 schrieb Carl Sorensen:


On 4/23/15 12:02 AM, "Urs Liska" <address@hidden> wrote:



Am 23.04.2015 um 06:07 schrieb Carl Sorensen:
So now I'm going to jump in on what I think a Voice context is.

A Voice context is a context, which means it can contain engravers,
performers, and music expressions.
...

I'd be happy to try to answer any questions others might have about a
Voice.

Thanks,

Carl


I think this is a good explanation, but it requires some prerequisites
(and that is one of the points I find very hard on the LilyPond learning
curve: There are so many things where you have to understand other
things before, and these again have there required pre-understanding
a.s.o. Sometimes you get the feeling there are short-circuits of the
kind that in order to understand a part of documentation you'd have to
have that much knowledge that you don't need that documentation anyway).

What is a context?
I mean, when I run LilyPond, when does a context "enter" and what is its
purpose?

I think I answered that in my other thread:
https://lists.gnu.org/archive/html/lilypond-user/2015-04/msg00837.html

Yes, I'm sorry I had only read that later (so much going on simultaneously ATM ...)


"Contexts are LilyPond objects that contain properties, music expressions,
and translators.  Some contexts, like Score and Staff, can contain other
contexts as well.  Other contexts, like Voice, are bottom contexts and
cannot contain other
contexts.

Contexts are responsible for controlling the output (printed or midi) of
the music they contain.  They do this by calling translators in the
environment of the context properties."



What is an engraver?
When reading this word I think of a human with a certain profession.
When I try to translate this to LilyPond I think of some module that
"prints" items.

An engraver is an object that is responsible for creating printed output
of a certain type as controlled within a context.

The way an engraver works is to listen for events and create grobs based
on relevant events.  When it creates a grob, it announces that creation to
the context.

The events that engravers listen for can be either stream events or grobs
announced by other engravers.

I think these details of how engravers work are necessary for developers,
but not for users.

Not necessarily. There is a certain point where you *could* be able to write your own solutions. I mean, writing an engraver is essentially just one step beyond writing a complex music function. But as it stands it is very difficult to get the information together to do that. Recently I had some success building upon functions that I received from David Nalesnik as ready-made engraver stubs. But I wouldn't have ever had a chance to start them from scratch.

Which is directly related to your effort of gathering an explanation of the mental model ...

Best
Urs


But as far as I've learned recently an engraver is first an entity that
waits for items to be passed to it from the "context" and that can then
do something with this item, e.g. printing it, modifying it before
printing, writing the event to a logfile or sending an email on its
behalf.
I'm still not really sure about how that fits into the architecture.

What is a performer?

A performer is an object that creates MIDI output, by following the exact
same process an engraver follows to create printed output.

HTH,

Carl



--
Urs Liska
www.openlilylib.org



reply via email to

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