I have now implemented overriding the part-combine decisions. For this, I 
abuse \set partcombineForced =... events to extract the desired combination 
strategy in the \partcombine function (scheme code in scm/part-combine.scm), 
before the property_iterator actually gets a chance to set those properties.

Patch is up at Rietveld:
http://codereview.appspot.com/1698054/

Okay to push to master?

The only downside to this approach (abusing the partcombineForced "context 
property") is that one cannot set a default override, since the context 
property itself is never read. Instead, the code intercepts all \set / \unset 
events to change the property...
So, code like
\context {\Staff
  \set partcombineForced = #'apart
}
will not have ANY effect. 


Commit msg:

Part-combine: Add a way to override the part-combination decision

Add functions partcombineApart[Once], partcombineChords[Once],
partcombineUnisono[Once] and  partcombineAutomatic to tweak the decision of 
the
part-combiner.
Internally, they are implemented as
       \once\set partcombineForced = #...
       \set partcombineForced = #...
       \unset partcombineForced
    
The partcombineForced "context property" is not handled as a context property,
but the \set events are rather handled directly in the part-combiner
(scm/part-combine.scm, function analyse-forced-combine).
As a result, you can't initialize a context to a given default value of
partcombineForced, since the part-combiner never reads the context property
itself, but tries to catch the corresponding \set/\unset events.
For the *Once functions, we rely on the property_iterator to add a 
corresponding
UnsetProperty event at the beginning of the next time step, though.


Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to