No internet connection
  1. Home
  2. How to

Wait for Pro Tools to stop playing or recording (is it the same?)

By Thomas Gloor @Thomas_Gloor
    2021-06-01 08:47:47.398Z

    Hi!

    I'm trying to have another action start AFTER printing my mix. Is there a function or piece of code I can use for Soundflow to wait for PT to stop playing (or recording) before starting the next action?

    Thank you very much!

    Solved in post #3, click to view
    • 2 replies
    1. samuel henriques @samuel_henriques
        2021-06-01 10:16:51.611Z

        I'm thinking this should work,
        let me know:

        while (true) {
        
            if (sf.ui.proTools.isPlaying) {
        
                sf.wait()
        
                log("is playing")
            } else {
        
                log("stoped")
                break;
            }
        }
        

        Once you get it working, remove the log lines, they are just to know what is going on, while the script is running

        1. T
          In reply toThomas_Gloor:
          Thomas Gloor @Thomas_Gloor
            2021-06-01 10:45:33.266Z

            Samuel,

            Thank you so much. It works perfectly!

            Reply1 LikeSolution