Set AFL/PFL level?
Anyone know how to set the AFL/PFL level in SoundFlow? The only way i know how to control it is by Command-clicking the Solo button when in AFL/PFL mode. Would love to have a way to set this level without having to do it that way. I believe it's a universal setting for the session.
thanks
ben
- Ben Rubin @Ben_Rubin
bumping this thread. anyone have any ideas?
Chris Shaw @Chris_Shaw2022-03-29 19:06:33.410Z2022-03-29 23:13:45.922Z
Hey Ben:
Unfortunately there's no way to directly enter the PFL level but you could simulate a cmd-click and drag.Use this script and tweak the
dragAmount
to set the level you want.
Each time trigger the script the gain will be lowered more.
Use negative values withdragAmount
to raise the level.
As written, each press will lower the gain by a db. (assuming the initial level is 0).
Doubling thedragAmount
value will lower by 2, doubling again will be 4 db, etc)There must be at least one track selected.
The first selected track must be visible in the edit window for this to work.// Tweak drag amount(in pixels) to adjust level change (use negative numbers to adjust gain upward) const dragAmount = 15 //get solo button XX/Y parameters const soloButtonFrame = sf.ui.proTools.selectedTrack.soloButton.frame const soloX = soloButtonFrame.x + soloButtonFrame.w / 2 const soloY = soloButtonFrame.y + soloButtonFrame.h / 2 // cmd -click and drag AFL Popup fader sf.mouse.simulateDrag({ isCommand: true, startPosition: { x: soloX, y: soloY }, endPosition: { x: soloX, y: soloY + dragAmount } }); //slight pause sf.wait({intervalMs:150}); //cmd click Solo to briefly show new gain setting sf.mouse.down({ position: { x: soloX, y: soloY }, isCommand: true }) sf.wait({intervalMs:300}); sf.mouse.up({ position: { x: soloX, y: soloY + dragAmount } });
Use this to set Level to unity / 0db:
//get solo button XX/Y parameters const soloButtonFrame = sf.ui.proTools.selectedTrack.soloButton.frame const soloX = soloButtonFrame.x + soloButtonFrame.w / 2 const soloY = soloButtonFrame.y + soloButtonFrame.h / 2 sf.ui.proTools.selectedTrack.soloButton.mouseClickElement({ isCommand: true, isControl: true }) //cmd - click Solo to briefly show new gain setting sf.mouse.down({ position: { x: soloX, y: soloY }, isCommand: true }) sf.wait({ intervalMs: 300 }); sf.mouse.up({ position: { x: soloX, y: soloY } });
Ben Rubin @Ben_Rubin
Brilliant, Chris! Thanks so much for this. Works great!
Btw, it's not necessary to select more than one track because the AFL/PFL level is universal for all tracks.
Ben Rubin @Ben_Rubin
To get the exact level I want, I just put the two scripts in succession (with the 0db first). A drag amount of 242 gets me to -16 db. So great as using the mouse is so inaccurate sometimes.
- In reply toBen_Rubin⬆:
Chris Shaw @Chris_Shaw2022-03-30 16:28:28.619Z
But the script could fail if more than one track is selected and the first select the track is offscreen.
Ben Rubin @Ben_Rubin
understood.