Feature: the option to "gradually freeze" tracks during the course of normal playback.
-----------------------------
Problem: I use a sampled orchestra synth on a 3-year-old machine, and it sometimes struggles. I end up freezing / rendering-and-muting sections of the orchestra depending what I'm working on, but I'm blocked/idle during each freeze/render.
However, it's possible to mute a track, and un-mute it later - even in the middle of playback. With the right settings enabled, this stops all processing on the track (or at least stops sending MIDI notes to synths).
Solution: If you monitored the output of a track, you could identify sections of output with sufficient silence at either end. You could cache this result, and essentially mute/unmute the track during the starting/ending silence, replacing the output with the cached audio.
All cached sections would be removed when the user does anything that might invalidate the cached result. There should be an option for whether these cached sections are used for proper freeze/render or not.
Caveats/Extensions: This is not a proper freeze, because we have not unloaded the effects (so it reduces CPU but not memory use). The user may or may not want to upgrade this to a proper freeze if our cached regions span the entire project length.
-----------------------------
Possible details:
Start caching - tracks are eligible if:
- The user has enabled caching for this track
- Track is not record-armed (or receiving from record-armed track, etc.)
- Track has not been "touched" recently (basically any interaction/edits/solo)
- Track's output has been silent and MIDI-free for some interval (e.g. 3s) or since the beginning of project playback, whichever is closer
It might only attempt to cache one/N tracks at a time, and it should try different ones each time. It might bias towards caching tracks with higher CPU use first.
Stop caching
Tracks that are currently attempting to cache would continue saving their output (audio + MIDI) until playback stops or user changes the playback position.
When playback stops/changes, tracks take the longest section of their saved output that ends in a suitable amount of silence (e.g. 3s), and save this as a cached region.
Using cached sections
When entering playback of a cached section, if the output is currently silent and MIDI free, processing of the track is halted (in the same way as when muting), and the output is replaced with the cached output. If the output is not silent/MIDI-free, the cached section is discarded.
As playback leaves the cached region (during the silent crossover section), or when the user modifies the track, processing of the track is re-enabled and normal output is resumed.