PDA

View Full Version : Little off-topic: MIDI-handling in Windows-applications



Tobias Erichsen
11-14-2006, 03:16 PM
Hi everyone,

I know this is not strictly a sample-library-question, but since there
are quite a bit of knowledgeable people even in the more technical
areas around, I thought this might still be a good place:



I'm currently writing a virtual MIDI-driver that is networked.
To balance out possible jitter due to the networking I was
thinking about forwarding timestamps (created at the sender)
to the receiver's application in the MIDI-driver's DATA-callbacks
(MIM_DATA & MIM_LONGDATA) so far I always set them to "0".

Has anyone any experience on how many applications use those
timestamps (for recording-purposes) to spot the MIDI-event
at the exact point in time in the midi-file... or do you guys
think that the whole thing is not worth the effort, since no
applications use this data anyway...

Obviously for "realtime"-play, those timetags don't make any sense.

Best regards,
Tobias

Mahal
11-14-2006, 05:50 PM
Hi Tobias,

I don't know the answer, but find the question interesting. Why don't you try to answer it in an empirical way: With your code, you should be able to send exactly identical MIDI-data to your sequencer of choice. So do that one time with constant timestamp, the other time with optimal timestamp, and a third time with (i.e.) every second timestamp good, but the rest as if they were deliverd some 20 milliseconds too late.

Compare the results and tell us what you have found out :)

Greetings from Osnabrück
Marc

Tobias Erichsen
11-15-2006, 01:14 AM
As I only have Cubase SX 2.2 available to test, that one sample
would not really be enough to serve for a statistical analysis ;-)

Tobias

dewdman42
11-15-2006, 08:41 PM
Hi Tobias, I recognize your name from somewhere. I think if you can send timestamps you should. It is true that many people will just be using real time anyway and it won't matter TOO much. However, if you are sending, for example, midi controller input over the network with the intention of having it record that midi note into a track at the other end, then the timestamp can ensure that the recorded midi note lines up with the time the key was struck on the midi controller, not the time it was received at the other end. Sooner or later someone will wish you had that...though admittedly, I suspect most people wll be using it to send midi from a host sequencer over to VST plugins running on another machine or something like that.

Tobias Erichsen
11-16-2006, 04:01 AM
Hi Tobias, I recognize your name from somewhere. I think if you can send timestamps you should.

Hi,

I really don't know where you'd recognize my name from, apart from
possibly having used my ASIO2KS driver...

Concerning the timestamping, I have also received some similar answers
for my post on kvr-audio. So in fact I'm currently working on putting the
correct timestamps into the driver...

Thanks for your response...

Tobias