mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-10 04:09:58 -06:00
Converting clip gain to volume (and baking volume into clip gain) evaluated the clip's gain envelope by walking it from the start for every breakpoint being converted, so a large envelope in an opened or imported session cost envelope points squared and blocked the engine. Build a running-maximum index over the envelope once per clip and binary-search it. It returns exactly what the walk returned, including for envelopes stored out of order.