I would love to be able to have Streamdeck keys move the track selection left and right. Then we could navigate to adjacent tracks in order to further modify their plugins and sends in the mix window.
Thanks!
JC3
- Chris Shaw @Chris_Shaw2020-08-06 23:00:39.251Z2020-08-07 00:29:21.111Z
Here you go:
If more than one track is selected the it will move the the leftmost track.
Move Left:
const sup = sf.ui.proTools var allTracks = sup.trackGetVisibleTracks().names; var allTracksCount = allTracks.length var selTracks = sup.trackGetSelectedTracks().names; var currentTrack = selTracks[0] for (var i = 0; i < allTracksCount; i++) { if (allTracks[i].indexOf(currentTrack) == 0) break; } i = i-1; if (i<0) {throw 0} sup.trackSelectByName({ names: [allTracks[i ]] })
Move Right:
const sup = sf.ui.proTools var allTracks = sup.trackGetVisibleTracks().names; var allTracksCount = allTracks.length var selTracks = sup.trackGetSelectedTracks().names; var currentTrack = selTracks[0] for (var i = 0; i < allTracksCount; i++) { if (allTracks[i].indexOf(currentTrack) == 0) break; } i = i + 1; if (i > allTracksCount - 1) { throw 0 } sup.trackSelectByName({ names: [allTracks[i]] });
Chris Shaw @Chris_Shaw2020-08-06 23:06:56.258Z
The drawback of this script is that if you select a track that is not in view, it will not scroll it into view but it will still select it
John Costello @John_Costello
Hi Chris it is wonderful to meet you! This is so cool and thank you so very much! It looks like both scripts are the same, however. I hate to ask, but I wish I knew which value to change to make the "move track select to the right" script work correctly.
Thank you again!
JC3
Chris Shaw @Chris_Shaw2020-08-07 00:07:37.726Z
I fixed it. should work now.
John Costello @John_Costello
I feel so helpless not knowing how to fix this for myself, but it still moves to the left... I have restarted SF but not my machine yet...
Chris Shaw @Chris_Shaw2020-08-07 00:29:59.936Z
My Bad. I fixed it again.
See AboveJohn Costello @John_Costello
You are amazing!!!!! I will have so much fun with this script! When I'm in a section with a lot of tracks, such as percussion, I can now move around and make adjustments without having to click! Thank you for saving me!
- In reply toChris_Shaw⬆:
Chris Shaw @Chris_Shaw2020-08-07 00:41:20.566Z
If you want the tracks to scroll when you get to the far left or far right just add this to the bottom of each script. It will open the comments view and (unfortunately) slow the script down a bit.
// This will scroll the tracks as after you get to the sides of the mix window sf.ui.proTools.menuClick({ menuPath: ["View","Mix Window Views","Comments"], targetValue: "Enable", }); try { sf.ui.proTools.windows.whoseTitle.contains('Mix:').first.groups.whoseTitle.contains(allTracks[i]) .first.textFields.whoseTitle.is('Comments ""').first.elementClick(); sf.keyboard.press({ keys: "escape", }); } catch (err) { throw 0 }
John Costello @John_Costello
How cool! Even better! Thank you Chris!
- In reply toChris_Shaw⬆:
Yujiro Yonetsu @Yujiro_Yonetsu
Hello @Chris_Shaw
This script has helped me a lot. Thank you very much.However, "move to the right" often does not work.
In addition, "Move Left" may also stop at certain tracks.I don't even get an error message, so I don't know, is there a possible cause?