Re: MIDI Tracks and Sequences

James,

The deviations aren't really that disturbing; the disturbing part is that
from the timestamps, I'm guessing the actual sendMessage is taking a long
time.  As per last message, I would suggest moving the updates of
domhrtRelativeTime and delay inside the loop, and log the
webkitPerformanceNow time (and delay) just before the call to setTimeout().
 In fact, I'd just track the time it's taking to call sendMIDIMessage()
first - I think that's what's causing the issue.  But I can't tell without
seriously debugging, and as I mentioned, Jazz isn't working for me anymore
(at least, not on the machines I have handy).


On Mon, Sep 17, 2012 at 1:50 AM, James Ingram <j.ingram@netcologne.de>wrote:

> Hi Chris,
>
>
> You said:
>
>>  when delays are implemented you should be setting the msg.timestamp in
>> each message to += domhrtTimeAtStartOfPerformance**.
>>
> immediately before the output.sendMIDIMessage(msg) call.
>
> and -= domhrtTimeAtStartOfPerformance immediately afterwards (before the
> msgIndex++), otherwise the sequence gets corrupted for the next performance.
>
> I've uploaded the correction as Test 8 [1] so that it doesn't get lost.
>
> I've run test 8 twice.
> Run 1: crashed after about 2 minutes with a deviation of 1563ms (!).
> Run 2: ran to completion (timestamp 349800), exhibiting the same erratic
> behaviour as in test 7, and ending with the same repeating pattern. The
> last 4 deviations were 305, 255, 205, 155. Maximum deviation for the whole
> run was 313ms (at timestamp 345450).
>
>
>          Things like this is why we need native implementations of the
>>         MIDI API.
>>
>>     Any chance of that happening in the near future?
>>
>>
>> Well, obviously that's why I'm pushing this API along.  But I don't have
>> any announcement there; still looking for a webkit implementer.
>>
>
> Best of luck! :-)
>
> greetings,
> James
>
> [1] http://james-ingram.de/tests/**JazzMIDIBridge/ji-known-**
> sequence8.html<http://james-ingram.de/tests/JazzMIDIBridge/ji-known-sequence8.html>
>
> --
> www.james-ingram-act-two.de
>
>
>

Received on Monday, 17 September 2012 16:45:49 UTC