Script in logic not working, please help!
Title
Script in logic not working, please help!
What do you expect to happen when you run the script/macro?
What i'd like to do: 1. Add an I/O plugin to the selected track in Logic Pro. 2. Within the I/O plugin, change the "output" (dropdown menu) and "input" (dropdown menu) settings to my preferences. 3. Set the same track's output to Bus 10. 4. Add a new track with the volume turned all the way down and the input set to Bus 10. 5. Add an auxiliary track with the input set to Bus 10.
Are you seeing an error?
TypeError: Cannot read property 'execString' of undefined (Mixing Analog! line 13)
What happens when you run this script?
it just don't work.
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": "What i'd like to do:\n1. Add an I/O plugin to the selected track in Logic Pro.\n2. Within the I/O plugin, change the \"output\" (dropdown menu) and \"input\" (dropdown menu) settings to my preferences.\n3. Set the same track's output to Bus 10.\n4. Add a new track with the volume turned all the way down and the input set to Bus 10.\n5. Add an auxiliary track with the input set to Bus 10.", "inputIsError": true, "inputError": "TypeError: Cannot read property 'execString' of undefined\n(Mixing Analog! line 13)", "inputWhatHappens": "it just don't work.", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 5, "inputTitle": "Script in logic not working, please help!" }
Source
function setupLogicPro() {
// Add an I/O Plugin to the Selected Track
const addIOPluginScript = `
tell application "Logic Pro"
tell front document
set selectedTrack to first track whose selected is true
-- Add I/O Plugin "Stereo" to selected track
make new I/O plugin at the end of effects of selectedTrack with properties {name:"Stereo"}
end tell
end tell
`;
sf.osascript.execString(addIOPluginScript);
// Change the "Output" and "Input" Settings to SSL Fusion
const changeIOSettingsScript = `
tell application "System Events"
tell process "Logic Pro"
-- Set "Output" dropdown menu to "5-6 (SSL FUSION)"
set value of pop up button 2 of window 1 to "5-6 (SSL FUSION)"
-- Set "Input" dropdown menu to "3-4 (SSL FUSION)"
set value of pop up button 3 of window 1 to "3-4 (SSL FUSION)"
end tell
end tell
`;
sf.osascript.execString(changeIOSettingsScript);
// Set the Track's Output to Bus 10
const setTrackOutputScript = `
tell application "Logic Pro"
tell front document
set selectedTrack to first track whose selected is true
set output of selectedTrack to "Bus 10"
end tell
end tell
`;
sf.osascript.execString(setTrackOutputScript);
// Add a New Track with Volume Down and Input Set to Bus 10
const addNewTrackScript = `
tell application "Logic Pro"
tell front document
set newTrack to make new audio track with properties {input source:"Bus 10", volume:0}
end tell
end tell
`;
sf.osascript.execString(addNewTrackScript);
// Add an Auxiliary Track with Input Set to Bus 10
const addAuxiliaryTrackScript = `
tell application "Logic Pro"
tell front document
set newAuxTrack to make new auxiliary track with properties {input source:"Bus 10"}
end tell
end tell
`;
sf.osascript.execString(addAuxiliaryTrackScript);
}
setupLogicPro();
Links
User UID: AvRFZXKAJtfBlarZS4YAlmcIJLA2
Feedback Key: sffeedback:AvRFZXKAJtfBlarZS4YAlmcIJLA2:-NucAyoEp8nJvJksl3ih
Feedback ZIP: Imov+lQupq816JlFthcbWE2TSPnArZSCYNWJmdD3dBFxZE4mxv/CqKIwWD9d5RSBpi/MDGS2nNH1d3LkY26z2/xnnF9FlNw3DlZ1J2YwC7JBcXTghDG0YPWYCedaDdzet4YHyEcdQNRc+gX/MYqfTi/81L9YZaEF8YaFcK6WWv/oshPsE0WIdKRkLJ4WxuB10CpBiA9c2Cvcou6XzO5uA0RCVO3WGnq5Tr0h26qct12Lendpfn6qux3xidVX/KLZhE6WOsPMSZyKa6qURojTvLzc5fAAJfntRtYwBHOGdIrb750ZzxlpGW7H6GOQ1GbAnToGe+BrOllLjRkge+cByA==
Linked from:
- Kitch Membery @Kitch2024-08-01 21:16:32.902Z
I'm finally getting around to looking at your forum threads. I'm sorry that they had not received replies.
Right now it looks like you have been trying to use AppleScript control Logic Pro. I'm not sure where you found the script/code from, but I don't believe these scripts work, even through the mac os script editor. Were they ever working at any stage? (I'd be very interested to know.)
Right now, for automating Logic Pro, SoundFlow has an official Logic Pro package. You can read more about it here.
https://soundflow.org/integrations/logic-pro
To see what functionality is available in SoundFlow's Logic Package
- Open SoundFlow and select the "Editor" tab.
- Then in the "Package" column on the left, scroll down to the "SoundFlow" folder.
- Inside the SoundFlow Folder you'll find a package for "Logic Pro" with folders that contain Commands for controlling Logic Pro as well as some premade Logic Pro SoundFlow decks.
For steps 1 and 2 you can set inputs and outputs on the selected track, by creating presets in the "Select Track Input" & "Select Track Output" command templates in the "Track Functions Folder".
For step 3 you can create a Preset in the Logic Pro package's "Sends Loader".
For steps 4 - We don't have functionality for adding Auxilary tracks yet in the Logic Pro package. But if this is something you'd like to see implemented please request it in the Ideas section of the forum so it can be considered for a future update.
You can then build a macro with the presets you've created.
I hope that helps.
Please let me know if you have any further questions about this or require more assistance. I'd be happy to help. :-)