lilypond-devel
[Top][All Lists]
Advanced

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

[PATCH] Making partcombine more flexible


From: Reinhold Kainhofer
Subject: [PATCH] Making partcombine more flexible
Date: Wed, 28 Jul 2010 20:04:30 +0200
User-agent: KMail/1.13.5 (Linux/2.6.32-24-generic; KDE/4.4.5; i686; ; )

Finally, I have a score, where I really need to tweak the partcombiner (so 
far, I managed to not use it at all and instead use two staves...).
In particular, every now and then the split list obtained in make-part-
combine-music (file scm/part-combiner.scm) is not ideal and needs manual 
tweaking

In my eyes, the easiest way would be to force a particular combine type using 
context properties, e.g.

vone =  \relative a' {
  \set Staff.partCombineForced = #'apart
  g2 g | 
  \set Staff.partCombineForced = #'chords g 
  \set Staff.partCombineForced = #'unisono g4 g |
  \unset Staff.partCombineForced
  g g g g |
}
vtwo =  \relative a' {
  g2 g4 g |
  e2 
  g4 g |
  e e e e |
}
\partcombine \vone \vtwo


If partCombineForced (or how ever we call it) is set, that value would 
override the split list. if it's unset, then the split-list would be used.

I'm making progress with this approach (it's actually quite easy: In the 
Part_combine_iterator, just check for the context propery in get_outlet() and 
it if exists, use that instead of the value from the split-list). My current 
state is uploaded at Rietveld (it includes some debug statements, too, and a 
regtest file):

     http://codereview.appspot.com/1698054


However, I'm running into some problems:

1) The \set Staff.partCombineForced does not seem to have an immediate effect 
on the following note, but only starting from the second note after the \set 
command. (i.e. the first note in the above example will use the default part-
combination, the third note will still use 'apart instead of 'chords, etc.)

2) The \unset Staff.partCombineForced does not have any effect, the value 
obtained by get_outlet ()->get_property ("partCombineForced") will be 'unisono 
till the end of the score :( This happens only for 'unisono. Unsetting the 
property e.g. after the second note works just fine.
It seems to be the problem that with 'unisono only the notes of the second 
voice are used... I would need to get all \set Staff.partCombineForced 
commands from both the first and the second voice...


What do you think of this approach? And do you have any ideas how to solve 
these problems?

Thanks,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, 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



reply via email to

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