My first question! I apologize if this has been asked before (I couldn't find it searching), but is there a way to change the little box that displays the numerical value for "vol"/"dly"/"pk" in either the Edit or Mix window? I tried doing Click UI Element, but A) I couldn't find how to add modifiers to that action - changing the value needs a cmd-click on a Mac - and B) it didn't seem like regular click was working in there either, since it didn't reset the peak value (I know how to do that with a EuControl menu command already).
Thanks in advance!
Eli
- EEli Crews @Eli_Crews
I'm coming to the conclusion that a lack of an answer means this isn't possible. Anybody want to prove me wrong?
Raphael Sepulveda @raphaelsepulveda2022-02-24 03:06:12.375ZHey @Eli_Crews, sorry for the slow response on this one.
Yes, this is possible! The following will command+click on the Volume Indicator of the selected track (Edit window only).
function toggleSelectedTracksAudioVolumeIndicator() { sf.ui.proTools.selectedTrack.groups.whoseTitle.is("Audio IO").first.sliders.first.mouseClickElement({ isCommand: true }); } toggleSelectedTracksAudioVolumeIndicator();- EEli Crews @Eli_Crews
No problem, and thank you so much!!! This is really great, but: extra points if there's a script that also works in the mix window AND skips over delay amount so functions like a volume/peak toggle?
- EEli Crews @Eli_Crews
(Of course that would only apply in Narrow Mix Window mode, in regular mode you can see both volume and peak simultaneously...)
Raphael Sepulveda @raphaelsepulveda2022-02-26 05:41:25.735ZHaha, half a point if I make it toggle but just on the Edit window?
/** @param {'Volume' | 'Delay' | 'Peak' } targetIndicator */ function setTrackAudioVolumeIndicatorTo(targetIndicator) { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const selectedTrack = sf.ui.proTools.selectedTrack; const volumeSlider = selectedTrack.groups.whoseTitle.is("Audio IO").first.sliders.first const currentIndicator = volumeSlider.title.value; let clickCount; if (targetIndicator === currentIndicator) return; if (targetIndicator === 'Volume' && currentIndicator === 'Peak' || targetIndicator === 'Delay' && currentIndicator === 'Peak' || targetIndicator === 'Peak' && currentIndicator === 'Delay') { clickCount = 1; } if (targetIndicator === 'Volume' && currentIndicator === 'Delay' || targetIndicator === 'Delay' && currentIndicator === 'Volume' || targetIndicator === 'Peak' && currentIndicator === 'Volume' ) { clickCount = 2; } volumeSlider.mouseClickElement({ isCommand: true, anchor: 'MidCenter', clickCount }); } function toggleBetweenVolumeAndPeakIndicators() { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); const currentIndicator = sf.ui.proTools.selectedTrack.groups.whoseTitle.is("Audio IO").first.sliders.first.title.value; if (currentIndicator === 'Volume') setTrackAudioVolumeIndicatorTo('Peak'); if (currentIndicator === 'Peak') setTrackAudioVolumeIndicatorTo('Volume'); } toggleBetweenVolumeAndPeakIndicators();- EEli Crews @Eli_Crews
Oh man, this gets at least 3/4 of a point! Thanks so much!