Originally created by: *anonymous
Originally created by: pkx1...@gmail.com
On 02/08/14 18:36, Knute Snortum wrote:> Something that is seen a lot in 19th and 20th century music is a crescendo
> or decrescendo without going to a specific dynamic. The performer is given
> the freedom to decide how much to change the dynamics. This causes an
> error message: "programming error: Impossible or ambiguous (de)crescendo in
> MIDI."
>
> %%% BEGIN
> \version "2.19.10"
>
> \score {
> \relative c' {
> c1 \p | c4 \< d e f | g \> f e d | c1 \p
> }
> \layout {}
> \midi {}
> }
> %%% END
>
> This error message should be a warning and give some line number to the
> offending code.
On 02/08/14 15:28, David Kastrup wrote:> Knute Snortum <ksnortum@gmail.com> writes:
...
>
> That's not an actual programming error in pretty much all cases but
> rather an input problem probably deserving a warning. That alone should
> warrant fixing.
>
Originally posted by: nine.fie...@gmail.com
Should this issue be merged with issue 3945?
Related
Issues:
#3945Originally posted by: simon.al...@mail.de
Well, it’s very similar. This one has a stress on what the output message says. But the ‘design’ question is common to all three issues (including issue 4104, which really is a duplicate).
Related
Issues:
#4104Originally posted by: simon.al...@mail.de
And by ‘design’ question I mean: Do we want Lily to complain at all? As Knute rightly pointed out, this reflects a specific way to use hairpins, which is definitely ‘correct’ within that style.
So I’d suggest to make it configurable at the very least (say through
\set HairpinStrictLoudness = ##t or
\override Hairpin.strictLoudness = ##t or
\override Hairpin.midiLoudnessBehaviour = #'seamless-edges vs. #'independent-edges
\override Hairpin.midiEdges = #'bound vs. #'free)
The last one seems most descriptive and concise to me.
Behaviour sketch:
If #'free (or strictLoudness = ##f or #'independent-edges) assign to the Hairpin’s closed end a midi volume as in effect previously, and adjust the (de-)crescendo accordingly. Continue playing with the volume from before the hairpin.
If #'bound (or strictLoundess = ##t or #'seamless-edges) start with the midi volume currently in effect, make (de-)crescendo and arrive at a new level. If there are inconsistencies, complain (as it is now), but not with a programming error, but with a warning (perhaps "Can’t make sense of hairpin in MIDI"), pointing to the input location and appearing only if MIDI output is generated (i.e. given by Dynamic_performer IIUC).
Originally posted by: simon.al...@mail.de
(No comment was entered for this change.)
Summary: Is Dynamic_performer’s understanding of (de)crescendo too limited?
Labels: Needs-design
Diff:
I ran across some code that inspired head-scratching, and I believe it is directly related to this issue. I can probably fix it. Here are my thoughts for your review. Basically, in most cases, I don't think there is sufficient reason to issue warnings.
crescendo with explicit dynamics (mf < f)
unspecified starting dynamic (... < f)
unspecified ending dynamic (mf < ...)
“impossible” crescendo (mf < p)
mid-crescendo dynamics
<< { c'1\< c' c'\! } { s1 s\p s } >>
Last edit: Dan Eble 2016-06-04
On second thought, this is not a case that needs to be handled. In my test file, I didn't force the simultaneous music into the same voice, so what looked like mid-crescendo dynamics to me was just parallel voices. An absolute dynamic ends a crescendo or decrescendo in a voice, so only the cases with dynamics at the start and end need to be handled.
LGTM.
I've gone a bit further and handled sequences of (de)crescendi, to an extent. I plan to test my work before posting a review, but here is the algorithm in case anyone would like to raise objections in the meantime.
The performer works on passages containing of the longest string of consecutive crescendi followed by consecutive decrescendi (or vice versa) which are not interrupted by an absolute dynamic. For example, this passage has two crescendi and a decrescendo, as well as some spans of unchanging volume.
The performer works it out so that at the end of the decrescendo, the volume has returned to the original volume before the first crescendo in the passage began. The maximum (or minimum) volume is chosen as it was before. The change in volume of a particular (de)crescendo is proportional to its duration.
When an absolute dynamic appears, the performer terminates the group and uses the specified dynamic instead of the starting dynamic.
Last edit: Dan Eble 2016-07-04
Issue 4048: Improve crescendo performance with unspecified dynamics
http://codereview.appspot.com/302910043
Represent dynamics as a piecewise linear function
http://codereview.appspot.com/302910043
Handle multiple (de)crescendi in depart-return groups
http://codereview.appspot.com/302910043
Passes make, make check and a full make doc.
Looks like this patch needs some more work (based on comments on Rietveld).
review response
http://codereview.appspot.com/302910043
passes make, make check and a full make doc.
Patch on countdown for July 17th - although there is a long thread in Rietveld that seems to just be a general discussion about a previous reply, but can you just check in case there i something that still needs to be done?
Patch counted down - please push
This is unlikely to happen this week for a few reasons beyond my control.
Sorry to anyone who is inconvenienced.
--
Dan