We have a "speaker", that can make a single frequency at a time (0 - 130k Hz). So we can play a tune by making it play a tone for 1 sec and then the next tone for 0.5 sec etc. We can change the length and frequency of the tones pretty quickly. But we can play any sound as they are typically a superposition of various frequencies (Fourier)... Or can we? Is there some algorithm to convert a sound signal into a sequence of sine waves.
Yes, as long as we are also allowed to vary the amplitude versus time and we're allowed any time period in which to change frequency. Any single valued waveform can also be described in terms of instantaneous frequency versus time, where the instantaneous frequency is the derivative of phase so in this case the rate of change in phase at any given point in time.
If the OP is referring to FM modulation itself (encoding the instantaneous amplitude of a real waveform to the frequency of a constant envelope sinusoid), then yes this is also done where the parameter that can be varied is the frequency deviation (linear mapping of waveform amplitude to frequency) resulting in the modulation index and ultimately the bandwidth required of the modulated signal. This modulated signal would need to be demodulated with a frequency discriminator to recover the original waveform.