Hello,
I am looking for a method to “synchronize” two clips.
Let me explain : I would like to implement an editor of the audio clips.
Such an editor lives in a context where there is a preview Edit ( different from the main edit ) that I use precisely to have an independent transport and perform the preview.
In such a clip editor I would like to implement all the manipulation functions of the audio clip : loop start/end , warp markers etc…
When I select an audio clip from the main editor through the selection manager I create a preview edit that creates me a new audio clip from the selected clip file.
Two questions :
How can I quickly set all the properties of the selected clip to the new clip created in the preview editor ?
When I change some properties of the new audio clip how can I then update the one in the main edit ( thus creating a synchronization mechanism ) ?
I really like how such a mechanism was implemented in Waveform and would like to get to something similar.
I hope someone can help me.
Thanks again.
Not exactly sure if it’s between two different Edits but you might wan to look at Clip::setLinkGroupID, that links two clips contained in a single Edit.
What exact feature of Waveform are you referring to though? You might want to check out Edit::createEditForPreviewingClip, that’s what we use when you double click a clip in Waveform.
Yes, this.
When I double-click a clip in the main edit, I create a previewEditForClip…
The problem is:
The previewEditForClip will create a new audio clip ( NEW_CLIP ) from the past one ( OLD_CLIP ), so in the editor I change the NEW_CLIP.
But if, for example, I set the numerator of the NEW_CLIP from 4 to 5, the numerator of the OLD_CLIP must also be changed with the new value, so I have to synchronize the two clips, otherwise if I double-click again on the OLD_CLIP a NEW_CLIP will be created with numerator = 4 and not 5.
In general I would like to know if there is a method to constantly keep 2 clips belonging therefore to different edits synchronized
I think so, but I don’t fully understand what you’re trying to achieve and how it’s different to our previewing… Does it have to be two different Edits, could you just temporarily mute all the other tracks whilst you’re previewing a single clip?
The problem is not the preview.
In general when i double click on a wave click on the main edit i create a preview edit with a new clip starting from the clip in main edit.
So now i have 2 different clips ( one in the main edit and the other one in the preview edit ).
When i change some properties in the clip in the preview edit ( for example i change the loop start/end ) i want that even the clip in main edit reflects these changes, so i want to keep them sync between each other.
But I’m not sure why you need to create a new Edit for this? Just play back the main Edit with everything else muted? That’s probably what I’d do now in Waveform if we were doing the feature again.
Looking at Waveform we noticed that, for example, by modifying the WARP Points we have a different behavior between the editing clip and that of the main arrangement. In particular, on the first it seems that the use of the Proxy is disabled while on the second it doesn’t… hence the idea of using two different objects
As I could see, these are two different clips, the first in the main edit (Photo 1) and the second in the preview edit (Photo 2).
In fact, if you edit a warp marker in the audio editor, the clip in the audio editor will perform the warp in real time, while the one in the main edit will use a proxy.
So I would like to understand if these are two different clips (one with proxy = false and the other with proxy = true) or if they are the same clip.
Ok, I thought you were referring to the preview that happens when you double click a clip and you get two arrows playing back just that clip.
Your screenshot just shows a visual editor, there’s no playback synronisation there, it just directly edits the clip’s warp markers and draws the waveform.
Yes, but when i move a warp marker in the visual edit, it triggers the proxy regeneration on the first clip ( the one in the main edit ) while updating in real-time the clip in visual editor.
So, forgetting about the playback , in the arrangement and in the visual editor i’m watching the same clip ? or are they two different clips?
The second one (in the lower properties panel) isn’t a clip at all, it’s just a UI editor. It just takes a reference to the Clip in the Edit and allows you to edit the warp markers. We just redraw the thumbnail as the state changes, no proxies or anything, just directly using the warp markers.