Possible Bug: Automator.addAutomationCurve Not Accepting Parameter Argument

(James) #1


I’m trying to set up an automation curve to a parameter. Calling effect.addAutomator(effect.properties.level) works as expected.

However, when calling automator.addAutomationCurve(parameter), it returns an error of “Relationship ‘parameter’ expects a destination of entity type ‘ParameterPrototype’”. Passing in a parameter preset or the returned parameter variable of adding a preset parameter to the event does not work.

This is the full error message is:

Error: Relationship ‘parameter’ expects a destination of entity type ‘ParameterPrototype’., callstack:
(project = ProjectScriptable(name = “”), automator = (ManagedObject:Automator), parameter = (ManagedObject:ParameterProxy)) at :/Scripts/managed_objects.js:240
(parameter = (ManagedObject:ParameterProxy

Note on the error message: passing a preset and passing the parameter in the event gives two different messages about what entity is expected. One expects a ‘ParameterPrototype’ while the other expects a ‘ParameterProxy’.

I tried creating a ‘curveDefinition’ that follows along with what the error message is saying:

var curveDef = {name: “ParameterThatIsGoingToControlTheAutomator”, automator: automatorI’mAddingCurveTo, parameter: parameterInEvent,};
var curve = automator.addAutomationCurve(curveDef);

This way stops the error message but curve is not valid and the parameter argument is null.

I do not know what a ‘ParameterPrototype’ is; I only know what a ‘ParameterProxy’ is as that’s what entity type the parameter in the event is saying it is when calling .dump().

Lastly, doing curve.parameter = parameterInEvent does not change anything.

Any help is appreciated,

(リチャード清水) #2

Hi James,

You need to pass in the parameter’s preset, not the one in the event in order to attach an automation curve via scripting.

Assuming you already have an “automator” created and attached to a property, you can try the following line:

var curve = automator.addAutomationCurve(event.parameters[0].preset)

This isn’t very clear in the documentation so I’ll make a note to update these in the future.


(James) #3

Thank you Richard for your help :slight_smile:

(リチャード清水) #4

No problem, James.

Do you mind if I ask what you are using this scripting for? We may be able to improve our scripting API to help with this in future releases.


(James) #5

Hi Richard,

Your reply didn’t ping for me so please excuse my very late reply.

My goal was to automate setting up occlusion on the main event and on a reverb return.

It’s been a long time since I experimented on this but here is the basic logic:

Create a return track, add a lowpass to it followed by the reverb send. Then bring down the volume of the return track to mute it.

The master track then adds a send to this return track with a lowpass afterwards.

Finally, add three parameters: ‘Event Occlusion’, ‘Reverb_Name_Volume’ and ‘Reverb_Name_Occlusion’. And add automation curves from a preset.

Although I imagine there’s an easier way to do this, this lets the event have separate occlusion values for the direct and reflection sounds -as well as only affecting the event, and not whole busses. You can also then add more reverbs by adding another return track and send.

I also automated creating new parameters and reverb buses. These parameters were then easy to add to the event from a dropdown menu.

I think -before I finished experimenting on this- it was a little difficult getting the automation curves to carry over, but I think that’s just me not working long enough on it. Plus, it was my first usage of javascript and Studio API so was learning the syntax at the same time.

My only real wish is for occlusion and reflection to be a little higher level. I think all the tools are there but it may be a lot of work for small teams that don’t have someone dedicated to audio programming.

(リチャード清水) #6

Hi James,

Thank you for providing that detail.

Have you looked into using Default events? These can let you have a template with that setup (return track, filters, parameters). This is only at the time of creating an event, however.

Thank you for the feedback on occlusion and reflections. I’ll pass the suggestion onto the API team for consideration.