Error received when selecting and unhiding a track.
Error received when selecting and unhiding a track.
System Information
SoundFlow 5.2.2
OS: darwin 21.6.0
ProductName: macOS
ProductVersion: 12.6
BuildVersion: 21G115
Steps to Reproduce
-
Have a track named " _st_06_HI_ARPS" present and hidden (in my case it is also within a folder track),
-
Run the following code:
sf.ui.proTools.trackSelectByName({ names: [" _st_06_HI_ARPS"], deselectOthers: true });
- Receive the following error in log:
24.02.2023 13:56:58.28 [Backend]: ProTools version: 22.12.0.326 class: PT2022_12
ProTools processID: 31387
24.02.2023 13:56:58.28 [Backend]: ProTools version: 22.12.0.326 class: PT2022_12
ProTools processID: 31387
24.02.2023 13:57:09.36 [Backend]: #StreamDeck: {"action":"org.soundflow.streamdeck.sfcommand","context":"8d860433685cd9df6625703cb18ecdf6","device":"190A9A32C4F0C35B5CC15AA8BD23F714","event":"keyDown","payload":{"coordinates":{"column":0,"row":1},"isInMultiAction":false,"settings":{"commandId":"user:cldav56zg00006p10fry8qf84:cldkjdllg0000td106m00l1af"}}} -> -- Workspace
24.02.2023 13:57:09.37 [Backend]: >> Command: -- Workspace [user:cldav56zg00006p10fry8qf84:cldkjdllg0000td106m00l1af]
24.02.2023 13:57:11.09 [Backend]: Logging error in action (01) TrackMakeVisibleByListItemAction: Track ' _st_06_HI_ARPS' did not show up after several attempts
Logging error in action (01) SelectTracksByNameAction: Could not make track visible
24.02.2023 13:57:11.09 [Backend]: !! Command Error: -- Workspace [user:cldav56zg00006p10fry8qf84:cldkjdllg0000td106m00l1af]:
Could not make track visible ( -- Workspace: Line 1)
Track ' _st_06_HI_ARPS' did not show up after several attempts
<< Command: -- Workspace [user:cldav56zg00006p10fry8qf84:cldkjdllg0000td106m00l1af]
Expected Result
Simply select/unhide the track and not throw an error.
Actual Result
The individual track is selected/unhidden but I receive an error.
Workaround
Unfortunately not.
Other Notes
Raphael is a G.
Links
User UID: QUiyAEusqkhhXSNMChA4jYY8tjz2
Feedback Key: sffeedback:QUiyAEusqkhhXSNMChA4jYY8tjz2:-NP4RDbmEgq9ldVTeySO
- Kitch Membery @Kitch2023-02-24 22:04:14.654Z
Hi @Eric_Huergo,
Was there a thread where you were discussing this issue with @raphaelsepulveda? It might be useful for context.
Rock on!
Eric Huergo @Eric_Huergo
Hey @Kitch , there was!
Thanks man! :)
- In reply toEric_Huergo⬆:Kitch Membery @Kitch2023-02-24 22:09:15.171Z
Hi @Eric_Huergo,
As @raphaelsepulveda mentioned in the thread, a screen recording of it failing would be great. :-)
Eric Huergo @Eric_Huergo
Will do. Might it be better to provide a screen recording of just the
sf.ui.proTools.trackSelectByName({ names: [" _st_06_HI_ARPS"], deselectOthers: true });
failing, or might it be better to show it in the context of the script I'm trying to make work:
/** @param {{ trackA: string, trackB: string, includeTargetTracks?: boolean, includeHidden?: boolean }} args */ function selectTracksBetween({ trackA, trackB, includeTargetTracks = false, includeHidden = false }) { function getTrackIndex(trackName) { const trackIndex = allTrackNames.indexOf(trackName); if (trackIndex === -1) throw `${trackName} not found in session`; return trackIndex; } sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const allTrackNames = includeHidden ? sf.ui.proTools.trackNames : sf.ui.proTools.visibleTrackNames; const trackIndexes = [trackA, trackB] .map(getTrackIndex) .sort((a, b) => a - b); trackIndexes[+includeTargetTracks]++; const trackRange = allTrackNames.slice(...trackIndexes); sf.ui.proTools.trackSelectByName({ names: trackRange, deselectOthers: true }); } selectTracksBetween({ trackA: "Audio 1", trackB: "Audio 15", includeTargetTracks: true, includeHidden: true });
Kitch Membery @Kitch2023-02-24 22:12:46.803Z
Just this one so it narrows it down :-)
sf.ui.proTools.trackSelectByName({ names: [" _st_06_HI_ARPS"], deselectOthers: true });
Kitch Membery @Kitch2023-02-24 22:20:36.823Z
Out of curiosity do you see the same error if you run this script?
sf.ui.proTools.trackGetByName({ name: " _st_06_HI_ARPS", makeVisible: true }); sf.ui.proTools.mainWindow.invalidate(); sf.ui.proTools.trackSelectByName({ names: [" _st_06_HI_ARPS"], deselectOthers: true });
Eric Huergo @Eric_Huergo
Working on getting that video but when I ran that code just now I got the following:
Could not make track visible ( -- Workspace: Line 5) Track ' _st_06_HI_ARPS' did not show up after several attempts
Kitch Membery @Kitch2023-02-24 22:23:37.944Z
Thanks for that. :-)
Eric Huergo @Eric_Huergo
Oh my God, I think of I'm just fried from having been working on this for quite some time.
I just realized while recording the video that I made a pretty dumb mistake - At some point whilst working on the script a space made it's way into the name of the track. Feel a little bit dumb that only now did I catch it.
My apologies but also LOL.
Thanks for the support - that function seems to be running fine now.
Kitch Membery @Kitch2023-02-24 22:31:59.059Z
No worries at all this happens to me on a weekly basis hahaha :-)
Have a great weekend!
Eric Huergo @Eric_Huergo
Hahaha thanks for the kind words, you too man!
I guess, rock on! :p
- In reply toEric_Huergo⬆:Raphael Sepulveda @raphaelsepulveda2023-02-24 23:21:28.048Z2023-02-24 23:27:38.617Z
@Kitch, I found the issue!—it’s track numbers when set up in a particular way.
How to repro:
- Make sure Track numbers are showing: View > Track Number
- Setup > Preferences > Display tab > Track Position Numbers Stay with Hidden Tracks (Uncheck)
- Create a session with a few audio tracks. Hide one of them.
- Run
log(sf.ui.proTools.trackNames);
, you will notice that the hidden track now has a space in front of the name that is not present in the actual track name (ie. "Audio 1" when hidden logs " Audio 1". - Run
sf.ui.proTools.trackSelectByName({ names: ["HIDDEN TRACK NAME HERE"], deselectOthers: true });
- Nothing happens, most likely due to a track name mismatch. In Eric's case, he did get a thrown error but I was not able to get that happening on a simplified repro. I do think the source of the issue is the same.
Kitch Membery @Kitch2023-02-24 23:22:58.851Z
Thanks Raph!
I'll check it out
- In reply toraphaelsepulveda⬆:
Kitch Membery @Kitch2023-02-25 00:07:07.467Z
Very helpful. good sleuthing!
- SIn reply toEric_Huergo⬆:SoundFlow Bot @soundflowbot
This issue is now tracked internally by SoundFlow as SF-768