[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Part combiner warning about simultaneous breathing
From: |
David Kastrup |
Subject: |
Re: Part combiner warning about simultaneous breathing |
Date: |
Sun, 02 Nov 2014 12:27:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Devon Schudy <address@hidden> writes:
> David Kastrup wrote:
>> My guess would be that the whole articulation mechanism might be
>> changed in a manner that partcombine no longer is able to consider two
>> articulations as mergeable. In that case, it would likely be more than
>> just breathings which are affected.
>
> Yes: it's because that commit added the midi-length property to breath
> marks (and some articulations), whose value is a function, so
> partcombine can't tell they're identical.
>
> The old definition of \breathe (without the offending property) gives
> no warning:
>
> breathe =
> #(define-music-function (parser location) ()
> (_i "Insert a breath mark.")
> (make-music 'BreathingEvent))
>
> The simplest fix is to make \breathe use the same (eq?) closure
> instead of a new one each time, so partcombine can merge the breaths:
>
> #(define (breath-midi-length len context)
> ;;Shorten by half, or by up to a second, but always by a power of 2
> (let* ((desired (min (ly:moment-main (seconds->moment 1 context))
> (* (ly:moment-main len) 1/2)))
> (scale (inexact->exact (ceiling (/ (log desired) (log 1/2)))))
> (breath (ly:make-moment (expt 1/2 scale))))
> (ly:moment-sub (ly:make-moment (ly:moment-main len)) breath)))
>
> breathe =
> #(define-music-function (parser location) ()
> (_i "Insert a breath mark.")
> (make-music 'BreathingEvent
> 'midi-length breath-midi-length))
Wouldn't it be the proper cure to just revert to the old definition of
breathe and move the definition of midi-length into
scm/define-music-types.scm?
It does not appear like putting such a default value in the mutable
properties makes sense in the first place.
--
David Kastrup
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Part combiner warning about simultaneous breathing,
David Kastrup <=