There are a bunch of projects on github for DDS based function generators for STM32. Every now and then I'm thinking about doing something with one of those projects, and possibly improve it. The goal would be to do (very slow) DDS "sample sorting" in software, to generate a buffer, and then send that buffer to the DAC via DMA. When the settings change (wave form, amplitude, frequency) the uC first calculates a new buffer, and then modifies the DMA to use that new buffer (ideally near a zero crossing, so output disruption is minimal) Most of the software for this is pretty straight forward. The only doubt I have is wraparound for the DMA buffer. I think newer STM32 chips can wraparound DMA seamlessly, but older variants would have a timing gap. If such a gap has a fixed width, it can be partially compensated for in software.
But overall, if you want / need performance, put the whole thing (possibly including the uC) into an FPGA.