The magnitude output of the FFT is usually visualized in decibels for this very reason. Decibels allow very small components to still be seen when large components are present. The conversion is simple. Since vDSP_zvmags
gives the squared magnitude, you can convert to dB with:
dbval = 10 * log10(mag2val);
or see vDSP_vdbcon
.
This could be normalized between 0 and 1 by dividing by the maximum value of your dB values, but you probably don't want to change this reference point dynamically since it would cause visualization of a constant magnitude to jump around. It would probably be better to just figure out what ranges are typical and normalize to that fixed value.