Thanks, I've just built it (first time I've tried) and it seems to be working .
Here is an example of the kind of thing I'm hoping to do with such functions:
https://youtu.be/LgSNohN_h9I
In this example I had to specify each modulator in the script but it will be great when this script can just inserted in the container and it will add the modulators itself.