No internet connection
  1. Home
  2. How to

Copy clip to alternate track then return to original track

By Iain Anderson @Iain_Anderson
    2020-10-13 13:30:21.424Z

    Hi there, often when processing clips with AudioSuite plugins I like to keep a copy of the original clip on a specific track unprocessed. Before SoundFlow I would copy the clip to an alternate track (unprocessed 1) then go back to the original track to process the clip in it's original location. Always the same template so track names are set and always the same. Is there a way to automate this process with SoundFlow? Would it be a series of UI actions? Or is there a way to "count" the number of tracks from original to unprocessed so the reverse can be done to get back to original clip using keyboard strokes? Thanks in advance.

    Solved in post #5, click to view
    • 10 replies
    1. samuel henriques @samuel_henriques
        2020-10-13 15:52:02.556Z

        Hello @Iain_Anderson,

        something similar to this?
        https://forum.soundflow.org/-19

        1. IIain Anderson @Iain_Anderson
            2020-10-13 15:57:24.017Z

            Not exactly, but close. The one you reference sends it for processing from the copy location I think. I want to send it from the original track location.

            1. samuel henriques @samuel_henriques
                2020-10-13 16:37:46.447Z2020-10-13 16:52:09.006Z

                Try this, from any track to "Clean Track" and back,

                sf.ui.proTools.appActivate();
                sf.ui.proTools.mainWindow.invalidate();
                
                
                const originalTracks = sf.ui.proTools.selectedTrackNames;
                let cleanTrack = ['Unprocessed 1' , 'Unprocessed 2'];
                let namesToSelect = sf.ui.proTools.trackNames.filter(n => cleanTrack.some(p => n.endsWith(p)));
                
                sf.ui.proTools.menuClick({
                    menuPath: ["Edit","Copy"],
                });
                
                sf.ui.proTools.trackSelectByName({
                    names: cleanTrack,
                });
                
                sf.ui.proTools.menuClick({
                    menuPath: ["Edit","Paste"],
                });
                
                sf.ui.proTools.trackSelectByName({ names: originalTracks }); 
                
                Reply1 LikeSolution
                1. IIain Anderson @Iain_Anderson
                    2020-10-13 16:45:22.678Z

                    That's beautiful. Works a treat. Very many thanks. Lovely!

                    1. samuel henriques @samuel_henriques
                        2020-10-13 16:52:02.377Z

                        Nice, I've updated the script in case you decide you need two tracks in the future. It'll go from any two tracks to the "Unprocessed 1" and/or "Unprocessed 2",
                        and back. If you need more just write more names ['Unprocessed 1' , 'Unprocessed 2' , 'yaddayadda']

                        Have fun!!

                        1. IIain Anderson @Iain_Anderson
                            2020-10-13 16:58:30.526Z

                            That's awesome. Exactly what I was after. Really great bit of code that. Thanks again.

                            1. Hi Samuel, that's an amazing script, so usefull. It worked well here but I did not understand the update you've made for Unprocessed 2. I created 2 tracks (Unprocessed 1 and Unprocessed 2) but it is only copying to the Unprocessed 1. Can you elaborate more on that please? I'm new to Soundflow. I've also tried to select two Dial tracks to see if it would send to Unprocessed 1 and Unprocessed 2 but it didn't work here. Could you give a little help please? Thank you

                              1. samuel henriques @samuel_henriques
                                  2023-08-13 11:20:39.271Z

                                  Hello Claudio,
                                  The idea is that you could select two tracks with clips and they will be pasted on the 'Unprocessed 1' tracks 'Unprocessed 2'.
                                  Do you get any error when its not pasting on the two tracks? Could you double check the track names are correct?

                                  1. Hi Samuel, thank you for the reply. Today I launched Pro Tools to double check the track names as you suggested and the names were correct. Then I tried the script again and it worked haha thank you

                      • I
                        In reply toIain_Anderson:
                        Iain Anderson @Iain_Anderson
                          2020-10-13 16:26:03.947Z

                          So i've got something working using track rename but it's kind of clunky. Is there anyway to store a value within the script then recall it later during the script?

                          sf.ui.proTools.selectedTrack.trackOpenRenameDialog({
                              renameAllSelectedTracks: false,
                          });
                          
                          sf.keyboard.press({
                              keys: "cmd+c, tab, cmd+v",
                          });
                          
                          sf.keyboard.press({
                              keys: "shift+tab, o",
                          });
                          
                          sf.ui.proTools.focusedWindow.buttons.whoseTitle.is('OK').first.elementClick();
                          
                          sf.ui.proTools.menuClick({
                              menuPath: ["Edit", "Copy"],
                          });
                          
                          sf.ui.proTools.menuClick({
                              menuPath: ["Track", "Scroll to Track..."],
                          });
                          
                          sf.ui.proTools.confirmationDialog.elementWaitFor();
                          
                          sf.ui.proTools.windows.whoseTitle.is('').first.textFields.whoseTitle.is('').first.elementSetTextFieldWithAreaValue({
                              value: "Unprocessed 1",
                          });
                          
                          sf.ui.proTools.focusedWindow.buttons.whoseTitle.is('OK').first.elementClick();
                          
                          sf.ui.proTools.menuClick({
                              menuPath: ["Edit", "Paste"],
                          });
                          
                          sf.ui.proTools.menuClick({
                              menuPath: ["Track", "Scroll to Track..."],
                          });
                          
                          sf.ui.proTools.windows.whoseTitle.is('').first.elementWaitFor();
                          
                          sf.ui.proTools.windows.whoseTitle.is('').first.textFields.whoseTitle.is('').first.elementSetTextFieldWithAreaValue({
                              value: "o",
                          });
                          
                          sf.ui.proTools.windows.whoseTitle.is('').first.buttons.whoseTitle.is('OK').first.elementClick();
                          
                          sf.ui.proTools.selectedTrack.trackOpenRenameDialog();
                          
                          sf.keyboard.press({
                              keys: "tab, cmd+x, shift+tab, cmd+v",
                          });
                          
                          sf.ui.proTools.children.whoseRole.is("AXWindow").first.buttons.whoseTitle.is('OK').first.elementClick();