No internet connection
  1. Home
  2. How to

Batch Process files from G-Drive to RX

By Alex Barton @Alex_Barton
    2021-09-02 19:22:02.898Z2021-09-02 19:37:09.906Z

    is there a way to take audio which comes in overnight via g-drive or dropbox (on Mac) and put it through batch processing in RX? which I then distribute to my editors for use on whatever DAW they wish

    how do I accomplish this just using soundflow? I can get it to a daily/nightly folder using Keyboard Maestro, but haven't figured out the way to send it onward to the batch RX processor on sound flow without having to press something

    is there a script or something to accomplish this that I'm missing?

    thanks!

    • 22 replies

    There are 22 replies. Estimated reading time: 12 minutes

    1. Dustin Harris @Dustin_Harris
        2021-09-03 12:53:42.634Z

        Is this something you're doing remotely?

        would the process be step by step:

        1. move files to new location (into daily/nightly)
        2. batch process the files in RX
        3. move the files to a different location? (sound rolls to editors, etc...)?
        1. AAlex Barton @Alex_Barton
            2021-09-03 13:23:41.188Z

            yea its VO/Podcast/Audiobook work that comes in overnight, so typically I just need to RX out the booth oddities and mouth clicks. then send on to the appropriate editor,

            normally its 2 or 3 presets depending on the studio they've been recorded in.
            the editors are spread out over many DAW's which is why I'm looking for a way to do It from the Mac finder / G-Drive / Dropbox rather than out of protools

            1. Dustin Harris @Dustin_Harris
                2021-09-03 15:46:28.001Z

                And would the processed need to be triggered manually / overseen, or do you want this all to happen automatically?

                1. AAlex Barton @Alex_Barton
                    2021-09-03 15:49:17.593Z

                    automatically if possible, ideally whenever a file arrives / gets put in the overnight batch folder. or to set off at a certain time.

                    the majority don't really need to be overseen as its the same treatment each time, (some will need checking but I wouldn't automate those) so could have the batch preset in RX8 for 1 reader, and batch preset in RX7 for the other,

                    1. Dustin Harris @Dustin_Harris
                        2021-09-03 16:19:00.581Z

                        and you have physical access to the computer receiving the files?

                        1. In reply toAlex_Barton:
                          Dustin Harris @Dustin_Harris
                            2021-09-03 16:24:04.718Z

                            you can probably use RX8 for both readers or multiple readers, and set presets based on the folder names found in the upload folder... do you keep the original files?

                            1. AAlex Barton @Alex_Barton
                                2021-09-03 16:52:44.043Z

                                yes I have physical access to the computer, yea I keep the original audio

                                1. Dustin Harris @Dustin_Harris
                                    2021-09-03 18:02:17.434Z

                                    do your clients upload in folders, or folders and subfolders?

                                    1. AAlex Barton @Alex_Barton
                                        2021-09-04 10:40:11.289Z

                                        incoming audio - other than their main G-Drive Dropbox folder share, just into the job folder,
                                        outgoing audio - after processing I distribute to a specific folder & subfolder (for the audio only) which is the RX output path in the batch processor

                                        1. Dustin Harris @Dustin_Harris
                                            2021-09-07 13:28:38.283Z

                                            Just letting you know I'm still working on this one, it's a tricky one as iZotope doesn't allow us to directly access all it's buttons, so I have to find ways around things. :)

                                            1. TTim Tregubopv @Tim_Tregubopv
                                                2022-01-25 21:09:38.664Z

                                                hi all! looking for exactly the same thing - when a file is added to dropbox - trigger an flow that would do de-clip, mouth de-click, and dialogue isolate - and then render out to a wav. help! looks like the isotope support is there but not sure how to trigger on file being added to a folder.

                                                1. Kitch Membery @Kitch2022-01-26 03:47:37.699Z

                                                  Hi @Tim_Tregubopv,

                                                  This is a very in depth workflow, And I'm not sure if @Dustin_Harris is still working on it.

                                                  But if your just needing to monitor when new files are added to a folder you could use a run-forever script like the one below;

                                                  Note: you'll need to update the following two variables (or consts) at the top of the script;

                                                  • The folderPath (The path of the folder you want to monitor).
                                                  • The targetCommandId (This can be collected by selecting the Target Command in the "Command Name" list, ie the script you want to run when files are added to the folder, and then from the "Command" menu in SoundFlow select "Copy Command ID Local to Package" which will copy the command ID to the clipboard.),

                                                  This is the Run-Forever script.

                                                  // Path to the folder you want to watch
                                                  const folderPath = "~/Desktop/Folder Name";
                                                  
                                                  // This is the command ID for the script you wish to run if a file is added to the folder.
                                                  const targetCommandId = 'package:ckyuvevvp0003pg108ocjlmoa';
                                                  
                                                  // Collect file paths from folder on first run
                                                  let oldFilePaths = getFilePaths();
                                                  
                                                  function getFilePaths() {
                                                      return sf.file.directoryGetFiles({
                                                          path: folderPath,
                                                      }).paths;
                                                  }
                                                  
                                                  function main() {
                                                      try {
                                                          //Get the file paths in the folder
                                                          let newFilePaths = getFilePaths();
                                                  
                                                          //Compare the new files to the old files
                                                          if (JSON.stringify(newFilePaths) !== JSON.stringify(oldFilePaths)) {
                                                  
                                                              //log("Folder content has changed");
                                                  
                                                              //Get the file paths of the added files 
                                                              let addedFilePaths = newFilePaths.filter(item => !oldFilePaths.includes(item));
                                                  
                                                              //Check to see if there have been any files added to the folder
                                                              if (addedFilePaths.length !== 0) {
                                                  
                                                                  //log("Files have been added to the folder");
                                                  
                                                                  // Run the target Command ID;
                                                                  sf.soundflow.runCommand({
                                                                      commandId: targetCommandId,
                                                                      props: { folderPath, addedFilePaths, } //Send the Folder Path and newly added File Paths to the target Command.
                                                                  });
                                                              }
                                                  
                                                              //Update the old file paths
                                                              oldFilePaths = newFilePaths;
                                                          }
                                                      } catch (err) {
                                                      }
                                                  }
                                                  
                                                  /**
                                                   * @param {object} settings
                                                   * @param {string} settings.name
                                                   * @param {function} settings.action
                                                   * @param {number} settings.interval
                                                   * @param {number} settings.timeout
                                                   */
                                                  function runForever({ name, action, interval, timeout }) {
                                                      var now = (new Date).valueOf();
                                                      if (now - globalState[name] < timeout) throw 0; //Exit if we were invoked again inside the timeout
                                                  
                                                      globalState[name] = now;
                                                      sf.engine.runInBackground(function () {
                                                          try {
                                                              while (true) {
                                                                  sf.engine.checkForCancellation();
                                                                  globalState[name] = (new Date).valueOf();
                                                  
                                                                  action();
                                                  
                                                                  sf.wait({ intervalMs: interval, executionMode: 'Background' });
                                                              }
                                                          } finally {
                                                              globalState[name] = null;
                                                          }
                                                      });
                                                  }
                                                  
                                                  runForever({
                                                      name: "folderUpdateMonitorService",
                                                      action: main,
                                                      interval: 500,
                                                      timeout: 5000
                                                  });
                                                  

                                                  This would in turn run the targetCommandId (ie the Target Command) whenever the run-forever script detects one or more files have been added to the folder;

                                                  Note: Run-forever scripts can only be run once. To cancel the script either restart SoundFlow or use "Control+Shift+ESC" to terminate all running SoundFlow Commands.

                                                  So the target command (a separate script, see below) could then receive the folder path and the file paths from the Run-forever script.

                                                  This is the Target Command script

                                                  const { folderPath, addedFilePaths } = event.props;
                                                  
                                                  let folderName = folderPath.split('/').slice(-1)[0];
                                                  
                                                  alert(`The following files have been added to the ${folderName};\n\n${addedFilePaths.join('\n')}`);
                                                  

                                                  I've not extensively tested it but I hope that helps.
                                                  Rock on

                                                  1. Dustin Harris @Dustin_Harris
                                                      2022-01-26 03:53:21.725Z

                                                      Thanks for all that @Kitch , I had to put working on this one on the back burner for the time being; I hit a snag with the batch import window, particularly not being able to confirm if the files get added (as the file list element doesn’t seem to be exposed). I’ll try to circle back with fresh ideas :)

                                                      1. Kitch Membery @Kitch2022-01-26 04:09:17.393Z

                                                        No worries legend. I figured that was the case… I think I tried the same thing back in the early days of version 8. Either way I thought these scripts may help reach the goal once time permitted. :-)

                                                        Hit me up when you get back onto it and maybe we can brainstorm a way to do it.

                                                        Rock on!!

                                                2. In reply toAlex_Barton:
                                                  Dustin Harris @Dustin_Harris
                                                    2021-09-07 19:14:12.132Z

                                                    so, if I'm thinking of this right: when audio is uploaded to a certain folder (for instance incoming), anything that gets uploaded into that folder, whether it is single files or folders and subfolders can be batch processed, then moved to another folder (to keep the originals?), and then the batch processor takes care of the destination?

                                                    1. AAlex Barton @Alex_Barton
                                                        2021-09-08 07:37:30.735Z

                                                        yes Dustin that's correct, the only other thing to figure out is the differing batch presets,
                                                        would it be easier to looking at having multiple incoming folders with a different RX batch pre-set attached to each one? for the different narrators

                                                        1. Dustin Harris @Dustin_Harris
                                                            2021-09-08 11:44:08.333Z

                                                            Yeah, it can either be that, or if the narrators use distinct naming conventions for their uploads, that can be used too…

                                                            1. AAlex Barton @Alex_Barton
                                                                2021-09-08 13:04:13.608Z

                                                                they do 👍

                                                                1. Dustin Harris @Dustin_Harris
                                                                    2021-09-08 14:42:00.988Z

                                                                    hopefully this is the case as well, but does each narrator upload a single whole folder at a time? and is there ever a possibility of multiple folders from both narrators in the incoming folder at the same time?

                                                                    1. AAlex Barton @Alex_Barton
                                                                        2021-09-08 14:48:25.725Z

                                                                        its possible, but not common, normally if the narrators are on a job together they'll record at separate times, or they may both be in the same studio, which means I could use say the "Studio A" preset for both

                                                                        1. Dustin Harris @Dustin_Harris
                                                                            2021-09-08 14:51:42.425Z

                                                                            but technically, the incoming folder could contain something like:

                                                                            Narrator1_StudioA_8Sep2021
                                                                            Narrator1_StudioA_9Sep2021
                                                                            Narrator2_StudioB_9Sep2021
                                                                            Narrator2_StudioA_10Sep2021

                                                                            all at the same time, and the 'Studio' would be the defining factor over which preset is used?

                                                                            1. AAlex Barton @Alex_Barton
                                                                                2021-09-08 15:54:04.806Z

                                                                                yep thats right, they stay in the same studio, with their same mic setups 👍
                                                                                my incoming audio is designated usually with a studio ident initial, consecutive number (1 pad upwards) then the job title

                                                                                ie. SA1 Tree of Hope, SA2 Tree of Hope, SB1 Go Secret, SB2 Go Secret
                                                                                and as you say the Studio (SA or SB) would be the preset factor