[wdmaudiodev] Re: MIDI Capture Timestamping

  • From: BlazeAudio Developer <developer@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx, wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2003 14:58:36 -0700

Thanks Mat! That's what I ended up using - an offset.

Thanks.
Devendra.

At 06:06 AM 8/6/2003, Mathieu Routhier wrote:

Well, just like I said, if you know that the note you just received was generated 20 ms before the current time, get the current time through your master clock and subtract 20 ms from this value.  This will have an effect on the timestamp the application receives.  Your note will be received by the application right after you call PutMessage() but the timestamp will be correct.  Therefore, if an application handles the timestamps, it will consider your note as if it arrived 20 ms before but if it ignores it, it will use the note at the moment it receives it.

 

Mat

 

-----Original Message-----
From: BlazeAudio Developer [mailto:developer@xxxxxxxxxxxxxx]
Sent: Tuesday, August 05, 2003 5:26 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: MIDI Capture Timestamping

 

Mat,

Here's a simple explanation of why I want to use another clock.

The MIDI data we receive comes in a "large" buffer (can be 2 to 20 milliseconds), and it comes every 2 to 20 milliseconds (depending on the buffer size). However, the buffer contains both midi data as well as the actual time it was received by the hardware - in other words, the hardware timestamps the data.

If we simply use the master clock - then all the data that came in the last (say) 20 milliseconds will appear to the application as coming in "now" - we want to avoid that.

Can you suggest another technique for timestamping this data for DMusic?

Thanks.
Devendra.

At 02:00 PM 8/5/2003, Mathieu Routhier wrote:


The master clock is provided to you as a reference clock.  When the note
comes in from your hardware, the time stamp should be relative to this clock
depending on how you want it time-stamped (how long before or after the
current time, if that applies).  Why do you need to use another clock?

Btw, lately, we had to debug our midi input port timestamps because of a
problem we noticed with sonar: there seems to be an increasing skew between
the application clock and the midi timestamps.  The longer the application
was opened, the longer it took for a note to be processed by the
application.  Restarting the application reset the skew.  When the
application was configured to ignore the timestamps, the problem
disappeared.  We finally found out that the problem was in the application's
way to handle the timestamps.  Apparently Cubase has the same problem.

I suppose some of you already dealt with this (or at least heard about this
issue).  I was wondering if there was something you'd like to add to the
discussion.

Mat

-----Original Message-----
From: BlazeAudio Developer [mailto:developer@xxxxxxxxxxxxxx]
Sent: Tuesday, August 05, 2003 3:09 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] MIDI Capture Timestamping

Can anybody tell what the ullPresTime100Ns in DMUS_KERNEL_EVENT is supposed
to be?

It's in 100 ns units - but is it the absolute system time or is it relative
to some other event.

We have a MIDI capture driver(portclass miniport) where we cannot just use
the MasterClock object provided in IMiniPortDMus::NewStream call.

Thanks.
Devendra.
******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/
****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/
****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/

Other related posts: