How to share one proxy across multiple identical WaveAudioClip

Hey there

I’m trying to figure out the best approach to share time-stretched proxies.

Multiple identical WaveAudioClips across a timeline. If I time stretch them all identically, a proxy generation job will start for each clip even though the results will also be identical.

What’s a good way to handle this?

I was thinking of using wavClip->getPlaybackFile().getFile() from the first generated proxy, and somehow setting this file to each of the identical wavClips, but it’s not obvious to me how to do that.

A stupid way I contemplated is to delete all the identical clips having stored their start/end points, except one. Then generate one proxy. And finally recreate copies of this new proxied-up clip to where the old clips used to be. This seems kind of insane though.

Any thoughts please?

Many thanks and best wishes

Jeff

To be honest I just wouldn’t worry about this.
It done the way it is because there are so many things that can affect a time-stretched proxy (clip length/offset, file start/end, loop start/end/offset, time sig, tempo change, key sig, time stretch algorithm, clip loop info etc). You’d have to make sure that all of these are identical to avoid accidentally using the same proxy for files that needed separate ones.

The correct way to do it would be to ensure the proxy hash is comprised of only data that can affect the proxy contents. That would require hashing the tempo/pitch/key changes for the edit range the clip takes. That way, the same proxy could be used for multiple clips.

But honestly, it would be easier to just not worry about it.
Hopefully this year we’ll add a mode to avoid creating creating proxies and do everything at process-time. That obviously trades off CPU use against pre-rendering time and disk space.

1 Like

Hey @dave96 thanks for the reply. That sounds very promising re: what might be coming later this year. And yes I take your point about things needing to be identical for the proxy sharing to work. The hash idea is neat. In my rather simplified use case I can make some pretty crude assumptions so I’m risking it for now and it seems to be working fairly nicely - for now.