Just found something that could be useful.
Take a look into the MidiSystem and get hold od an MidiDevice through the MidiDevice.Info class. In it yuo’ll have getMicrosecondPosition().
here’s what it says:
public long getMicrosecondPosition()
Obtains the current time-stamp of the device, in microseconds. If a device supports time-stamps, it should start counting at 0 when the device is opened and continue incrementing its time-stamp in microseconds until the device is closed. If it does not support time-stamps, it should always return -1.
Returns:
the current time-stamp of the device in microseconds, or -1 if time-stamping is not supported by the device.
anyone tried it?