Automation Blocks - Modifying Audio Channels and Laying Tracks into Timeline
- April 8, 2024
- 1 reply
- 1627 views
Hi There,
I have a script that does the following...
For all selected project items:
-Modify Audio Channels from Stereo to Dual Mono (some of the selected won't be stereo)
-Lay project items into specific tracks on a sequence dependent on file names.
I have it working, with some flaws...
-It lays project items into the sequence before modifying the audio channels, and then overwrites them on the sequence after modifying audio channels
-If there are no project items with audio channels that need modifying, it still lays the project items in the correct sequence tracks, but gives me an error:
"Cannot set property audioChannelsType (line 4)"
The ultimate result is the script does what I want. But I feel like it's bad practice.
Can you tell me how to modify the script to:
-lay project items in sequence tracks only once, after modifying
-Understand that if no project items need audio channel modification, that's ok
Also, you'll see from the attached script that I repeat the if-do multiple times, just to run the same script. Is there away to combine all those if-do statements into one?

