Page 2 of 2
Re: Timing accuracy in VM.
Posted: Tue May 02, 2023 3:31 am
by Centripidity
Lots of great, helpful information here. Thanks to all for your assistance. This has cleaned up my act considerably, timing-wise.
Peter
Re: Timing accuracy in VM.
Posted: Tue May 02, 2023 2:42 pm
by Steve W
I have no knowledge of audio timing issues in VM, however I have had major issues with trying to synchronize midi with VM. With everything I tried it seems that VM cannot be reliably synced to incoming midi timing bytes. So, with the current discussion I have been wondering if there's something in the design of VM that causes the problem and if there are VM coding solutions that can be done to make VM's handling of external midi timing bytes more stable.
I am familiar with using interrupts to capture midi data and to process it, but I have no idea if Java and VM have mechanisms for handling and prioritizing incoming midi data. I figure maybe those of you who understand timing issues in VM and the importance of timing accuracy might have some insights on this.
Thanks.
Re: Timing accuracy in VM.
Posted: Tue May 02, 2023 4:27 pm
by ColinP
Hi Steve, yeah when I've looked at MIDI and VM syncing it's been problematic too.
I suspect the main issue is that audio and MIDI streams are buffered separately with little coordination.
MIDI events arrive in a queue with no timestamping so although they are in the correct order and reletively recent there's no way for devs to know exactly when they originated.
The only thing that might help is to run VM with the smallest audio output buffer you can possibly get away with.