bug-lilypond
[Top][All Lists]
Advanced

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

Re: Going back in MIDI time error: disappeared?


From: Colin Hall
Subject: Re: Going back in MIDI time error: disappeared?
Date: Sun, 13 Jan 2013 20:07:10 +0000
User-agent: mu4e 0.9.9.5-dev6; emacs 23.3.1

Federico Bruni writes:

> Il 10/01/2013 08:01, David Kastrup ha scritto:
>> Colin Hall <address@hidden> writes:
>>
>>>> Finally, can you confirm that the string "Going back in MIDI time" is
>>>> not present in the .pot file? Why?
>>>
>>> I understand that your query about the pot file is a non-bug because
>>> such messages are not translated. So, no bug to report there.
>>
>> While it is true that "programming error" messages are not translated,
>> they are produced for situations indicating, well, a programming error,
>> as feedback for LilyPond developers that something in LilyPond is wrong.
>>
>> Now in this case, nothing in LilyPond is wrong, but rather in the user
>> input, as the user asks for something that does not fit into Midi.  And
>> the user input is not juggling around with LilyPond internals in an
>> unexpected way, making it become internally inconsistent.
>>
>> As a result, a user-comprehensible _warning_ should be produced instead,
>> and "user-comprehensible" then also would imply that it is being marked
>> for translation.
>>
>
> Should this be added to issue 1412?
> http://code.google.com/p/lilypond/issues/detail?id=1412

Not sure. The analysis from Carl Sorensen which you linked from the 1412
tracker is useful:

http://lists.gnu.org/archive/html/lilypond-user/2010-07/msg00163.html

He identifies that engraving and MIDI differ fundamentally in respect of
grace notes and presents a manual workaround in that post.

A fuller MIDI implementation in Lilypond would automate the problem of
rendering acciaccaturas at the beginning of a piece.

The code that produces the programming error message is here:

void
Midi_walker::output_event (int now_ticks, Midi_item *l)
{
  int delta_ticks = now_ticks - last_tick_;
  last_tick_ = now_ticks;

  /*
    this is not correct, but at least it doesn't crash when you
    start with graces
  */
  if (delta_ticks < 0)
    {
      programming_error ("Going back in MIDI time.");
      delta_ticks = 0;
    }

  track_->add (delta_ticks, l);
}

> It's not clear to me what that issue is really about (title is too
> generic).

I'm guessing that issue 1412 was created with the aim of eliminating the
programming error.

With the MIDI rendering implementation we have now, David Kastrup is
correct; the message should be a user warning and it should be added to
the translations. This is distinct from both your doc enhancement and
the 1412 tracker which is about extending the MIDI rendering
implementation.

So I suggest a new doc enhancement tracker for this one.

Cheers,
Colin.

-- 
Colin Hall



reply via email to

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