Re: Impossible or ambiguous (de)crescendo in MIDI.

2016-03-18 Thread Graham King
On Wed, 2016-03-02 at 14:37 +, Graham King wrote:

> I'm trying to eradicate numerous "Impossible or ambiguous
> (de)crescendo in MIDI" errors from a large score...

Well, there's some, qualified, success to report: I've eliminated the
various, sometimes well-hidden, causes of these messages.  But doing so
has taken half the total time spent on the score.  It would be wonderful
if the error message could be accompanied by any indication at all of
where in the score, or input file, to look for the cause.

Meanwhile, here's a note to my future self with some search strategies.
I hope others might find it useful:

The following examples might encompass any number of intermediate notes
and rests.  I'm using lilypond 2.19.35, so other versions might need to
use different syntax.


 1. Compile early; compile often; fix the warnings as they arise;
don't let them mount up.  This will reduce the search space.
 2. { c\mf\> c\! }  MIDI needs an end dynamic.  Replace with { c\mf
\> c-\omit\p }  Now go and eradicate \! from your score.  It is
anathema to MIDI.
 3. { c\p c\< c\> c }  The classic pair of hairpins.  Replace with
{ c\p c\< c-\omit\mf\> c-\omit\p } 
 4. { c\mf R1*20 c\< c\mf }  Obvious when you see it written this
briefly.  Replace with { c\mf R1*20 c-\omit\mp\< c\mf }
 5. { c_\markup { \dynamic p \italic { dolce } }  Looks like a
dynamic, walks like a dynamic, but doesn't quack like one.
Replace with { c-\omit\p_\markup { \dynamic p \italic
{ dolce } } Likewise for "meno f" and many other cases.
 6. { c1\sfz }  No this is not a dynamic, either.  Try:{ \tag #'pdf
{ c1\sfz } \tag #'midi { c4->\f ~ c2.\mf } } [note 1]
 7. If you still cannot find the source of the problem, adopt a
bisection strategy: Comment out \bookpart and any corresponding
\include stanzas from the \book.  Then comment out parts from
the \score { } block until the number of warnings changes.  Then
pursue bisection further, by commenting out blocks of notes from
the offending part.  Block comments, %{ ... %}, are your friend.
Eventually you will home in on the source of the problem. 
 8. Version control (git, or similar) is your friend.  In a year's
time, it will show you the answer to "How did I fix that, last
time?"
 9. When you have finally fixed it, swallow your pride and write up
the solution somewhere you are likely to search for information
next time.  Somewhere like lilypond-user ...


Notes:
[1] Thanks to Cynthia Karl for pointing this one out.  And thanks to
Simon Albrecht for pointing out that, if you are already using tags,
you'll probably need \tagGroup pdf.midi and other tag groups for those
you already are using.


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


Re: Impossible or ambiguous (de)crescendo in MIDI.

2016-03-18 Thread Richard Shann
On Thu, 2016-03-17 at 22:51 +, Graham King wrote:
> On Wed, 2016-03-02 at 14:37 +, Graham King wrote:
> > I'm trying to eradicate numerous "Impossible or ambiguous
> > (de)crescendo in MIDI" errors from a large score...
> Well, there's some, qualified, success to report: I've eliminated the
> various, sometimes well-hidden, causes of these messages.  But doing
> so has taken half the total time spent on the score.  It would be
> wonderful if the error message could be accompanied by any indication
> at all of where in the score, or input file, to look for the cause.
> 
> Meanwhile, here's a note to my future self with some search
> strategies.  I hope others might find it useful:
> 
> The following examples might encompass any number of intermediate
> notes and rests.  I'm using lilypond 2.19.35, so other versions might
> need to use different syntax.
> 
>  1. Compile early; compile often; fix the warnings as they arise;
> don't let them mount up.  This will reduce the search space. 

For this I suggest you use compiling in the background, I think
Frescobaldi may provide this, certainly Denemo does. Best of all though
would be to set up a separate process niced down to alert you to trouble
(Denemo doesn't make a big fuss if the compilation fails during
background compile, since this will sometimes happen during normal
editing - e.g. when entering a [ before entering the ]).

Richard


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


Re: Impossible or ambiguous (de)crescendo in MIDI.

2016-03-18 Thread Simon Albrecht

Hello Graham,

On 17.03.2016 23:51, Graham King wrote:
# { c_\markup { \dynamic p \italic { dolce } }  Looks like a dynamic, 
walks like a dynamic, but doesn't quack like one.  Replace with { 
c-\omit\p_\markup { \dynamic p \italic { dolce } } Likewise for "meno 
f" and many other cases.
# { c1\sfz }  No this is not a dynamic, either.  Try:{ \tag #'pdf { 
c1\sfz } \tag #'midi { c4->\f ~ c2.\mf } } [note 1]


(the numbering renders quite badly now… this was nos. 5 & 6)

I have a stylesheet called ‘dynamic-custom.ily’, which is \included into 
‘standard-include.ily’, which I \include in virtually all my projects. 
It contains a bunch of lines like:


pDolce = #(make-dynamic-script (markup "p" #:normal-text #:italic "dolce"))

[equivalent to
pDolce = #(make-dynamic-script #{ \markup { p \normal-text \italic dolce 
} #})

]

\pDolce now creates a DynamicText grob instead of a TextScript grob, 
which is crucial, since only the former affects MIDI.
I guess you might do something similar for ‘sfz’, but without getting a 
proper rendition in sound, of course.


HTH, Simon

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


Re: Impossible or ambiguous (de)crescendo in MIDI.

2016-03-18 Thread Graham King
On Fri, 2016-03-18 at 00:13 +0100, Simon Albrecht wrote:

> Hello Graham,
> 
> On 17.03.2016 23:51, Graham King wrote:
> > # { c_\markup { \dynamic p \italic { dolce } }  Looks like a dynamic, 
> > walks like a dynamic, but doesn't quack like one.  Replace with { 
> > c-\omit\p_\markup { \dynamic p \italic { dolce } } Likewise for "meno 
> > f" and many other cases.
> > # { c1\sfz }  No this is not a dynamic, either.  Try:{ \tag #'pdf { 
> > c1\sfz } \tag #'midi { c4->\f ~ c2.\mf } } [note 1]
> 
> (the numbering renders quite badly now… this was nos. 5 & 6)
> 
> I have a stylesheet called ‘dynamic-custom.ily’, which is \included into 
> ‘standard-include.ily’, which I \include in virtually all my projects. 
> It contains a bunch of lines like:
> 
> pDolce = #(make-dynamic-script (markup "p" #:normal-text #:italic "dolce"))
> 
> [equivalent to
> pDolce = #(make-dynamic-script #{ \markup { p \normal-text \italic dolce 
> } #})
> ]
> 
> \pDolce now creates a DynamicText grob instead of a TextScript grob, 
> which is crucial, since only the former affects MIDI.
> I guess you might do something similar for ‘sfz’, but without getting a 
> proper rendition in sound, of course.
> 
> HTH, Simon


thanks Simon.  That looks very neat, and confers the additional
advantage of enforcing some stylistic consistency.  I'll investigate
further.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Impossible or ambiguous (de)crescendo in MIDI

2016-03-06 Thread Simon Albrecht

On 05.03.2016 01:04, Graham King wrote:

On Fri, 2016-03-04 at 13:33 -0600, Cynthia Karl wrote:

> 

I think I understand why these errors are generated. It would appear 
that \fz is not intended to be used as a dynamic - it is not 
mentioned in the NR. Nevertheless, is is defined as a dynamic script 
in the LP file dynamic-scripts-init.ly. Unfortunately, there is no 
corresponding entry in midi.scm to assign a “factor of total volume” 
for this dynamic, without which the midi performer is unable to do 
anything sensible.


It is possible you might get the results you want by rewriting the 
snippet as:


> music = \relative {
> c''2\p\< c |
> \tag #'pdf c1\fz\>
> \tag #'midi c1\f->\>
> c\p |
> }
>
> \score {
> \keepWithTag #'pdf \music
> }
>
> \score {
> \keepWithTag #'midi \music
> \midi {}
> }
>
Good idea; thanks for the suggestion.  I'll give it a try over the 
weekend, once I've worked out the ramifications for other tags in use. 


You’ll want to use
\tagGroup pdf.midi
and other tag groups for those you already are using.

Best, Simon

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


Re: Impossible or ambiguous (de)crescendo in MIDI

2016-03-04 Thread Graham King
On Fri, 2016-03-04 at 13:33 -0600, Cynthia Karl wrote:

> > 
> 
> I think I understand why these errors are generated.  It would appear that 
> \fz is not intended to be used as a dynamic - it is not mentioned in the NR.  
> Nevertheless, is is defined as a dynamic script in the LP file 
> dynamic-scripts-init.ly.  Unfortunately, there is no corresponding entry in 
> midi.scm to assign a “factor of total volume” for this dynamic, without which 
> the midi performer is unable to do anything sensible.
> 
> It is possible you might get the results you want by rewriting the snippet as:
> 
> >  music = \relative {
> >c''2\p\< c |
> >\tag #'pdf c1\fz\>
> >\tag #'midi c1\f->\>
> >c\p  |
> >  }
> > 
> >  \score {
> >\keepWithTag #'pdf \music
> >  }
> > 
> >  \score {
> >\keepWithTag #'midi \music
> >\midi {}
> >  }
> > 

Good idea; thanks for the suggestion.  I'll give it a try over the
weekend, once I've worked out the ramifications for other tags in use.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Impossible or ambiguous (de)crescendo in MIDI

2016-03-04 Thread Cynthia Karl

> Date: Wed, 02 Mar 2016 14:37:44 +
> From: Graham King <graham.k...@tremagi.org.uk>
> To: LilyPond Users <lilypond-user@gnu.org>
> Subject: Impossible or ambiguous (de)crescendo in MIDI.
> Message-ID: <1456929464.11804.791.ca...@oberon.tremagi.org.uk>
> Content-Type: text/plain; charset="us-ascii”
> 


> 2) The second problem arose when I finally tracked down one such error.
> Here's the minimal example:
> 
>  \version "2.19.35"
> 
>  music = \relative {
>c''2\p\< c |
>c1\fz\>%-\omit\mf |
>c\p  |
>  }
> 
>  \score {
>\music
>  }
> 
>  \score {
>\music
>\midi {}
>  }
> 
> 
> As it stands, this gives two of these error messages.  

I think I understand why these errors are generated.  It would appear that \fz 
is not intended to be used as a dynamic - it is not mentioned in the NR.  
Nevertheless, is is defined as a dynamic script in the LP file 
dynamic-scripts-init.ly.  Unfortunately, there is no corresponding entry in 
midi.scm to assign a “factor of total volume” for this dynamic, without which 
the midi performer is unable to do anything sensible.

It is possible you might get the results you want by rewriting the snippet as:

>  music = \relative {
>c''2\p\< c |
>\tag #'pdf c1\fz\>
>\tag #'midi c1\f->\>
>c\p  |
>  }
> 
>  \score {
>\keepWithTag #'pdf \music
>  }
> 
>  \score {
>\keepWithTag #'midi \music
>\midi {}
>  }
> 


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


Re: Impossible or ambiguous (de)crescendo in MIDI.

2016-03-02 Thread Simon Albrecht

On 02.03.2016 21:21, Graham King wrote:

On Wed, 2016-03-02 at 14:37 +, Graham King wrote:
Is there a magic spell to soothe lilypond in these circumstances?  It 
might seem like nit-picking, but there are so many of these errors in 
the score that they are obscuring other, more important, messages.

Brian Barker has kindly answered this part of the problem, off-list, with:

#(ly:expect-warning "Impossible or ambiguous (de)crescendo in MIDI")

which suppresses the messages, one at a time, and also provides a 
convenient way to mark their cause at source in the lilypond code. 


Even more convenient is writing
#(ly:expect-warning "Impossible")
which works as well.

Best, Simon

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


Re: Impossible or ambiguous (de)crescendo in MIDI.

2016-03-02 Thread Graham King
On Wed, 2016-03-02 at 14:37 +, Graham King wrote:

> Is there a magic spell to soothe lilypond in these circumstances?  It
> might seem like nit-picking, but there are so many of these errors in
> the score that they are obscuring other, more important, messages.

Brian Barker has kindly answered this part of the problem, off-list,
with:

#(ly:expect-warning "Impossible or ambiguous (de)crescendo in
MIDI")

which suppresses the messages, one at a time, and also provides a
convenient way to mark their cause at source in the lilypond code.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Impossible or ambiguous (de)crescendo in MIDI.

2016-03-02 Thread Graham King
I'm trying to eradicate numerous "Impossible or ambiguous (de)crescendo
in MIDI" errors from a large score, and two problems arise:

1) I'm finding it hard to locate the source of these errors.  So far,
I've tried:

  * searching the source for all dynamic changes ending with \! and
converting this to -\omit\mf (or some other suitable dynamic;
  * then sort-of-bisecting the problem by suppressing each part in
turn,
  * then visually inspecting the source for unterminated crescendos
and decrescendos.

But it is still not easy to run the errors to ground.
Is there some better tactic for locating their cause?  (I note some
previous discussion on this list[1], and issue 3945[2])

2) The second problem arose when I finally tracked down one such error.
Here's the minimal example:

\version "2.19.35"

music = \relative {
  c''2\p\< c |
  c1\fz\>%-\omit\mf |
  c\p  |
}

\score {
  \music
}

\score {
  \music
  \midi {}
}


As it stands, this gives two of these error messages.  If I try to
suppress them by uncommenting "-\omit/mf" I get the following errors in
addition:

5:10: warning: Two simultaneous absolute-dynamic events, junking
this one
  c1\fz\>
 -\omit\mf |
5:5: warning: Previous absolute-dynamic event here
  c1
\fz\>-\omit\mf |

Is there a magic spell to soothe lilypond in these circumstances?  It
might seem like nit-picking, but there are so many of these errors in
the score that they are obscuring other, more important, messages.

Notes:
[1] For example,
https://lists.gnu.org/archive/html/lilypond-user/2014-05/msg00648.html
{2} At the time of writing, this may be found at
https://sourceforge.net/p/testlilyissues/issues/3945/ 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Impossible or ambiguous (de)crescendo in MIDI

2014-05-31 Thread Javier Ruiz-Alma


Parsing...
Interpreting music...[8]
Preprocessing graphical objects...
Interpreting music...
programming error: Impossible or ambiguous (de)crescendo in MIDI.
continuing, cross fingers...



A line or bar number would be most helpful
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Impossible or ambiguous (de)crescendo in MIDI

2014-05-31 Thread Knute Snortum
This was discussed here:

http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tt162479.html#a162546

The long and the short of it was to put a dynamic mark in, like \mf, and
then \omit the text.  There was some agreement that LilyPond should assume
a dynamic of mf or handle this better.


Knute Snortum
(via Gmail)


On Sat, May 31, 2014 at 1:21 AM, Javier Ruiz-Alma jav...@ruiz-alma.com
wrote:

 
 Parsing...
 Interpreting music...[8]
 Preprocessing graphical objects...
 Interpreting music...
 programming error: Impossible or ambiguous (de)crescendo in MIDI.
 continuing, cross fingers...
 

 A line or bar number would be most helpful

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


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


Re: Impossible or ambiguous (de)crescendo in MIDI

2014-05-31 Thread Knute Snortum
I just noticed the last line of your post.  Yes, a line number to the
source would be nice.

I don't know if this issue ever got into issue tracking for LilyPond.  This
comment should be added if it did.


Knute Snortum
(via Gmail)


On Sat, May 31, 2014 at 6:55 AM, Knute Snortum ksnor...@gmail.com wrote:

 This was discussed here:


 http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tt162479.html#a162546

 The long and the short of it was to put a dynamic mark in, like \mf, and
 then \omit the text.  There was some agreement that LilyPond should assume
 a dynamic of mf or handle this better.


 Knute Snortum
 (via Gmail)


 On Sat, May 31, 2014 at 1:21 AM, Javier Ruiz-Alma jav...@ruiz-alma.com
 wrote:

 
 Parsing...
 Interpreting music...[8]
 Preprocessing graphical objects...
 Interpreting music...
 programming error: Impossible or ambiguous (de)crescendo in MIDI.
 continuing, cross fingers...
 

 A line or bar number would be most helpful

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



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