How to change the shape of a function generator keeping the rate?
In music, we would call this "wavetable synthesis", but most electrical engineers would call this Direct Digital Synthesis (DDS) or a Numerically Controlled Oscillator (NCO).

You need a phase accumulator, a sufficient number of points in your wavetable and a means to interpolate between points (if there are many points in the wavetable, linear interpolation is good enough).  And if you're changing the shape of the waveform, you need to be able to cross-fade from the old wavetable to the new.