Generate Time Track with Nyquist or Python

I’m posting this in the Nyquist board because it seems to be where this functionality might live, but please move it to the scripting board if it is more appropriate.

I would like to be able to generate a “Rhythm skew” effect where I rhythmically change the tempo of audio at a particular bpm, as if it’s playing on a tape that isn’t moving at a constant speed. The easiest way I can find is to generate control points on the envelope of a time track, since this is non-destructive and I can sync it up with my track. How can I do this either with Nyquist or Python Scripting?

Unfortunately, time tracks are not yet available to either Nyquist or Python, other than simply creating an empty time track.

I see. Is there a way for me to “import” a time track that is composed of pairs of (time, value)?

Time tracks are currently mouse powered only. No import / export or scripting.

If you are really determined to make this work, you could manually modify the Audacity “.aup” project file (but be warned, if you make a mistake the project could become unusable).
The .aup file is XML format, and a Time track looks like this:

	<timetrack name="Time Track" isSelected="1" height="100" minimized="0" rangelower="0.900000000000" rangeupper="1.100000000000" displaylog="0" interpolatelog="1">
		<envelope numpoints="3">
			<controlpoint t="0.987261146497" val="1.000000000000"/>
			<controlpoint t="14.904458598726" val="1.078260898590"/>
			<controlpoint t="21.719745222930" val="1.015217423439"/>