[Top][All Lists]

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

Simplifying make-ottava-set to allow \displayLilyMusic to work with \ott

From: Neil Puttock
Subject: Simplifying make-ottava-set to allow \displayLilyMusic to work with \ottava
Date: Sun, 21 Feb 2010 18:09:59 +0000

Hi everybody,

I've been looking at changing the definition of make-ottava-set so it
doesn't use ApplyContext to change all the property settings, and I
have a patch which works, though I'd prefer to change the internal
representation of \ottava so it uses a stream event: this will
simplify the expression matching in define-music-display-methods.

Since sending a stream event will require an iterator, I'm torn
between two different implementations, both using an OttavaEvent:

1) Create an Ottava_iterator (as a subclass of Simple_music_iterator)
which will call make-ottava-set (obviously modified) with the context
(using find_create_context to ensure it's called with Staff)

This has a slight drawback in that it causes the usual annoying extra
stave to appear if \ottava is called at the start of an implicit
voice, i.e., the would result in an extra stave appearing:

% \new Staff % (workaround)
\relative c' {
  \ottava #1

2) Wrap the context-specced-music result of make-ottava-set in a list
and simply use this as the elements callback for an instantiation of
the Sequential_iterator.

This doesn't require any C++ code, but seems to be a bit hackish even
though I like the simplicity. :)

Any thoughts?


reply via email to

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