Doing all that stuff by hand is certainly possible using the automation editor as temporary workspace, but it is incredibly tedious and fiddly, so I just wrote a script instead which generates the LFO envelope points for me. Unfortunately, it’s not yet possible to directly read/write the LFO envelope points via scripting, so I had to hack my way around this a little bit.
My script first loads a Scala tuning file and generates a table of tuning frequencies to use. A new temporary track is a created and the desired device is added to that track. The script then goes through the table of generated frequencies one by one and sets the device parameter to the correct frequency (or delay time) via parameter.value_string, then it uses parameter:record_value() to record that parameter value to an automation envelope. The automation recording step is necessary in order to correctly convert the value from its scaled range down to the [0.0, 1.0] range that is needed for the LFO envelope. Once the table of point values has been generated, I output that data to an XML file whose contents can finally be copy/pasted by hand from a text editor back into the LFO envelope.
The whole process would be a lot easier if we could simply write directly to the LFO envelope via scripting, and I could even write a really nice instrument generator tool which creates the entire DSP chain for you, but for now this is the best workaround that I came up with.
I will probably post my LUA code to the forum when I’ve had a chance to clean it up a bit.