No internet connection
  1. Home
  2. How to

ProTools Clip Metadata - Scene and Take

By Iain Anderson @Iain_Anderson
    2020-10-21 09:50:54.765Z

    Hi there,

    My current script idea involves getting the slate number of a group of clips. So far the only way I have of reading that slate number is to read the entire clip name then truncate it to give me the slate number. I’m sure I’m not alone in thinking this seems counter intuitive given that the slate number, in my case, already exists in the clip metadata under the heading “Scene”. This can be confirmed by viewing the Scene and Take parameters on a clip on the ProTools timeline.

    My question is this, is there any plans for SoundFlow to be able to get clip info from the metadata stored in the parent WAV?

    Could be an action similar to getclipspottinginfo. Ie getclipmetadata.scene?

    That would really speed up the actions and commands in scripts that use that info as it would remove the stages of clip rename with windows opening and closing etc.

    Is it something that is easy to implement and would it have widespread appeal?

    I’m pretty sure it would please a lot of the dialogue editors out there that use SoundFlow when editing daily. That type of metadata info is like gold dust especially when tracking down alts!

    Apologies if this functionality already exists, I just couldn’t find it.

    Many thanks,

    Iain

    • 5 replies
    1. samuel henriques @samuel_henriques
        2020-10-21 10:54:22.240Z

        Hello Ian, this selects all clips with same name (up to the first "." ) of the selected clip.
        Are you looking for something similar to this but by slate number?

        sf.ui.proTools.appActivateMainWindow();
        
        sf.ui.proTools.menuClick({
                menuPath: ["View", "Other Displays", "Clip List"],
                targetValue: "Enable",
        });
        
        sf.keyboard.press({
        keys: "cmd+shift+d",
        });
        
        
        
            let currentName = getRegionName()
         if (currentName.indexOf(".") !== -1){
            currentName = currentName.slice(0, currentName.indexOf("."))
            }    
             if (currentName.indexOf("-") !== -1){
            currentName = currentName.slice(0, currentName.indexOf("-"))
            } 
            var combinedName = currentName
        
        putRegionName()
        
        selectClipsInClipList(currentName)
        
        function getRegionName() {
        
            sf.ui.proTools.menuClick({ menuPath: ['Clip', 'Rename...'] });
            sf.ui.proTools.windows.whoseTitle.is('Name').first.elementWaitFor();
            var currentRegionName = sf.ui.proTools.windows.whoseTitle.is('Name').first.groups.whoseTitle.is('Name').first.textFields.first.value.value;
            sf.ui.proTools.windows.whoseTitle.is('Name').first.buttons.whoseTitle.is('Cancel').first.elementClick();
            return currentRegionName
        }
        
        function putRegionName() {
        
            sf.ui.proTools.appActivateMainWindow();
            sf.keyboard.press({
            keys: "cmd+shift+f",
        });
            sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.elementWaitFor();
            sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.checkBoxes.whoseTitle.is('By name').first.checkboxSet({
            targetValue: "Enable",
        });
            sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.textFields.whoseTitle.is('').first.elementSetTextFieldWithAreaValue({ value: combinedName, });
            sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.buttons.whoseTitle.is('OK').first.elementClick();
        
        }
        
            
        function selectClipsInClipList(currentName) {
            sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({
                menuPath: ["Select", "All"],
                targetValue: "Enable",
            });
        
            const row = sf.ui.proTools.mainWindow.clipListView.childrenByRole("AXRow").first;
        
           
            row.children.allItems[1].children.first.popupMenuSelect({
                isRightClick: true,
                menuPath: ['Object Select in Edit Window'],
                onError: "Continue",
            });
        }
        
        

        Could you send me a .wav with the metadata?

        1. IIain Anderson @Iain_Anderson
            2020-10-21 11:03:14.718Z

            Hi Samuel, thanks for the suggestion. What i'm looking for is a cleverer way to extract the clip metadata stored by ProTools as "Scene" and use it in a script. Currently, i'm able to deconstruct the Clip name to get the information I require but as ProTools can see the "Scene" metadata, i'm asking if there is a way for SoundFlow to read that metadata without calling on Clip rename?

            Any thoughts or suggestions welcome!

            Thanks,

            Iain

            1. samuel henriques @samuel_henriques
                2020-10-21 11:04:46.360Z

                I was reading your question https://forum.soundflow.org/-3124, to sort clip name and checkerboard and it looks what you are looking for is to completely jump the looking for slate in the name. I understand your point now better. Maybe in the future I guess

                1. IIain Anderson @Iain_Anderson
                    2020-10-21 11:06:07.102Z

                    I think your code above may help me with the 2nd half of my planned script so thanks for helping out!

                    No good code goes to waste.

                    Many thanks,

                    Iain

                    1. We definitely would like to have more precise control over these things. I don't think it could be improved much upon right now though.
                      The one thing you could do would be to still open the Clip Rename dialog, but then instead of taking the information from the name, you'd take it from the Scene element.

                      Kitch has made a video here that shows you how to read values from text elements: