Correct note frequency for STM32 based MIDI synth
Most practical table based synthesizers use a fixed playback sample rate, and a fractional phase increment and accumulator register.

Essentially, calculate the phase increment per sample period for your desired output frequency, and pre-multiply by a large power of two, say 1024 or even higher - with an ARM MCU you might as well just multiply it by 2^16.

Each cycle add this phase increment to an accumulator register.

The accumulator will be wider (have more precision) than the address input into your wave lookup table, so simply ignore the lower bits and use only as many upper bits as your lookup table has address bits.  So you might be calculating time with 32-bit accuracy, but only using the upper 16 bits to look up samples in a 65536 element table.

The result is that while the index time of a given sample is approximate, the cumulative time has many bits of accuracy.  This easily gets you sub-Hz resolution, without the need to alter a timer or DAC clock at all.  And that's important, because typically the cleanup circuitry in a DAC and following its output is designed for only a small number of sample rate(s).

Note that if your lookup table contains a sine or other waveform with symmetry, you can probably shrink its size - for a sine you really only need to store a quarter of a wave, as you can get the other three quadrants by inverting phase or amplitude.

Although the question specifically states monophonic output, this technique is extensible to polyphonic outputs.  A modern processor will have little trouble performing a fair number of such lookups and summing them to feed to the DAC at typical audio sample rates.