I would like to implement a developement of this idea into an upgraded HMI version.
A single 12ax7 cascaded double triode where I change some parameters by transposing this web page:

http://www.trioda.com/tools/triode.html

in C for a 3,5" HMI connected to an Arduino Due/Mega: I can show the main parameters on the HMI and hear what I'm seeing.

Some of you guys know how I can translate that page into C, or at least how to determine first five harmonic distortion amount and all other parameters?

Thanks alot.