SetValueAtKey for Audio Component Properties

New Here ,
Jun 15, 2022 Jun 15, 2022

Copy link to clipboard

Copied

Similiar to how you can set like Scale, Position etc for video component properties,  is there a way to set Keyframes for Audio Component Properties?  Here's what I'm doing:

proj = app.project;
sequence1 = proj.activeSequence;
myTime = new Time();
myTime.seconds = 2;
audioproperty = sequence1.audioTracks[0].clips[0].components[0].properties[1].getValueAtTime(myTime);
alert(String(audioproperty));
sequence1.audioTracks[0].clips[0].components[0].properties[1].setValueAtKey(myTime,.8,1);
 
So the alert correctly returns a float value from 0 to 1 for the slider position of "Volume Level".  However I can't the last line to set any keyframe values.
 
Any ideas on why this isn't working?
TOPICS
SDK

Views

62

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 15, 2022 Jun 15, 2022

Copy link to clipboard

Copied

Does isTimeVarying() suggest that there are keyframes enabled and present, on that stream ? 

I don't see you acquiring those keyframes, using getKeys()...


Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 15, 2022 Jun 15, 2022

Copy link to clipboard

Copied

Just checked
-isTimeVarying() returns TRUE
-getKeys returns the array of keys correctly
-getValueAtKey works correctly (time input is that particular audio clips time, not the overall sequence time)
 
Only thing I can't get to work is setValueAtKey

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2022 Jun 16, 2022

Copy link to clipboard

Copied

LATEST

-setValue() works correctly

-setTimeVarying() works correctly

 

I still can't get setValueAtKey to work for some reason

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines