Recalling a track preset
Recalling a track preset
System Information
SoundFlow 5.4.0
OS: darwin 22.4.0
ProductName: macOS
ProductVersion: 13.3.1
ProductVersionExtra: (a)
BuildVersion: 22E772610a
Steps to Reproduce
- Initiate "Recall Track Preset on Selected Track"
Expected Result
Preset in "audio" "Frogpond" "Frogpond Mouth Noise" should load
Actual Result
Dialog: Could not open pop up menu on selected track Line 7.
Workaround
Recalling preset manually.
Other Notes
Upon updating to PT 2023.6
Links
User UID: mQiAyyocvudQzder1Y1uSV6L0rA3
Feedback Key: sffeedback:mQiAyyocvudQzder1Y1uSV6L0rA3:-NXS6kGlX1jf1mNic9wt
Linked from:
- Christian Scheuer @chrscheuer2023-06-12 19:30:02.654Z
Hi Matthew,
Thanks for reporting. When you run this script, does the popup menu open?
It would be super helpful if you'd be able to do a quick screen recording showing this issue so we can hopefully understand better why it happens.- MMatthew Saccuccimorano @Matthew_Saccuccimora
Screen recording: https://frommoonbase.s3.amazonaws.com/Frogpond+preset+fail.zip
My Macro converted to script:
//Calling command "Recall Frogpond Mouth Noise" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clcf936ky0000l110ggp9f9bf")
sf.soundflow.runCommand({
commandId: 'user:ckp49i4j60000a2100yfwywgf:ckfs5niws0007v110s447k1ac#cla9u7jf30000511091w88es2',
props: {}
});sf.ui.proTools.zoomPreset({
zoomPreset: 1,
});//Calling command "Smart Tool: Grabber tool (Separation)" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clcf936ky0000l110ggp9f9bf")
sf.soundflow.runCommand({
commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6jx5y000v7g10jpya5wak#ckv4utxpv000a6010umbmgavl',
props: {}
});//Calling command "Shuffle" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clcf936ky0000l110ggp9f9bf")
sf.soundflow.runCommand({
commandId: 'user:ckp49i4j60000a2100yfwywgf:ckwe7fbnt0001uz10rnd0yajd#ckwe7ihwk0003uz10pr7tl7d4',
props: {}
});//Calling command "Enable: Pre-Roll" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clcf936ky0000l110ggp9f9bf")
sf.soundflow.runCommand({
commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6k813000y7g1033sptv8k#cks0w0g9m000nhu10idsw9n6i',
props: {}
});//Calling command "Enable: Post-Roll" from package "Pro Tools" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckp49i4j60000a2100yfwywgf/clcf936ky0000l110ggp9f9bf")
sf.soundflow.runCommand({
commandId: 'user:ckp49i4j60000a2100yfwywgf:cksb6k813000y7g1033sptv8k#cks81mcxb0002cu10dbsr2e8u',
props: {}
});Christian Scheuer @chrscheuer2023-06-12 19:57:14.341Z
Thanks! I wonder if this is because you're invoking it from an on-screen deck. That means your mouse click focuses SoundFlow, and when the macro then tries to right click the track name to open the popup menu, macOS just sees that mouse click as a way of focusing Pro Tools and therefore doesn't open the popup menu.
To fix that, add an "Activate App's Main Window" action to the top of your macro, and set it to activate Pro Tools.
- MIn reply toMatthew_Saccuccimora⬆:Matthew Saccuccimorano @Matthew_Saccuccimora
OK I'll try that, but I usually trigger it from an iOS device. And this behavior started only after I updated PT to 2023.6.
- MIn reply toMatthew_Saccuccimora⬆:Matthew Saccuccimorano @Matthew_Saccuccimora
Just tried "Activate App's Main Window", to no avail. BUT:
This is getting weirder because I can run the preset on any but the topmost track. I need to mess with it a little I guess.
Christian Scheuer @chrscheuer2023-06-12 20:24:51.816Z
Ok thanks for the update. Keep me posted what you find out.
- MMatthew Saccuccimorano @Matthew_Saccuccimora
OK this works, but ONLY if the track isn't at the top of my edit window. What gives?
Christian Scheuer @chrscheuer2023-06-19 16:24:37.824Z
cc @Kitch
- In reply toMatthew_Saccuccimora⬆:
Kitch Membery @Kitch2023-06-19 18:08:46.658Z
Try using this script instead. It's possible the click position for the track title button needs to be offset ever so slightly for it to work in Pro Tools 2023.6
if (!sf.ui.proTools.isRunning) throw `Pro Tools is not running`; function setTrackPreset(presetPath) { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.titleButton.popupMenuSelect({ isRightClick: true, menuPath: ['Recall Track Preset', ...presetPath], relativePosition: { x: 5, y: 5 }, }); } setTrackPreset({ presetPath:["Avid","Guitars","Rock"] });
Let me know if that works for you. :-)
- MMatthew Saccuccimorano @Matthew_Saccuccimora
Thanks! But I get this error message:
19.06.2023 14:26:38.31 [Backend]: JavaScript error with InnerException: null
!! Command Error: from Kitch track preset opener [user:default:clj36sj0900009h10e532vgf0]:
TypeError: presetPath is not iterable
(from Kitch track preset opener line 6)Kitch Membery @Kitch2023-06-19 18:44:28.456Z
Thanks @Matthew_Saccuccimora,
I'll take another look. :-)
- In reply toMatthew_Saccuccimora⬆:
Kitch Membery @Kitch2023-06-19 18:45:56.287Z
I missed a couple of curly braces.
This should fix it. :-)
if (!sf.ui.proTools.isRunning) throw `Pro Tools is not running`; function setTrackPreset({presetPath}) { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.selectedTrack.titleButton.popupMenuSelect({ isRightClick: true, menuPath: ['Recall Track Preset', ...presetPath], relativePosition: { x: 5, y: 5 }, }); } setTrackPreset({ presetPath:["Avid","Guitars","Rock"] });
- MIn reply toMatthew_Saccuccimora⬆:Matthew Saccuccimorano @Matthew_Saccuccimora
It pleases me that "curly braces" is a technical term in your world.
This worked! I can, in theory, simply insert this section into my macro, right? Renaming the preset path?
Is there an easy way to paste a script into a macro composed of pre-made actions?
- MIn reply toMatthew_Saccuccimora⬆:Matthew Saccuccimorano @Matthew_Saccuccimora
Never mind I think I got it.