No internet connection
  1. Home
  2. How to

deck to navigate markers that has names displayed.

By Les Cooper @Les_Cooper
    2022-01-30 12:23:43.817Z

    I'd love to be able to have a deck that displays my markers chronologically with their names. This way, I could have a simple way of navigation verse 1, pre-choruse 1, choruse 1, verse 2 etc.

    Solved in post #2, click to view
    • 12 replies
    1. samuel henriques @samuel_henriques
        2022-01-30 14:38:10.357Z2022-01-30 15:40:45.513Z

        Hello Les Cooper,

        At this time it's not easily possible to do dynamic surface/decks. In the near future I hope it will be possible to built a surface/deck that gets the markers names from the current session. Until that becomes available, if you have a set nomenclature for markers, you can do a surface/deck with the names of markers you want to navigate to and use a script to navigate to the first with that name.

        Something like this should work, just change "verse 1" here goToLocationName("verse 1").

        /** @param {string} memLocationName */
        function goToLocationName(memLocationName) {
        
            const findMemLocationName = sf.proTools.memoryLocationsFetchFromPtx().collection["list"].filter(m =>
                m.name.includes(memLocationName))[0];
        
            if (findMemLocationName) {
        
                sf.ui.proTools.memoryLocationsGoto({
                    memoryLocationNumber: findMemLocationName.number
                });
            }
        
        }
        
        
        sf.ui.proTools.appActivate();
        sf.ui.proTools.invalidate()
        
        goToLocationName("verse 1")
        
        Reply1 LikeSolution
        1. LLes Cooper @Les_Cooper
            2022-01-30 15:07:14.802Z

            Fantastic!
            Thank you.

          • L
            In reply toLes_Cooper:
            Les Cooper @Les_Cooper
              2022-01-30 15:22:36.842Z

              @samuel_henriques, I'm wondering if it's possible to make this work for hidden markers.
              For exampIe, I have a marker called "BOUNCE" which highlights the region from the start to end of the song on whichever track I'm on.
              It would be great to be able to jump to markers for track height, show/hide etc.

              1. samuel henriques @samuel_henriques
                  2022-01-30 15:29:15.825Z

                  This part of the script is used to go to marker:

                    sf.ui.proTools.memoryLocationsGoto({
                              memoryLocationNumber: // Memory Location Number Here        });
                  

                  It works by numbers, not names.
                  So either you can always use the same number for this.
                  Or if you name those markers and keep them visible,

                  This script will find and go to them.

                  1. samuel henriques @samuel_henriques
                      2022-01-30 15:37:41.914Z

                      AHH, wait, selections are not working for me. Let me try to figure this.

                      1. samuel henriques @samuel_henriques
                          2022-01-30 15:45:32.321Z

                          Got it, and updated the script above.
                          The problem was using sf.proTools.memoryLocationsFetch() ignores the selection markers.
                          Now with sf.proTools.memoryLocationsFetchFromPtx() it works. The only disadvantage I see now is, for the script to read the marker, a newly created marker must be saved in the session. When you create a new marker, you need to save pro tools before you run he script.

                          1. samuel henriques @samuel_henriques
                              2022-01-30 15:52:24.698Z

                              IF you really want to keep them hidden, it is possible to script : un-Hide them, got to marker, and hide again.

                              1. samuel henriques @samuel_henriques
                                  2022-01-30 16:03:22.635Z

                                  Actually this works without the marker being visible. you can ignore my proposition to show all marker types

                                  1. LLes Cooper @Les_Cooper
                                      2022-01-30 16:07:40.906Z

                                      Thanks @samuel_henriques, This is a bit embarassing but I'm quite new to the coding side of things.
                                      Where* exactly *do I put the number?
                                      I've tried right after the word number and after a colon as well as after the brackets.

                                      1. samuel henriques @samuel_henriques
                                          2022-01-30 16:11:37.249Z

                                          Not problem at all:

                                          You don't need the complete script if you know the numbers of the markers, you only need this bit. And with the new SoundFlow update there are ready made decks/surfaces that go to marker numbers

                                          here:

                                            sf.ui.proTools.memoryLocationsGoto({
                                                      memoryLocationNumber: // Memory Location Number Here        });
                                          
                                          1. LLes Cooper @Les_Cooper
                                              2022-01-30 16:19:00.400Z

                                              Great, thanks SO much Samuel!

                              2. P
                                In reply toLes_Cooper:
                                Philip weinrobe @Philip_weinrobe
                                  2022-02-10 22:37:17.419Z

                                  hi all
                                  for some reason i can't get this script to work
                                  here's the error:

                                  10.02.2022 17:36:37.85 [Backend]: !! Command Error: Memory Location - Verse 1 [user:cktj8p6a80003y610qt32zw39:ckzhi4zi7000tbm10y3yzq2d1]:
                                  Object reference not set to an instance of an object. (Memory Location - Verse 1: Line 4)
                                  System.NullReferenceException: Object reference not set to an instance of an object.
                                  at SoundFlow.ProjectSystem.Formats.Ptx.PtxSessionReader.ReadFileEntries() + 0x1a
                                  at SoundFlow.ProjectSystem.Formats.Ptx.PtxSessionReader.Read() + 0x6e
                                  at SoundFlow.Shortcuts.Ax.AxNodes.AxPtxSession.GetSession() + 0x73
                                  at SoundFlow.Shortcuts.Automation.Actions.FetchMemoryLocationsFromPtxAction.Execute(FetchMemoryLocationsResult) + 0x5b
                                  at SoundFlow.Shortcuts.Automation.AutoAction`1.d__20.MoveNext() + 0x135

                                  << Command: Memory Location - Verse 1 [user:cktj8p6a80003y610qt32zw39:ckzhi4zi7000tbm10y3yzq2d1]