A form’s latency()
identifier can now be updated in realtime. The form
widget has a channel automatically set up named ‘form’. The code shown below updates the plugin latency in realtime with a slider that jumps in integer increments from 1 to 8. Updating a plugin’s PDC in real time may not be supported by some plugin hosts.
instr UpdateLatency
kLatencySliderVal, kLatencyTrig cabbageGetValue "latencySlider"
cabbageSet kLatencyTrig, "form", "latency", pow(2, kLatencySliderVal)
printf "Setting latency to %d\n", kLatencyTrig, pow(2, kLatencySliderVal)
endin