ear-production-suite
ear-production-suite copied to clipboard
Shared AudioTrackUIDs create multiple MediaItems on import
At the moment, the EPS creates a new REAPER media item for each audioTrackUID/AudioObject combo. This means that on export, that sharing is lost and you get multiple tracks for essentially the same audio. If would be better if each AudioTrackUID is only represented by one media item in REAPER.
A potential way to do this;
- For the most part, import as normal (media item on the same track as the input plugin)
- If AudioObjects share the same AudioTrackUID, we have multiple input plugins on the same track, with one media item on it. Routing parameter is the same for both input plugins and this is how the scene can detect that the media is the same.
Some things to consider;
- Some of the code may use the routing parameter to identify a plugin/object - this won't work if "routing" sharing is allowed.
- If the user places a plugin between the two input plugins on a track, then the user may consider that the audio is no longer the same for each object - however it effectively is since the scene is fed the audio after ALL plugins in the chain on the feeding track.
Another solution (which wouldn't be recommended);
- The import process is as it is now. A media item on an individual track with a unique input plugin. Although there are 2 media items, the source file is actually the same - the extension can look this up. However, the scene can't and it is the scene that creates the ADM structure. Also, the user might manipulate one track to make it different to the other (e.g, envelope on it, fx plugins, trim, loop, add more items after it) - we can detect that too, but it just gets messy and likely to introduce bugs.
Tagging @rsjbailey for opinions
On the last solution (one source file, 2 media items): Since we updated JUCE, it's fairly easy to add REAPER API extensions to the scene plugin - as this would only affect export, which relies on the extension anyway, it shouldn't reduce DAW compatibility at all (so long as we don't assume that the relevant functions are actually present)
Closed by #223 and tag/release v0.8.0-EPS-beta