Vary the voltage of a water fountain pump according to the frequency

I think you should use the Fast Fourier Transform (a library) to split music signal into required frequency ranges.