lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add chord range to make-part-combine-music (issue 144170043 by addre


From: k-ohara5a5a
Subject: Re: Add chord range to make-part-combine-music (issue 144170043 by address@hidden)
Date: Wed, 29 Oct 2014 05:06:28 +0000

This seems to allow the style of partcombine where unisons are
double-stemmed which would be very nice.
You can, if you like, put a small image (like a 2kB png) on the lilypond
issue tracker showing the desired output; then people can understand the
purpose of the patch.

I see that recording-group-emulate calls (ly:context-property child
'instrumentTransposition)).  Should I look to that as an example?

No.  We could not find any way in which this was functioning.
 (http://code.google.com/p/lilypond/issues/detail?id=645#c11)
recording-group-emulate works before the Property_engraver gets a chance
to set instrumentTransposition on the output Staff.

It would be nice to be able to change the chord-range in the middle of
the music, but in general, context properties seem a poor choice,
because the output contexts are not even determined when \partcombine
executes.

If you used a context, the way David is trying for partCombineChords,
etc., you could say
  combined = \displayMusic \transpose c c' \partcombineUp
    {c4 c c c  \set partcombineChordRange = #'(2 . 8)
       | c c c c}
    {c4 c c e | c c c c }
but then user would be understandably confused when
  \new Staff \with { partcombineChordRange = #'(4 . 5) } \combined
has no effect.

You see what Reinhold did when he created \partCombineChords and so on;
he made a new event type, for the sole purpose of being iterated by
recording-group-emulate to get the forced-state messages to
\partcombine.

I think that an optional argument to \partcombine music function is the
most appropriate way to set chord-range.


https://codereview.appspot.com/144170043/diff/1/input/regression/part-combine-chord-range.ly
File input/regression/part-combine-chord-range.ly (right):

https://codereview.appspot.com/144170043/diff/1/input/regression/part-combine-chord-range.ly#newcode21
input/regression/part-combine-chord-range.ly:21:
(make-part-combine-music parser (list part1 part2) #f '(2 . 12)))
you can make a friendlier interface; see below.

https://codereview.appspot.com/144170043/diff/1/ly/music-functions-init.ly
File ly/music-functions-init.ly (right):

https://codereview.appspot.com/144170043/diff/1/ly/music-functions-init.ly#newcode1137
ly/music-functions-init.ly:1137: #(define-music-function (parser
location part1 part2) (ly:music? ly:music?)
Here, an optional argument might be appropriate, instead of the global
variable above,
 #(define-music-function (parser location part1 part2)
   (number-pair? '(0 . 8))(ly:music? ly:music?)
Then you can say
  \partCombine '(1 . 7) {...} {...}

https://codereview.appspot.com/144170043/diff/1/scm/part-combiner.scm
File scm/part-combiner.scm (right):

https://codereview.appspot.com/144170043/diff/1/scm/part-combiner.scm#newcode275
scm/part-combiner.scm:275: "@var{evl1} and @var{evl2} should be
ascending. @var{chord-range} is a pair (min . max) defining the distance
(in steps) between notes that may share a stem."
"..that may share a stem, i.e., that may be set as a single chords or as
a unison."
(Reading the code, I /think/ unisons are affected in the consistent
way.)

https://codereview.appspot.com/144170043/



reply via email to

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