No internet connection
  1. Home
  2. How to

Stereo track to mono track

By Yujiro Yonetsu @Yujiro_Yonetsu
    2020-11-07 16:17:33.411Z

    Hello

    In the data I got from the artist, it's a stereo track, but the mono material is sounding in it.
    I think this happens quite often.
    Then I split the stereo track into mono,
    And I'll delete one of the channels.

    I'll hide and inactive the original stereo track, as I want to keep it in case I have to leave it behind.

    I've tried to create a script that behaves that way, but there's one problem.

    When I do this behavior more than once.
    //select original stereo tracks
    At that time, the already hidden tracks will reappear and be selected.
    The results are fine, but it takes extra time.

    What is a good solution?

    Here's the current script.

    //Activate Pro Tools
    sf.ui.proTools.appActivateMainWindow();
    
    //Do batch rename all selected tracks
    sf.ui.proTools.appActivateMainWindow();
    sf.ui.proTools.selectedTrack.titleButton.popupMenuSelect({
        isRightClick: true,
        menuPath: ['Batch Rename...']
    });
    
    
    //Batch rename setting 'add "_ORIGINAL!"'
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Replace').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Trim').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Add').first.checkboxSet({
        targetValue: "Enable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Prefix:').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Insert:').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Suffix:').first.checkboxSet({
        targetValue: "Enable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Numbering').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.textFields.whoseTitle.is('').allItems[9].elementSetTextFieldWithAreaValue({
        value: "_ORIGINAL!",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.buttons.whoseTitle.is('OK').first.elementClick();
    
    
    //split into mono all selected tracks
    sf.ui.proTools.menuClick({
        menuPath: ["Track","Split into Mono"],
    });
    
    
    //select named "_ORIGINAL!.R"
    var trackNamesR = sf.ui.proTools.trackNames.filter(n => n.match(/(_ORIGINAL!.R)/i));
    
    sf.ui.proTools.trackSelectByName({
        names: trackNamesR,
        deselectOthers: true,
    });
    
    
    //Delete it
    sf.ui.proTools.trackDelete();
    
    
    sf.ui.proTools.windows.whoseTitle.is('').first.buttons.whoseTitle.is('Delete').first.elementClick();
    
    
    //select named "_ORIGINAL!.L"
    var trackNamesL = sf.ui.proTools.trackNames.filter(n => n.match(/(_ORIGINAL!.L)/i));
    
    sf.ui.proTools.trackSelectByName({
        names: trackNamesL,
        deselectOthers: true,
    });
    
    
    //Do Batch rename all selected tracks
    sf.ui.proTools.appActivateMainWindow();
    sf.ui.proTools.selectedTrack.titleButton.popupMenuSelect({
        isRightClick: true,
        menuPath: ['Batch Rename...']
    });
    
    
    //Batch rename setting 'delete "_ORIGINAL!.L"'
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Replace').first.checkboxSet({
        targetValue: "Enable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Clear Existing Name').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Regular Expressions').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Trim').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Add').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.checkBoxes.whoseTitle.is('Numbering').first.checkboxSet({
        targetValue: "Disable",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.textFields.whoseTitle.is('').first.elementSetTextFieldWithAreaValue({
        value: "_ORIGINAL!.L",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.textFields.whoseTitle.is('').allItems[1].elementSetTextFieldWithAreaValue({
        value: "",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Batch Track Rename').first.buttons.whoseTitle.is('OK').first.elementClick();
    
    
    
    //select original stereo tracks
    var trackNamesOriginal = sf.ui.proTools.trackNames.filter(n => n.match(/(_ORIGINAL!)/i));
    
    sf.ui.proTools.trackSelectByName({
        names: trackNamesOriginal,
        deselectOthers: true,
    });
    
    //Hide and Inactive it
    sf.ui.proTools.trackHideAndMakeInactiveSelected();
    
    
    Solved in post #2, click to view
    • 4 replies
    1. samuel henriques @samuel_henriques
        2020-11-08 10:17:46.847Z

        Hello @Yujiro_Yonetsu,

        I think this is what you need to change,

        //select original stereo tracks
        var trackNamesOriginal = sf.ui.proTools.visibleTrackNames.filter(n => n.match(/(_ORIGINAL!)/i));
        sf.ui.proTools.trackSelectByName({
            names: trackNamesOriginal,
            deselectOthers: true,
        });
        
        //Hide and Inactive it
        if (trackNamesOriginal.length > 0){
            sf.ui.proTools.trackHideAndMakeInactiveSelected();
        }
        

        Instead of looking for all tracks it looks only on visible tracks.

        Reply1 LikeSolution
        1. Yujiro Yonetsu @Yujiro_Yonetsu
            2020-11-08 11:02:35.500Z

            Hello @samuel_henriques

            Thank you so much.
            That's exactly how I solved my problem.
            It was very helpful.

          • In reply toYujiro_Yonetsu:
            Yujiro Yonetsu @Yujiro_Yonetsu
              2020-11-08 11:05:44.426Z

              1 more new trouble.

              When a large number of tracks are processed at the same time, batch renaming cannot be performed because the upper track in the multiple selected tracks is not displayed on the screen, and an error occurs at that stage.

              What is the solution to this?

              Best regards

              1. samuel henriques @samuel_henriques
                  2020-11-08 11:12:22.843Z

                  I think you should try the batch rename shortcut "shift+ctrl+r" or calling the batch rename menu from the clip list popup.
                  You are using the popup from the selected track and if its not visible sf can't get there.

                  hope it helps