Quote:
Originally Posted by eugen2777
Hello. I had questions about the delay compensation for MIDI.
When I use pdc_midi, the compensation(for MIDI) does not depend on the pdc_delay. And is always a multiple of the size of the block.
For example, if blocksize = 128:
pdc_delay = 20, in any case it will compensate 128;
pdc_delay = 130, in any case it will compensate 256;
1)This is normal?
2)Well, if this is normal, Is it possible to always have the correct value?
Currently I am using samplesblock - but this is obviously not always give the correct result(rare, but possible).
real_midi_compensation = ceil(my_val_smpls/samplesblock)*samplesblock;
Are there other, better way?
|
Hi!
Yes, I'm pretty sure that's normal. I guess it's necessary to keep block boundaries aligned, so there is a limited granularity in that sense.
You may know this, but you can always check the live expected vs actual PDC results in the plugin window here:
If there's a difference between the two values it should should up. Or is that how you found out about the difference to begin with?
I think you're on exactly the right track. You should be able to compensate for it using a trick along the lines of what you plan on doing, either setting the pdc_delay to a nice "round" number, or what I usually do: nudging outgoing event offsets by the discrepancy, typically maintaining an event queue to help with crossing samplesblock boundaries. Good luck!