quoted text
Hello,
I've recently started using Soundflow and can't find a suitable solution for the monitoring commands I would like to implement.
I'm on Pro Tools and I have a dedicated monitor audio track that receives signal from the mix bus, but also has reference tracks on it, so I can switch between my mix and older/other mixes by pressing the input monitoring button.
For now I'm using this script I found online:
*function trackToggleInput(trackName) {
var track = sf.ui.proTools.trackGetByName({ name: trackName }).track;
var inputBtn = track.buttons.whoseTitle.is('TrackInput Monitor').first;
inputBtn.elementClick();
}
trackToggleInput('MONITOR');*
The problem here is, that by changing the playlist on my monitor track, the track is no longer visible as 'Monitor', hence the command does not run. Pro Tools does not allow multiple playlists to have the same name.
Is there a simple way to work around that issue? My first thought was a command which selects the mix bus track (which always has the same name) and then moves one track downwards in the selection, so that the different names of the monitor track are not an issue anymore.
I'd very much appreciate help with this!
Thank you
- Kitch Membery @Kitch2022-12-08 18:07:15.436Z
Hi @Niklas_Lueger,
Great question. You could do something like this, which will toggle the input monitor button for the first track who's name starts with "MONITOR".
function trackToggleInput(trackName) { sf.ui.proTools.mainWindow.invalidate(); const visibleTrackNames = sf.ui.proTools.visibleTrackNames; const targetTrackName = visibleTrackNames.find(name => name.startsWith(trackName)); const track = sf.ui.proTools.trackGetByName({ name: targetTrackName }).track; const inputBtn = track.buttons.whoseTitle.is('TrackInput Monitor').first; inputBtn.elementClick(); } trackToggleInput('MONITOR');
Rock on!
Chris Shaw @Chris_Shaw2022-12-08 20:40:29.331Z
I think the issue is that when @Niklas_Lueger switches the playlist on the track he wants to input toggle the script won't work.
Since the track being toggled is always under the master we can get the correct track name by finding the track index and selecting the track below it by increasing the track index by 1:
Just change the name of the mix bus track name in the first line…const mixBusName = "---Master---"; function trackToggleInput(mixBusName) { sf.ui.proTools.mainWindow.invalidate(); const visibleTrackNames = sf.ui.proTools.visibleTrackNames; const mixBusIndex = visibleTrackNames.indexOf(mixBusName) const targetTrackName = visibleTrackNames[mixBusIndex + 1]; const track = sf.ui.proTools.trackGetByName({ name: targetTrackName }).track; const inputBtn = track.buttons.whoseTitle.is('TrackInput Monitor').first; inputBtn.elementClick(); } trackToggleInput(mixBusName)
Kitch Membery @Kitch2022-12-08 20:46:33.739Z
Ah yeah, I was only thinking of the playlist name incrementing, not changing completly. Thanks for the follow-up Chris, My morning coffee had not set in yet. :-)
- In reply toChris_Shaw⬆:NNiklas Lueger @Niklas_Lueger
Amazing! That’s exactly what I was looking for
Thank you for your help!