Accessing Defined Latency of Device

Peter Kyme's icon

Hi,

I want to create a Max for Live device which allows for a small amount of negative delay, so I plan on using the 'Defined Latency' setting in the patcher inspector to allow for Live to compensate.

I'd like to avoid hard coding a buffer size in different places of the patch though, so I need to access the value of this parameter in the patcher. However I can't find a means of accessing these global patcher parameters.

Does anyone know if this is possible?

Thanks!

double_UG's icon

Max Patch
Copy patch and select New From Clipboard in Max.

Peter Kyme's icon

Fantastic, that works perfectly. Thanks a lot!

Peter Kyme's icon

I've run into an issue with the above method for setting the device latency dynamically. It looks like on device load the latency doesn't get set properly (or it's reset to the default for the patcher). So in Live the device reports zero latency. Once you trigger an update it's then set correctly.

If anyone has any ideas to work around this that would be useful.

Peter Kyme's icon

Also, the above snippet shows how to set the latency, but how would you query the same value?

Peter Kyme's icon

Fixed - I just needed to deferlow the latency call.