Pan Window Follow Track command stops working
System Information
SoundFlow 4.1.1
OS: darwin 19.6.0
ProductName: Mac OS X
ProductVersion: 10.15.6
BuildVersion: 19G2021
Steps to Reproduce
- I Run the Command
- I click on various tracks in Pro Tools, and the pan window follows track selection
- After a short time, this functionality stops and I see the SoundFlow error "Object reference not set to an instance of an object"
Expected Result
Constant pan window follows track selection
Actual Result
consistently stops working
Workaround
no.
Other Notes
Links
User UID: BAHRTrNpErQGSMCXb1Gj6AHsSU13
Feedback Key: sffeedback:BAHRTrNpErQGSMCXb1Gj6AHsSU13:-MHqvnFbhXV4JRdapNvy
Christian Scheuer @chrscheuer2020-09-22 17:58:14.951ZThank you, Curtis!
I believe this is the same bug that we're seeing here:
https://forum.soundflow.org/-2876/output-window-follows-selectiontoggle-command-stopped-working-after-411#post-9We're currently investigating this.
In reply toCurtis_Macdonald⬆:Curtis Macdonald @Curtis_MacdonaldAn update: I break this command and experience this bug when ever I temporarily select all tracks in the session, by the default PT shortcut shift+opt+click. I then see this error and have to re-trigger the command.
Christian Scheuer @chrscheuer2021-01-27 17:01:21.925ZThanks for the update, Curtis.
Can I get you to quote the exact script you're using? I'll need it exactly copied, so I can see which line is line 17.
Curtis Macdonald @Curtis_Macdonaldyes! thanks for the help - I'm using the "Pan Window Follow Track" command, code below:
var lastFocusedTrackName; function main() { var newName = sf.ui.proTools.selectedTrackNames[0]; if (newName === lastFocusedTrackName || newName === undefined) return; lastFocusedTrackName = newName; sf.ui.proTools.selectedTrack.trackOutputToggleShow(); } function runForever(name, action, interval, timeout) { var now = (new Date).valueOf(); if (now - globalState[name] < timeout) throw 0; //Exit if we were invoked again inside the timeout globalState[name] = now; sf.engine.runInBackground(function () { try { while (true) { sf.engine.checkForCancellation(); globalState[name] = (new Date).valueOf(); action(); sf.wait({ intervalMs: interval, executionMode: 'Background' }); } } finally { globalState[name] = null; } }); } runForever("isFollowFocusedTrackRunning", main, 500, 5000);
Christian Scheuer @chrscheuer2021-02-10 16:46:10.490ZThanks, Curtis.
I highly recommend using this command instead:
It has the necessary error handling built in.