First script using chat GPT (would be awsome that it works as most of protools users want to spend time doing their jobs, would be the perfect companion for me and thousand others !)
Title
First script using chat GPT (would be awsome that it works as most of protools users want to spend time doing their jobs, would be the perfect companion for me and thousand others !)
What do you expect to happen when you run the script/macro?
Hi, asked chat GPT to do that script for me (would be holy grail for me if working). Seems quite simple : Group selected tracks (prompt for name), deactivate groupe, create VCA with that group
Thanks !
Are you seeing an error?
Says error line 16 Shows up in the top right corner pop up (the usual soundflow one)
What happens when you run this script?
Run the script / get error :(
How were you running this script?
I clicked the "Run Script" or "Run Macro" button in SoundFlow
How important is this issue to you?
5
Details
{ "inputExpected": "Hi, asked chat GPT to do that script for me (would be holy grail for me if working). Seems quite simple : Group selected tracks (prompt for name), deactivate groupe, create VCA with that group\n\nThanks !\n", "inputIsError": true, "inputError": "Says error line 16\nShows up in the top right corner pop up (the usual soundflow one)\n", "inputWhatHappens": "Run the script / get error :(", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 5, "inputTitle": "First script using chat GPT (would be awsome that it works as most of protools users want to spend time doing their jobs, would be the perfect companion for me and thousand others !)" }
Source
// SoundFlow script for Pro Tools automation
sf.ui.proTools.appActivate();
// Étape 1 : Vérifie si des pistes sont sélectionnées
const selectedTracks = sf.ui.proTools.selectedTrackNames;
if (selectedTracks.length === 0) {
sf.ui.showModalMessageBox({
title: "Erreur",
message: "Veuillez sélectionner des pistes avant de lancer ce script.",
type: "warning",
});
throw new Error("Aucune piste sélectionnée.");
}
// Étape 2 : Demande à l'utilisateur un nom pour le groupe
const groupName = sf.ui.showInputBox({
title: "Nom du groupe",
message: "Entrez un nom pour le groupe des pistes sélectionnées :",
}).value;
if (!groupName) {
sf.ui.showModalMessageBox({
title: "Erreur",
message: "Vous devez entrer un nom pour le groupe.",
type: "warning",
});
throw new Error("Nom du groupe non spécifié.");
}
// Étape 3 : Crée le groupe
sf.keyboard.press({
keys: "Ctrl+G", // Windows : Ctrl+G, Mac : Command+G
});
sf.wait(500); // Attend que la boîte de dialogue apparaisse
sf.ui.proTools.windows.whoseTitle.is("Create Group").first.textFields.first.value = groupName;
sf.ui.proTools.windows.whoseTitle.is("Create Group").first.buttons.whoseTitle.is("OK").first.click();
// Étape 4 : Désactive le groupe
sf.ui.proTools.mainMenu.click({ menuPath: ["Track", "Group", "Modify Groups..."] });
sf.wait(500);
const groupRow = sf.ui.proTools.windows.whoseTitle.is("Groups").first.tables.first.rows.whoseTitle.contains(groupName).first;
groupRow.buttons.whoseTitle.is("Active").first.click();
sf.ui.proTools.windows.whoseTitle.is("Groups").first.buttons.whoseTitle.is("Done").first.click();
// Étape 5 : Crée une piste VCA
sf.ui.proTools.mainMenu.click({ menuPath: ["Track", "New..."] });
sf.wait(500);
const newTrackWindow = sf.ui.proTools.windows.whoseTitle.is("New Tracks").first;
newTrackWindow.textFields.first.value = "1"; // Créer 1 piste
newTrackWindow.popupButtons.whoseTitle.contains("Audio").first.popupMenu.selectItem({ itemPath: ["VCA Master"] });
newTrackWindow.buttons.whoseTitle.is("Create").first.click();
// Étape 6 : Associe le VCA au groupe
sf.ui.proTools.mainMenu.click({ menuPath: ["Track", "Assign VCA..."] });
sf.wait(500);
const vcaAssignWindow = sf.ui.proTools.windows.whoseTitle.is("Assign VCA").first;
vcaAssignWindow.tables.first.rows.whoseTitle.contains(groupName).first.buttons.whoseTitle.is("Assign").first.click();
vcaAssignWindow.buttons.whoseTitle.is("OK").first.click();
// Confirmation
sf.ui.showModalMessageBox({
title: "Succès",
message: `Le groupe "${groupName}" a été créé, désactivé, et un VCA a été associé.`,
});
Links
User UID: A7eo1Ons58TTfpq4UOyIW5faduF2
Feedback Key: sffeedback:A7eo1Ons58TTfpq4UOyIW5faduF2:-OGUzWA8KoiAbjx8gID2
Feedback ZIP: MUu151dptDPinozExP16s8lfY9rAbG95cOFisRxi9nR9nmF2AXcjIk1blpHa9eK1CjtIYGXxboAeH6xdKL69ZLZa7teeVHpl5g5EKXM1n3YVQpx5MKVzMNPU4MFFeOKQBiY9gKS1rZ6TzJaSqvCyAhJ/ny6stwX0oj+41TQHSon7e9jeMnSSnU/vo3auAkpHugVqmsqIs2nX5BofmxTv5hcG2VSMvqBfqErEsxkBAN+BpqoIJiHXrE9QOnvwsyZSChBXJXCVIfHZZKL1JgVwIah2waMuUlZoKCv2v+DrFPYlAFaHWsPY8OsI3TgYTbdJd8r59xjVz1X3XfnYuF32vj1mTN/5YXCEcqbQfMhRntw=
- Kitch Membery @Kitch2025-01-13 20:30:37.790Z
Thanks for reaching out about this.
We're looking into various ways we can augment the SoundFlow experience through AI, but at this time ChatGPT does not have an understanding of SoundFlow's API. It also does not have an understanding of the Pro Tools UI. Therefore it makes a lot of invalid assumptions that lead to correct-looking but flawed code.
The best way to get help with a workflow you're trying to achieve is to ask in the "How To" section of the forum.
For other ways to get help with SoundFlow please see the following link.
- In reply toVincent_Taurelle⬆:Raphael Sepulveda @raphaelsepulveda2025-01-13 21:48:23.932Z
@Vincent_Taurelle, I recommend you check out the Scheps Session Prep Helpers, which is a free package in the SoundFlow store. It contains a command called "Create Named Group and VCA", which does exactly what you're looking for. No coding required! 😃