Re:MIDI dynamics parsing error

2016-10-12 Thread Flaming Hakama by Elaine
> >> I'm dealing with several of these MIDI errors during compilation of a
> >> long
> >> piece.
> >> "programming error: Impossible or ambiguous (de)crescendo in MIDI."
> >>
> >> I tried to get rid of these by placing a starting volume, but alas, it's
> >> not
> >> that simple.
> >
> > The approach I use is to define some dynamics that don't print, and use
> > them when necessary.
>
> Indeed, I'm aware of this solution.  But v2.18 won't state which line or
> measure is triggering the errors.
>
> Since I'm cleaning up a long piece, finding which notes eliminate the
> errors
> is non-trivial.  Trial/error search is very time-consuming due to compile
> time and the hundreds of hairpins to review.  Since the issue relates to
> starting volume, commenting out sections of the piece hoping to isolate to
> fewer measures injects its own set of issues.
>

While David demonstrated that 2.19 shows the line numbers, regardless there
is an easier approach where that information should not matter.

1) Create at least one non-printing dynamics definition, like \xppp
2) Do a global search/replace of \< with \xppp\<
3) For each dynamic actually used in the piece, do a global search/replace,
for example
replace \p\xppp\< with \p\<
replace \mp\xppp\< with \mp\<
...
replace \ff\xppp\< with \ff\<


The first replacement should fix all your MIDI dynamics issues (of this
type), since you will no longer have any crescendi without starting
dynamics.

It will also likely create new errors  ("Two simultaneous absolute-dynamic
events"
and "Previous absolute-dynamic event here") any place already where a
crescendo did start from a specific dynamic.

These new errors can be fixed by the second set of replacements.  (And
maybe this type of error does include line numbers in 2.18, possibly making
it more tractable to fix?)

Of course, this only works to the extent that your input syntax is
consistent in terms of use of spaces, dynamics and crescendi being
adjacent, and not separated by articulations and markup, use of \< rather
than \cresc etc.)

To the degree that your input syntax is inconsistent in terms of use of
spaces, you might be able to  need just need to do more search/replacing to
deal with those cases.

And/or do pre-processing to eliminate spaces, like replace " \<" with
"\<".  Or doing the search/replace with a regexp that can accommodate
spaces, such as these perl one-liners you can run on the command line and
operate on the file in place.

# Remove spaces between dynamics and crescendo
perl -p -i -e 's/\\([mpf]+)\s*\\___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Re:MIDI dynamics parsing error

2016-10-11 Thread Dominicus
Flaming Hakama by Elaine wrote
>> I'm dealing with several of these MIDI errors during compilation of a
>> long
>> piece.
>> "programming error: Impossible or ambiguous (de)crescendo in MIDI."
>>
>> I tried to get rid of these by placing a starting volume, but alas, it's
>> not
>> that simple.
> 
> The approach I use is to define some dynamics that don't print, and use
> them when necessary.

Indeed, I'm aware of this solution.  But v2.18 won't state which line or
measure is triggering the errors.

Since I'm cleaning up a long piece, finding which notes eliminate the errors
is non-trivial.  Trial/error search is very time-consuming due to compile
time and the hundreds of hairpins to review.  Since the issue relates to
starting volume, commenting out sections of the piece hoping to isolate to
fewer measures injects its own set of issues.

It would be a welcome enhancement to state either measure of line when
raising this error.  Has this been addressed in later versions?




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Re-MIDI-dynamics-parsing-error-tp195262p195286.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:MIDI dynamics parsing error

2016-10-10 Thread Flaming Hakama by Elaine
> I'm dealing with several of these MIDI errors during compilation of a long
> piece.
> "programming error: Impossible or ambiguous (de)crescendo in MIDI."
>
> I tried to get rid of these by placing a starting volume, but alas, it's
> not
> that simple.



The approach I use is to define some dynamics that don't print, and use
them when necessary.

xppp = \tweak stencil ##f \ppp
xpp = \tweak stencil ##f \pp
xp = \tweak stencil ##f \p
xmp = \tweak stencil ##f \mp
xmf = \tweak stencil ##f \mf
xf = \tweak stencil ##f \f
xff = \tweak stencil ##f \ff
xfff = \tweak stencil ##f \fff


{ c1\xppp\< | 1\p  }


HTH,

David Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user