apohl79 / audiogridder

DSP servers using general purpose computers and networks
https://audiogridder.com
MIT License
761 stars 79 forks source link

Latency + Compensation - Full chain latency = set # #1345

Open apohl79 opened 6 months ago

apohl79 commented 6 months ago

Discussed in https://github.com/apohl79/audiogridder/discussions/1344

Originally posted by **MythicalCheese** March 6, 2024 It would be extremely useful in combatting DAW delay compensation issues and limitations if you could **set it so that AG's total (combined) latency is 1024, 2048, etc. instead of the current situation where it only adds that amount**. Sometimes things get unaligned. When having various amounts and types of plugins, and audio going through various levels of auxes and sidechains, internal Delay Compensation (DC) doesn't do a perfect job. This is often due to the complex routing of things rather than exceeding the DC limit. One thing I often do to cut overall latency down is to disable DC on my last bus ("Mix Bus"). I could go a step further and disable DC on all the (Group) auxes that are specifically one level lower in the full chain, but since these auxes usually have different latencies, it's extremely easy to do this wrong, especially considering the fact that the latency differences are constantly changing. **If AG had it so that it gave a _varying_ amount of additional latency to make it so its chain's output is at a _set_ amount of latency,** we could make it so that each of these Group auxes (the ones directly before Mix Bus) could have, say, 2 instances of AG with the auxes' latencies all being the exact same amount. This would greatly help prevent misalignment of audio. **Example scenario:** Say that the AG instances on each aux on this level are set to a _combined_ (including plugins) latency of 2048 samples. One particular instance has Plugin A contributing 600 and Plugin B contributing 1400. Together they make 2000 and then AG adds 48 to make the output's latency 2048 samples. In another AG instance on a different aux, that Plugin A could have 200 and then no following plugins. So AG would add 1848 to make the combined output latency to be 2048 samples. This concept would be the same on each AG instance. If each aux in this level has an instance of AG, with AG hosting all of any particular aux's plugins, then each aux would have a combined total latency of 2048. In this case, everything would line up perfectly, so you could turn off DC on these auxes/this level without things getting unaligned at all (saving yourself from the DAW's DC limit). ^This is a very straightforward and simple scenario. But users usually don't want many plugins on one instance of AG, so just imagine this same scenario but with more instances of AG hosting highly variable amounts of plugins and their latencies. If AG worked like I just laid out, then the auxes would still all have the same amount of latency and line up perfectly (assuming they each have the same amount of AG instances or combined latencies). Again, you could turn off DC for these auxes and save yourself from DC's limit and its other issues.
Kramer2025 commented 2 months ago

I am exactly at this point with many sub routings, parallel chains, sidechains and so on. While playback is done perfectly, when it's time for rendering , chaos emerge... Maybe seconds of latency in some groups.

This happens only in FL Studio for me, when i ve tried the exact same mix at reaper, it was using 50% less resources and it was aligned perfectly.

I am trying to experiment with fixed buffers but ain't much helpful either.