No internet connection
  1. Home
  2. How to

Copy the first clip in the "Clips List" to clipboard

By Kitch Membery @Kitch2019-09-12 20:16:21.006Z

Is there a way to load the first clip in the "Clips List" to the clipboard?
Thanks in advance.
Kitch

Solved in post #10, click to view
  • 17 replies

There are 17 replies. Estimated reading time: 11 minutes

  1. Hi @Kitch
    In which way do you want it copied to the clipboard? If you normally do "Edit->Copy" on a clip in PT it will only allow you to paste it within PT. What's the larger workflow you're looking for this to be part of? Do you want to paste the clip outside of PT? Or is it for spotting the clip to your timeline?
    It may be easier to do the larger workflow than to specifically copy a clip to the clipboard (since PT does not fully support that internally)

    1. Kitch Membery @Kitch2019-09-13 01:15:15.096Z

      Hi Christian,
      While editing audiobooks in Pro tools I often have to insert roomtone that I keep held in the clipboard (I'd prefer if I could keep the roomtone in its own dedicted clipboard but I'm not sure that's an option.) To load the roomtone into the clipboard is a three part process

      1. I have to sort to find in the roomtone file in the "Clips List"
      2. Manualy drag it to a track
      3. Edit/Cut (Command + X) the roomtone.

      To be able to load the clipboard from the clipslist would be great. But if that's not an option all good.

      I'll noticed the spot to protools from finder macro. That may be an option if protools does not create a duplicate of the roomtone everytime it is loaded.

      If you have any thoughts let me know. :-)
      Kitch

      1. Ah I see...
        Hmm yea I don't think Pro Tools really supports any other way of doing this than actually dragging the cliplist item to the track.
        How about copying them from a place on your timeline somewhere?
        Then you could automate navigating to a specific track at a specific point in time, copy the selection, and then going back to where you were and paste it there? This could be done with SF actions right now.

        1. Kitch Membery @Kitch2019-09-13 01:54:28.623Z

          Great Idea! I'll try that for sure. Maybe you can have a word to Avid... Hahahhaa :-)

      2. In reply tochrscheuer:
        Kitch Membery @Kitch2019-10-30 07:33:03.065Z

        I'm not sure this can be implemented but if anyone can do it... You can.

        After more research I found the following procedure can achieve what I'm after;

        1- Search the clip list for the clip I want to spot to the Pro Tools timeline (I can script this part no worries)

        2- Right click on first clip in clip list and select “Reveal in Workspace” (not sure how to do this)

        3- Right click on the newly selected clip in the Workspace to “Spot to Edit Insertion”(not sure how to do this)

        4- Close all workspaces. (I can script this part no worries)

        This would be super helpful if it can be done.
        Rock on
        Kitch

        1. Kitch Membery @Kitch2019-10-30 07:46:31.788Z

          Or if this could be done in the background via having a variable with the path to the clip that would be even better. :-)

          ie

          var clipPath = Session path + "/Audio Files/_Fill.wav"

          clipPath Spot to to Edit Insertion

          1. You can use the sf.ui.proTools.spotFile API to spot files.
            At the moment I think you need to provide the sourceSampleLength parameter yourself or the action will fail (this is a SF bug).
            Example:

            sf.ui.proTools.spotFile({
                path: '/path/to/file',
                regionName: 'Clip name',
                trackSampleOffset: 0,
                trackVerticalOffset: 0,
                sourceSampleStart: 0,
                sourceSampleLength: 12345,
            });
            
            1. Syntax for getting your Audio Files dir of the open session:

              var sessionPath = sf.ui.proTools.mainWindow.sessionPath;
              var sessionDir = sessionPath.split('/').slice(0, -1).join('/');
              var audioFilesDir = sessionDir + '/Audio Files';
              
              1. In reply tochrscheuer:
                Kitch Membery @Kitch2019-10-30 19:24:24.290Z

                Seriously fantastic!

                I see the spotFile function does not take into account if you are in shuffle mode so I added a length selectionSet and insert silence functions to counteract it.

                Here is my script;

                //Activate Pro Tools Main Window
                sf.ui.proTools.appActivateMainWindow();
                
                //Set Audiofiles Path
                var sessionPath = sf.ui.proTools.mainWindow.sessionPath;
                var sessionDir = sessionPath.split('/').slice(0, -1).join('/');
                var audioFilesDir = sessionDir + '/Audio Files';
                
                //Clear Selected Area
                sf.ui.proTools.menuClick({
                    menuPath: ["Edit","Clear"],
                });
                
                //Select loop length to Shuffle audio to the right
                  sf.ui.proTools.selectionSet({
                    selectionLength: '0:04.000'
                  });
                
                 //Insert Silence to create space for the spotted file
                sf.ui.proTools.menuClick({
                    menuPath: ["Edit","Insert Silence"],
                }); 
                
                //Spot File to Timeline
                sf.ui.proTools.spotFile({
                    path: audioFilesDir + '/_Fill.wav',
                    regionName: '_Fill',
                    trackSampleOffset: 0,
                    trackVerticalOffset: 0,
                    sourceSampleStart: 0,
                    sourceSampleLength: 176400,
                });
                
                 //Cut spotted clip to load clipboard
                sf.ui.proTools.menuClick({
                    menuPath: ["Edit","Cut"],
                }); 
                
                 //Heal Separation (if spotting was done in the middle of a clip)
                sf.ui.proTools.menuClick({
                    menuPath: ["Edit","Heal Separation"],
                }); 
                

                Is there a way to copy the spotFile clip into the Clipboard in the background? If so that would be even better.

                Rock on mate!

                Reply1 LikeSolution
                1. You continue to surprise me with cool stuff haha :)

                  Is there a way to copy the spotFile clip into the Clipboard in the background? If so that would be even better.

                  You mean Pro Tools' clipboard? No unfortunately not.
                  We can copy it to the system clipboard though (but I think you were looking for a way to use Cmd+V simulated or something like that while staying in shuffle mode, right?)

                  1. Kitch Membery @Kitch2019-10-30 23:28:41.112Z

                    :-) Thanks Christian,

                    Yes I meant to the Pro Tools Clipboard. I figured that might not be possible.

                    And yes the purpose of this script is for loading the Pro Tools Clipboard with room tone (_Fill) to paste between dialog sentences and paragraphs etc by using Click Menu item Edit, Paste Special, Repeat to fill Selection. Most of the workflow is in Shuffle mode.

                    This script still does the job and saves me a bunch of mouse clicks, mouse drags and menu selections. As you can imagine when editing long Audiobooks each manual task I can avoid helps reduce getting repetitive strain injury.

                    By the way... what do you use to create the User interfaces for the Notes, Video Converter for Pro Tools & Fader Bank packages? And do you have some example scripts I could look at? I'd love to build a simple floating user interface to trigger some of my macros.

                    Again... thank you so much for your patience with me. I hope I am not bombarding you with too many questions.

                    1. what do you use to create the User interfaces for the Notes, Video Converter for Pro Tools & Fader Bank packages?

                      These are surfaces, designed directly inside SoundFlow :)
                      Click "+ New" and choose Surface, and a whole new world opens up...
                      Looking forward to all your questions coming around how to script surfaces haha

                2. In reply tochrscheuer:
                  Kitch Membery @Kitch2020-02-17 01:54:32.941Z

                  @chrscheuer,

                  Has there been any progress on the sf.ui.Pro Tools.spotFile API "sourceSampleLength" bug?

                  I'm not sure if a bug report was created or not.

                  1. SSimon Franglen @Simon_Franglen
                      2020-03-24 21:39:48.325Z

                      Kitch, apologies if you are well past this point, but are you using Track Presets at all with media embedded. I use these not only for track settings but also as idea sketchpads, and also for Audio samples and Midi drum rolls, themes etc…

                      https://www.pro-tools-expert.com/home-page/2018/4/28/tutorial-using-pro-tools-track-presets-with-embedded-media-in-audio-post-production

                      1. Kitch Membery @Kitch2020-03-24 22:25:34.248Z

                        Hi @Simon_Franglen,

                        Yes I have used track presets before... Super handy, and the ability to embed media into them is great. :-)

                      2. In reply toKitch:

                        I have a bug report here - but no we haven't touched this yet. It requires a full security review of our backend so that's why it has taken some time.

                        1. Kitch Membery @Kitch2020-03-24 23:58:14.159Z

                          No worries. :-)