Access to Session Information
It would be awesome for SoundFlow to be able to pull Session information like Session Name, Session Path and the Session's Bit Depth and Sample Rate. It would be incredibly useful especially in places like the Bounce Window or Export Clips Dialog. Currently I'm using these functions for Bit Depth and Sample Rate, but built in direct access through something like sf.ui.proTools.session
would be awesome!
function getSessionBitDepth() {
sf.ui.proTools.mainWindow.invalidate();
const win = sf.ui.proTools.windows.whoseTitle.is('Session Setup').first;
if (!win.exists) {
sf.ui.proTools.menuClick({
menuPath: ['Setup', 'Session'],
}, `Could Not Open Session Setup Window`);
win.elementWaitFor({},
`Could Not Find Session Setup Window`
);
}
const sessionFormatPanel = win.groups.whoseTitle.is('Session Format').first;
const bitDepthString = sessionFormatPanel.popupButtons.allItems[1].value.invalidate().value;
return bitDepthString;
}
function getSessionSampleRate() {
sf.ui.proTools.mainWindow.invalidate();
const win = sf.ui.proTools.windows.whoseTitle.is('Session Setup').first;
const sessionFormatPanel = win.groups.whoseTitle.is('Session Format').first;
const sampleRateString = sessionFormatPanel.children.whoseRole.is('AXStaticText').allItems[2].value.invalidate().value;
if (win.exists) {
sf.ui.proTools.menuClick({
menuPath: ['Setup', 'Session']
});
win.elementWaitFor({ waitType: 'Disappear' });
}
return sampleRateString;
}
- Chad Wahlbrink @Chad2024-02-13 22:23:13.304Z
@nathansalefski, you can get values relating to session bit depth, sample rate, timecode, etc., from SoundFlow's integration with the Pro Tools SDK.
Try this:log(sf.app.proTools.getSessionSampleRate().sampleRate); log(sf.app.proTools.getSessionBitDepth().currentSetting);
Nathan Salefski @nathansalefski
MAN that AWESOME! The formatting is a bit strange but that's awesome! Are all of the
sf.app.proTools
commands new?- In reply toChad⬆:
Nathan Salefski @nathansalefski
Also in regards to the Export Clips as Files Dialog,
sf.app.proTools.exportClipsAsFiles()
doesn't have an option for selecting the sample rate, could that be added?Christian Scheuer @chrscheuer2024-02-14 01:51:19.954Z
Hi Nathan,
For any ideas to the
sf.app.proTools....
namespace, please open up a thread here, as we can then forward the request to Avid:
https://forum.soundflow.org/top/pt-sdk-ideasUnlike most other automation actions in SoundFlow, the functions here are entirely implemented by Avid so we have much less control over how they work.
Nathan Salefski @nathansalefski
Understood, sorry I assumed it was being implemented by you
Christian Scheuer @chrscheuer2024-02-14 06:37:41.470Z
Maybe one day ;)