Hi. I want to create a script that would be super useful within scenes like phone conversation with many cuts between two different places. I'd like to cut selected clip or clips (room tones) between markers, then jump to beginning, delete every second clip and finally create fades . Then I would run the same script on room tone for the other character and have the job done:)
I'm Soundflow beginner and I don't know JavaScript so I have to ask how can I make Soundflow "remembers" selection start/end timecodes in Pro Tools and then compares it with current TC? I'm thinking about script that is repeating "ctrl+tab, ctrl+tab, delete" after cutting given selection between markers or by picture cut track. It should stop when it reaches selection end timecode.
- Christian Scheuer @chrscheuer2019-12-13 16:42:38.495Z
Hi Filip!
Thanks for posting this very interesting question.
As a SoundFlow beginner in your own words, starting out with a rather complicated workflow like this may give you a mixed experience, but if you bear that in mind, I think it can give you valuable insight into how SF works.There a many different ways to approach this, but one would be:
- Ask user for the marker number to start at and the marker number to end at
- Now use the SF functions for selecting between markers, and delete content every other place.
This would be fairly easy to implement.
A different way to implement it would be:
- Split clips by markers in selection
- Now iterate through each clip (SF has a function for that which takes care of timecode etc itself) and delete every other one.
This is a little more complicated than the first approach given current functionality in SF, so I would go for the first approach to get something up and running quickly.
If you agree that that approach would suit your needs, we could take a look at how to implement it.
- FIn reply toFilip_Krzyzykowski⬆:Filip Krzyzykowski @Filip_Krzyzykowski
Hi Christian!
Thank you very much for such quick response:)
I was thinkg about the most versatile way so user doesn't have to check marker numbers and doesn't have to create markers at all when picture cut track was prepared by dialogue editor. I can make Soundflow show only selected tracks and picture cut track, then switch to Clips/Markers grid, then click menu item Edit/Separate Clip/On Grid with given clip selected in Pro Tools.
On the other hand I have to trust you when you're saying that the way with asking user for marker numbers would be your choice to achieve the final result easier and faster.Christian Scheuer @chrscheuer2019-12-13 17:04:06.795Z
We can definitely approach it without markers and just use a picture cut track.
That's even simpler :) I thought the markers were meant to be the source input, so that was assumed in my responses.We can use the action to iterate through all selected clips and then for each 2nd clip in the top track delete the content on the bottom track.
- FFilip Krzyzykowski @Filip_Krzyzykowski
Now I realize that two scripts would be the most versatile way. One for simple situation when picture cut represent the actual number of cuts during the whole scene, let's say, phone conversation. The second case is when I have to create markers beacause there are more picture cuts than actual "jumps" between characters during the scene.
Christian Scheuer @chrscheuer2019-12-13 17:17:40.230Z
Ok :) Which one should we start out with?
- FFilip Krzyzykowski @Filip_Krzyzykowski
The one you find easier:)
- In reply tochrscheuer⬆:FFilip Krzyzykowski @Filip_Krzyzykowski
Hi @chrscheuer , there has been a long time and I want to ask if you have time to help with this script.
Christian Scheuer @chrscheuer2020-03-19 01:18:19.296Z
Hi Filip.
Apologies for the late reply.
You can use this script as a starting point:/* Configuration */ const DELETE_ODDS = true; //set to false to delete even const CUT_TRACK_NAME = "CUT_TRACK"; /* SCRIPT */ var clipIndex = 0; var originalTrackName; function processClip() { var isOdd = (clipIndex % 2) != 0; if (isOdd === DELETE_ODDS) { try { //Go to Original Track sf.ui.proTools.trackSelectByName({ names: [originalTrackName], deselectOthers: true, }); //Center, just for making sure PT registered the track change sf.keyboard.press({ keys: 'left' }); //Cut selection sf.ui.proTools.getMenuItem('Edit', 'Cut').elementClick(); } finally { //Finally go back to cut track sf.ui.proTools.trackSelectByName({ names: [CUT_TRACK_NAME], deselectOthers: true, }); } } clipIndex++; } function main() { originalTrackName = sf.ui.proTools.selectedTrackNames[0]; sf.ui.proTools.trackSelectByName({ names: [CUT_TRACK_NAME], deselectOthers: true, }); try { sf.ui.proTools.clipDoForEachSelectedClip({ action: processClip, }); } finally { sf.ui.proTools.trackSelectByName({ names: [originalTrackName], deselectOthers: true, }); } } main();
Christian Scheuer @chrscheuer2020-03-19 01:20:21.534Z
You can see it in action here:
https://youtu.be/j40JUQ0CIigTo use:
- Have a cut track in your session named "CUT_TRACK"
- Select the track with your content on and which time range should be processed
- Run the script.
- In reply tochrscheuer⬆:OOwen Granich-Young @Owen_Granich_Young
Ok I've tried a number of ways but I can't for the life of me figure out how to convince this script to work across multiple tracks. Clip grouping, or Track Grouping it will only return to the single original track. Trying to program in an extend down original track count seemed to do nothing.. I'm sure I'm over thinking this, but how do you make this run on a group of tracks so it's useful on BGs. Clip Grouping or Track Grouping setup on the user end would be fine too...
- OOwen Granich-Young @Owen_Granich_Young
AHA! FOLDER TRACK! Does the trick!