No internet connection
  1. Home
  2. Macro and Script Help

Fetch All Memory Locations properties incorrectly displayed

By danielkassulke @danielkassulke
    2024-05-08 20:53:46.898Z

    Title

    Fetch All Memory Locations properties incorrectly displayed

    What do you expect to happen when you run the script/macro?

    This script should fetch all PT memory locations and provide a log of their properties

    Are you seeing an error?

    The object properties are populated incorrectly

    What happens when you run this script?

    Script reliably executes as expected, but the log shows that the properties are displaying incorrectly

    How were you running this script?

    I clicked the "Run Script" or "Run Macro" button in SoundFlow

    How important is this issue to you?

    5

    Details

    {
        "inputExpected": "This script should fetch all PT memory locations and provide a log of their properties",
        "inputIsError": true,
        "inputError": "The object properties are populated incorrectly",
        "inputWhatHappens": "Script reliably executes as expected, but the log shows that the properties are displaying incorrectly",
        "inputHowRun": {
            "key": "-MpfwYA4I6GGlXgvp5j1",
            "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow"
        },
        "inputImportance": 5,
        "inputTitle": "Fetch All Memory Locations properties incorrectly displayed"
    }

    Source

    const pT = sf.ui.proTools;
    pT.appActivateMainWindow();
    pT.mainWindow.invalidate();
    
    let memLocs = sf.proTools.memoryLocationsFetch().collection['List'];
    
    log(memLocs);
    

    Links

    User UID: Qi9NyOFsERSW8NJyb5rdRQ3z39H3

    Feedback Key: sffeedback:Qi9NyOFsERSW8NJyb5rdRQ3z39H3:-NxOyx8wL0KIeZTrwQD0

    Feedback ZIP: eTlDw7Hak2vKjv61BMhTxGkShWBGn8yaR+amGQASY38eoInlwZM8rdjoORyFkIT9F++ESfGzlIVXDC7he0+UKvyUaXdn3OryhXwN0GqzxpGd5eAsqHv+8MBXoRcK2mfTrfLE9A65qoHMLrAKlJStbCce+qOoMuLqA1h69H9VciXvNTpsLABJf42drpdW2o9Xui6CijaZaDhoaRn9nXts/q6LcSRR9pGxr756nG5Pnz9ywD80D/rDSJHmbDkPdFWuB7U0LACHudc6gToNEc3YjjHxwrurb0osUx6yjKtzAp9bOousMLv9iqlrfAM+MHBr43BPswRSbEh4AixjAwOiu/oNOod3yWVG9wgo7o5HknQ=

    • 3 replies
    1. D
      danielkassulke @danielkassulke
        2024-05-08 20:56:49.216Z

        Script as displayed above is the code in full, PT session only has 2 memory locations in it - I was just playing around with the SDK in its simplest form, and noticed the issues. After some digging I also found this issue was noticed by Samuel back in December, so presume it's on SF/Avid's radar: Pro tools 2023.12 new memory locations window - getMemoryLocations #post-5

        1. Fwiw this is not actually SDK, this is preSDK parsing. You can tell because it shows the memory location window while it's doing it... would love if this gets updated for it to cover Colors as well!

          Here's the SDK one, I found one property that seems to break it fetching, but when I mapped it out wihtout that one I think most of them logged correctly. See notes below. I had to go back to work so I might have left a couple not resolved. Of note though, the 'start time' only gives samples even though I'm in Timecode so startTime is no different then startTimeInSamples and the .parent one utterly breaks it see the error commented next to it. I really wish the SDK would pull colors....

          sf.ui.proTools.invalidate()
          const allMemLocs = sf.app.proTools.memoryLocations.invalidate().allItems.map(memLoc =>({
              number : memLoc.number, 
              name : memLoc.name, 
              comments : memLoc.comments,
              starTime : memLoc.startTime, ///I'm in timecode but it's still logging this in samples
              startTimeSamples : memLoc.startTimeInSamples,
              // color : ////Doesn't seem to be able to log color too bad
              endTime : memLoc.endTime,
              zoomSettings : memLoc.zoomSettings,
              trackName : memLoc.trackName,
              windowConfigName : memLoc.windowConfigurationName,
              windowConfigIndex : memLoc.windowConfigurationIndex,
              windowConfig : memLoc.windowConfiguration,
              ///parent : memLoc.parent -- this one seems to break the fucniton  -- Error: Cyclic reference detected.(2023 Memory Location Filter line 18)
              friendlyNodeName : memLoc.friendlyNodeName,  ///what's this? no matter where I put it it logs as 'PtMemoryLocation
              groupEnables : memLoc.groupEnables,
              prePostRoll : memLoc.prePostRollTimes,
              supportAutoUpdate : memLoc.supportsAutoUpdate,
              timeProps : memLoc.timeProperties,
              timeReference : memLoc.reference,
          
          
              }))
          
          log(allMemLocs)