Add a new Macro Mapping to an Instrument?

How do I add a new macro mapping to an instrument?

I assume I need to create a new InstrumentMacroMapping and add it to[].macros[].mappings[]?

I’ve found the DeviceParameter I want to map to (.volume_input on a newly created SampleModulationSet which I’ve assigned to sms

I’ve tried:[1].macros[1].mappings[1].parameter(sms.volume_input)

But get an error stating the mapping doesn’t exist…

Sorry to bump. Can anyone confirm if it is possible to create a new Macro Mapping from Lua?