No internet connection
  1. Home
  2. How to

Can you change the name of an automation/command?

By Peter Gallacher @Peter_Gallacher
    2022-02-04 13:36:00.031Z2022-02-04 13:48:00.709Z

    I've downloaded the Advanced Memory locations in the store, but I want to change the names. Is there a way to do this? I basically want to change the default title AdvMemLoc 1 to my own text, like Click or Noise etc. Thanks in advance.

    • 27 replies

    There are 27 replies. Estimated reading time: 23 minutes

    1. O

      Hi Peter, I built this Package and the anwer to your questions is both YES and NO 😂

      No you cannot rename AdvMemLoc 1 it's a default Preset and just an example. HOWEVER you can create your own presets and place them on your decks to control. Here's a little video of me creating a preset. Then place that on the deck of your choosing.

      If you're trying to use and edit the incldued demo 5x3 Deck, remember you need to make an Editable Copy of that deck

      Save it to one of your own packages and then replace the Default presets with presets you've built yourself.

      Sense making?

      Bests,
      Owen

      1. Peter Gallacher @Peter_Gallacher
          2022-02-04 16:38:07.061Z

          WOW! Thanks so much Owen. That now makes total sense. The video was perfect.
          Thank you so much for taking the time to explain this. It's made my day. I just need to try and work out how to then add a simulation of pressing return so it then hide the box once it's added the memory location. Still scratching my head on that one.

          Thanks again
          Peter

          1. The script should totally close the box after it goes... is it not doing that on your end?

        • Peter Gallacher @Peter_Gallacher
            2022-02-04 16:53:33.973Z

            Sorry, it total does yeah, but it opens the memory locations box and leaves it on the screen. It's no dramas, I'm happy to push it to the corner of the screen. Thanks again Owen.

            1. Ahh yes i work on so many screens that It's always somewhere I don't care about it... I'll work on fixing that when I'm done with this loop session. It's an easy fix and I already have it in some other scripts in that package, don't think I realized it wasn't in the main template.

              This was my first template and I've slowly been bolting feataures onto it, so I didn't realize I hadn't added that feature.

            2. Peter Gallacher @Peter_Gallacher
                2022-02-04 17:00:10.669Z

                Top man, yeah it's no problem. As you've probably realised I've only just started using it, so everything feels a bit odd at the moment. I'm sure I'll get into the swing of it soon enough. I was using the Eucon app, but I was finding it too clunky and limiting.

                Thanks again Owen.

                1. Upadated the package, Memory Location Window will correclty close if it was closed. Update it and let me know if you still have the same problem.

                2. Peter Gallacher @Peter_Gallacher
                    2022-02-04 20:15:51.736Z

                    Bless ya Owen I will check that out when I’m next in. Thank you.

                    I’m also trying to figure out how you link editable copies of the pro tools decks you create.

                    For example, I have the pro tools 5x3 demo deck in editable mode.
                    When I go to memory locations and create a new editable deck. For some reason, once I’ve updated the decks I can’t link/navigate back to the editable pro tools editable deck 5x3 from the new memory locations editable deck. Maybe I’m missing something.

                    Oh well, I’m sure I’ll work it out.

                    Thanks again Owen
                    Peter

                    1. I'm not totally sure I understand the question but here's my solution.

                      Try under 'Command' Search "Decks:" and add your specific edited 5x3 deck. Video example below.

                      Sense making?

                    2. Peter Gallacher @Peter_Gallacher
                        2022-04-21 15:40:26.309Z

                        Hi @Owen_Granich_Young I hope you're keeping well. Just recently, when I add the markers it seems to take forever to implement on screen. I say forever, about 10 seconds, which ends up being longer than you'd take to do it manually.

                        I have updated it to the latest version and it's still the same. Just wondered if there was something I was missing. All the other stuff created by Soundflow still works very fast.

                        Any suggestions? Thanks again. Peter.

                        1. That is very strange. TBH I haven't been using this script as I've ben supervising and not FX editing currently. That's super obnoxious though, I'm not sure why that would be... I've no real idea how to trouble shoot it but I'll load it up on my end and try it out again. Have you updated protools? Maybe they changed something on their end? Out of curiosity have you tried it in a blank session? My department notes script gets slower and slower when my session gets larger, wonder if it's something similar.

                          bests,
                          Owen

                      • Peter Gallacher @Peter_Gallacher
                          2022-04-21 16:31:34.261Z

                          Hi @Owen_Granich_Young you are right, an empty session works super fast. A full one is painfully slow. I was hoping to upgrade to the latest PT, but I believe RX7 is not compatible, so I thought I'd hold off for now.

                          have you upgraded, does everything work?

                          1. I am on the latest protools on my home rig, on the stage on the laptop today, not sure.

                            I wonder what in the script is making it clunkly on larger sessions. @Kitch any ideas, maybe related to use talking the yesterday in the webinar about scripts needing to scrape data every time they run? This one shouldn't really need to... Do you see anything here that would slow it way down? this is the full script but the releavant bit to what Peter is feel lagging is the function createMemoryLocationsMarker({ name }) function.

                            const { cueText } = event.props;
                            const isMemLocWinOpened = sf.ui.proTools.getMenuItem('Window', 'Memory Locations').isMenuChecked
                            const memoryLocations = sf.proTools.memoryLocationsFetchFromGui().collection.list.filter(x => x.name.match(cueText))
                            const modifierState = event.keyboardState.asString
                            
                            /**
                             * @param {object} obj
                             * @param {string} obj.name
                             */
                            function createMemoryLocationsMarker({ name }) {
                            
                                sf.ui.proTools.appActivateMainWindow();
                                const dlg = sf.ui.proTools.newMemoryLocationDialog;
                                if (!dlg.exists) {
                                    sf.keyboard.press({ keys: "numpad enter" });
                                }
                            
                                dlg.elementWaitFor();
                                dlg.radioButtons.whoseTitle.is("Marker").first.elementClick();
                                dlg.textFields.allItems[1].elementSetTextFieldWithAreaValue({
                                    value: name,
                                });
                            
                                dlg.buttons.whoseTitle.is("OK").first.elementClick();
                                dlg.elementWaitFor({ waitType: "Disappear", });
                            
                            }
                            
                            function paste(memoryLocations) {
                            
                                sf.ui.proTools.memoryLocationsGoto({
                                    memoryLocationNumber: memoryLocations.number
                                })
                                sf.ui.proTools.menuClick({ menuPath: ["Edit", "Paste"] })
                            }
                            
                            function clearMemoryLocations(name) {
                            
                            
                                // //  Open mem loc win
                                sf.ui.proTools.memoryLocationsShowWindow()
                            
                                // Get Memory Locations including...
                                const memoryLocations = sf.proTools.memoryLocationsFetch().collection['List'].filter(m => m.name.includes(name))
                            
                                // Clear found
                                memoryLocations.forEach(memLoc => {
                                    sf.ui.proTools.memoryLocationsGoto({ memoryLocationNumber: memLoc.number })
                                    sf.ui.proTools.memoryLocationsWindow.popupButtons.first.popupMenuSelect({ menuPath: ['Clear*'], useWildcards: true });
                                });
                            
                                ///alert(`Cleared All Memory Locations Names Including: \n\n                       - ${name} -`)
                            
                            };
                            
                            function goToNextMatchedMemoryLocation(locationName) {
                                let currentTimecode = sf.ui.proTools.getCurrentTimecode().stringValue;
                            
                                //  if main counter is bars beats, remove last three digits, since memory locations list ignores them
                                currentTimecode.match(/\|/) ? currentTimecode = currentTimecode.slice(0, -3) : null;
                            
                                let cleanMainCounter = Number(currentTimecode.replace(/[^0-9]/g, '').trim());
                            
                                const memoryLocations = sf.proTools.memoryLocationsFetch().collection["list"].filter(x =>
                                    Number(x.mainCounterValue.replace(/[^0-9]/g, '').trim()) > cleanMainCounter && x.name.match(locationName)
                                );
                            
                                try {
                                    sf.ui.proTools.memoryLocationsGoto({ memoryLocationNumber: memoryLocations[0].number });
                                } catch (err) {
                                    log(`End of location markers containing:\n${locationName}`);
                                }
                            }
                            
                            function getPreviousMatchedMemoryLocation(locationName) {
                            
                                let mainCounter = sf.ui.proTools.getCurrentTimecode().stringValue
                            
                                //  if main counter is bars beats, remove last three digits, since memory locations list ignores them
                                mainCounter.match(/\|/) ? mainCounter = mainCounter.slice(0, -3) : null
                            
                                let cleanMainCounter = Number(mainCounter.replace(/[^0-9]/g, '').trim())
                            
                                const memoryLocations = sf.proTools.memoryLocationsFetch().collection["list"].filter(x =>
                                    Number(x.mainCounterValue.replace(/[^0-9]/g, '').trim()) < cleanMainCounter &&
                                    x.name.match(locationName)
                                ).reverse();
                            
                                try {
                                    sf.ui.proTools.memoryLocationsGoto({
                                        memoryLocationNumber: memoryLocations[0].number
                                    });
                                } catch (err) { log(`End of location markers containing:\n${locationName}`) }
                            }
                            
                            /** Counts the amount of times this function is called during a fixed amount of time 
                             * and passes that value to a callback from which different actions can take place.
                             * @param {object} args
                             * @param {string} args.name - Name for this instance.
                             * @param {number} args.waitTime - Amount of time to wait in milliseconds. 
                             * @param {function} args.action - Callback to execute when the waitTime is over. Counter value will be passed as an argument.
                             */
                            function actionCounter({ name, waitTime, action }) {
                                let actionCounter;
                            
                                if (!globalState.actionCounter) globalState.actionCounter = {};
                                actionCounter = globalState.actionCounter;
                            
                                if (!actionCounter[name]) {
                                    actionCounter[name] = {
                                        dateMs: (new Date).valueOf(),
                                        i: 1
                                    };
                                } else {
                                    actionCounter[name].i++
                                    return;
                                }
                            
                                sf.engine.runInBackground(() => {
                                    sf.wait({ intervalMs: waitTime, executionMode: "Background" });
                                    try {
                                        action(actionCounter[name].i);
                                    } finally {
                                        delete globalState.actionCounter
                                    }
                                });
                            }
                            
                            function main() {
                                
                                if (globalState.toggleCreateOrGoTo == undefined || globalState.toggleCreateOrGoTo === true) {
                            
                                    switch (modifierState) {
                                        case "cmd":
                                            memoryLocations.forEach(paste)
                                            break
                                        case "":
                                            createMemoryLocationsMarker({
                                                name: cueText,
                                            });
                                            break
                                        case "shift":
                                            clearMemoryLocations(cueText)
                                            break
                                    };
                                }
                            
                                if (globalState.toggleCreateOrGoTo === false) {
                                    switch (modifierState) {
                                        case "cmd":
                                            memoryLocations.forEach(paste)
                                            break
                                        case "":
                                            actionCounter({
                                                name: 'memoryLocaitonFowardorBackwards',
                                                waitTime: 500,
                                                action: i => {
                                                    switch (i) {
                                                        case 1:
                                                            goToNextMatchedMemoryLocation(cueText)
                                                            break;
                                                        case 2:
                                                            getPreviousMatchedMemoryLocation(cueText)
                                                            break;
                                                    }
                                                }
                                            });
                                            break
                                        case "shift":
                                            clearMemoryLocations(cueText)
                                            break
                                    };
                                }
                                // Set initial state of Mem Loc Win
                                if (!isMemLocWinOpened) {
                                    sf.ui.proTools.menuClick({ menuPath: ['Window', 'Memory Locations'], targetValue: "Disable" })
                                };
                            }
                            
                            main()
                            
                            1. Kitch Membery @Kitch2022-04-21 17:16:25.209Z

                              Hi @Owen_Granich_Young & @Peter_Gallacher,

                              Is there a chance you could do a screen recording so I can see where the lag is. I've tried the createMemoryLocationsMarker function on a large session and it seems fast.

                              1. Yeah it's fast for me too... @Peter_Gallacher can you shoot us a vid?

                                1. In reply toKitch⬆:
                                  Peter Gallacher @Peter_Gallacher
                                    2022-04-21 17:55:19.246Z

                                    Hi @Kitch @Owen_Granich_Young I will do a screen record in the morning when I’m back in work and ping over. Thx

                                    1. In reply toKitch⬆:
                                      Peter Gallacher @Peter_Gallacher
                                        2022-04-22 09:27:30.903Z

                                        Hi @Kitch okay I've created a screen recording with audio so you can see how long it's taking for the memory location to be added. As discussed on an earlier reply, this only seems to happen on bigger sessions. That said, all the other Pro Tools macros that come as standard work fine, even in big sessions. As I've also mentioned I'm still on Big Sur, so maybe it's a Big Sur issue, but thought I'd check first. Thanks again, Peter. https://www.dropbox.com/s/fg8dlw8647k0cnj/SoundflowLag.mov?dl=0

                                        1. Kitch Membery @Kitch2022-04-22 18:09:30.258Z

                                          @Peter_Gallacher,

                                          Wow, yeah, that is slow.

                                          Can you paste the code you ran in that screen recording here in the forum? (unless you were running the full script that Owen posted.)

                                          And just to confirm this runs fine on small sessions right?
                                          Are there any plugin windows or other Pro Tools windows open?
                                          Can you try running it again with your "Mixer" window closed and let me know if that speeds things up?

                                          Rock on!

                                          1. Peter Gallacher @Peter_Gallacher
                                              2022-04-25 17:10:47.845Z

                                              Hi @Kitch I think it's the same code that Owen posted, as it's his modifications. I've just added the text details for the memory location.

                                              Yes, it runs fine on small sessions, but slow on big sessions. That said, SoundFlow's own PT templates work fine fast in big and slow sessions.

                                              I did try it without the mixer window open and it was just as slow. I do have plugins inserted on the various channels and it was a bit quicker when I bypassed them, but not that quick. Still a lag and wait before the location appeared.
                                              Thanks again, speak soon. Peter

                                              1. Kitch Membery @Kitch2022-04-25 17:22:55.607Z

                                                Thanks for getting back to me @Peter_Gallacher,

                                                Would you be able to log a bug report for this, Please click here to send us the information we need.

                                                Hopefully the logs will provide us the information we need to work out what is happening.

                                                Thanks in advance. :-)

                                                1. Peter Gallacher @Peter_Gallacher
                                                    2022-04-26 08:38:27.367Z

                                                    Hi @Kitch I've now sent a bug report. In the meantime I look forward to your findings. Many thanks. Peter

                                      • Peter Gallacher @Peter_Gallacher
                                          2022-04-21 16:45:36.592Z

                                          Cheers @Owen_Granich_Young look forward to @Kitch replies/feedback in due course.

                                          1. Peter Gallacher @Peter_Gallacher
                                              2022-04-21 16:48:07.873Z

                                              P.S. I am on the latest Pro Tools, not the latest Mac OS. That's what I meant to say. I'm still on Big Sur 11.6. Waiting with baited breath to upgrade to Monterey. @Owen_Granich_Young

                                              1. I'm not leaving mojave anytime soon, lol.

                                                1. If it's any consolation / helpful, I have a user of one of my packages who seems to be experiencing lag times on some of my scripts on Big Sur.

                                                  1. Peter Gallacher @Peter_Gallacher
                                                      2022-04-21 17:57:17.424Z

                                                      Hi @Chris_Shaw that’s interesting. Thx