Requesting help for a script: Copy a selection across a track and keep the audio in sync.
Hi @Kitch
I kindly ask for help with a new script for a workflow i want to set up.
I have two tracks. The first ist completly rendered with Mouth Deklick.
The second Track is the original File.
Now i want to replace a portion of the deklicked Track with audio from the original File.
The two tracks are grouped and i am in shuffle mode.
The steps are:
- make a waveform selection
- seperate it with keyboard command b
- ungroup the tracks with cmd + shift + g
- change from shuffle two slip
- select the new selection with the grabber tool on the second track
- drag and drop it to the frist track while holding control + option to keep it in sync
- group the tracks again with cmd + shift + g
- change from slip to shuffle
I managed steps 1 to 4 with makros but i don’t get step 5 and 6 to work.
I made a video to make the workflow more clear.
https://1drv.ms/v/s!AtFp95uPV6S1gY9GgRGtgP4z1V8F1Q?e=PKfglk
Thomas
- Chris Shaw @Chris_Shaw2021-09-27 18:17:42.547Z
You're on the right track. Instead of trying to drag the clip from one track to another just copy the selection, select the destination track and then paste.
You're video link doesn't work for me so I went by the workflow you posted:
// Get Track Names const origSelectedTracks = sf.ui.proTools.selectedTrackNames; // Separate clip sf.ui.proTools.menuClick({ menuPath: ["Edit", "Separate Clip", "At Selection"], }); // Suspend Groups sf.ui.proTools.mainWindow.buttons.whoseTitle.is("Group List pop-up").first.popupMenuSelect({ menuPath: ["Suspend All Groups"], }); // Slip Mode sf.ui.proTools.editModeSet({ mode: "Slip", }); // Select Second track sf.ui.proTools.trackSelectByName({ names: [origSelectedTracks[1]] }); // Brief pause sf.wait({intervalMs:50}); //Copy Selection sf.ui.proTools.menuClick({ menuPath: ["Edit", "Copy"], }); // Select First Track sf.ui.proTools.trackSelectByName({ names:[origSelectedTracks[0]] }); // Brief pause sf.wait({intervalMs:50}) // Paste onto first track sf.ui.proTools.menuClick({ menuPath: ["Edit", "Paste"] }); // Turn on Groups sf.ui.proTools.mainWindow.buttons.whoseTitle.is("Group List pop-up").first.popupMenuSelect({ menuPath: ["Suspend All Groups"], }); // Shuffle Mode sf.ui.proTools.editModeSet({ mode: "Shuffle", });
Kitch Membery @Kitch2021-09-27 18:56:30.156Z
Nice one @Chris_Shaw :-)
Thank you!
- TIn reply toThomas_Rombach⬆:Thomas Rombach @Thomas_Rombach
Works perfect. Thank you very much Chris. That helped a lot.
I will study your script to improve my skills with soundflow. - TIn reply toThomas_Rombach⬆:Thomas Rombach @Thomas_Rombach
The script is running into a issue on a mac mini M1 with pro tools 2021/12. I don't know if this constellation is the reason but on intel imac with pro tools 2021/7 everything works finde.
Error Code is:Expected String but got Undefined (Outlander line20)
I aprreciate your help.
- TThomas Rombach @Thomas_Rombach
I still have the problem with the Script
(Expected String but got Undefined (line20)I am on Pro Tools 2022.12
Kitch, could you please help. I am working on large project an need the script very urgent.
Christian Scheuer @chrscheuer2023-05-26 11:57:53.707Z
cc @Kitch
- In reply toThomas_Rombach⬆:
Kitch Membery @Kitch2023-05-26 16:51:05.152Z
Hi @Thomas_Rombach,
I think I know what is causing the issue. Have you got "Link Track and Edit Selection" enabled in Pro Tools? If "Link Track and Edit Selection" is not enabled the script will display the error you are seeing.
The button in Pro Tools looks like this.
You can also enable "Link Track and Edit Selection" from the Pro Tools "Option" menu.
- In reply toThomas_Rombach⬆:
Kitch Membery @Kitch2023-05-26 16:53:27.523Z
Let me know if the issue persists, and if so I'll take another look :-)
- TIn reply toThomas_Rombach⬆:Thomas Rombach @Thomas_Rombach
Your tip was great. It solved the problem. Thank you for your fast support.