Copy link to clipboard
Copied
Hey there,
I have an audio file made up of individual 'quotes' that I need to split a bunch of times. I'm wondering, if I manually mark the portions of the layer that needs to be divided, is there a script that can use these markers and dice up my layer into the the portions I need?
Thank you
Try this:
if (app.project.activeItem && app.project.activeItem instanceof CompItem){
var myComp = app.project.activeItem;
if (myComp.selectedLayers.length > 0){
var myLayer = myComp.selectedLayers[0];
for (var i = 1; i <= myLayer.property("marker").numKeys; i++){
var newLayer = myLayer.duplicate();
newLayer.inPoint = myLayer.property("marker").keyTime(i);
if (i < myLayer.property("marker").numKeys){
newLayer.outPoint = myLayer.property("marker").keyTime(i+1);
}
}
if (m
...
Copy link to clipboard
Copied
Try this:
if (app.project.activeItem && app.project.activeItem instanceof CompItem){
var myComp = app.project.activeItem;
if (myComp.selectedLayers.length > 0){
var myLayer = myComp.selectedLayers[0];
for (var i = 1; i <= myLayer.property("marker").numKeys; i++){
var newLayer = myLayer.duplicate();
newLayer.inPoint = myLayer.property("marker").keyTime(i);
if (i < myLayer.property("marker").numKeys){
newLayer.outPoint = myLayer.property("marker").keyTime(i+1);
}
}
if (myLayer.property("marker").numKeys > 0){
myLayer.outPoint = myLayer.property("marker").keyTime(1);
}
}
}