A few days ago I wrote about Frequency Shift Keying (FSK), a way to encode digital data in an analog signal using two frequencies. The extension to multiple frequencies is called, unsurprisingly, Multiple Frequency Shift Keying (MFSK). What is surprising is how MFSK sounds.
When I first heard MFSK I immediately recognized it as an old science fiction sound effect. I believe it was used in the original Star Trek series and other shows. The sound is in once sense very unusual, which is why it was chosen as a sound effect. But in another sense it’s familiar, precisely because it has been used as a sound effect.
Each FSK pulse has two possible states and so carries one bit of information. Each MFSK pulse has 2n possible states and so carries n bits of information. In practice n is often 3, 4, or 5.
Why does it sound strange?
An MFSK signal will jump between the possible frequencies in no apparent; if the data is compressed before encoding, the sequence of frequencies will sound random. But random notes on a piano don’t sound like science fiction sound effects. The frequencies account for most of the strangeness.
MFSK divides its allowed bandwidth into uniform frequency intervals. For example, a 500 Hz bandwidth might be divided into 32 frequencies, each 500/32 Hz apart. The tones sound strange because they are uniformly on a linear scale, whereas we’re used to hearing notes uniformly spaced on a logarithmic scale. (More on that here.)
In a standard 12-note chromatic scale, the ratios between consecutive frequencies is constant, each frequency being about 6% larger than the previous one. More precisely, the ratio between consecutive frequencies equals the 12th root of 2. So if you take the logarithm in base 2, the distance between each of the notes is 1/12.
In MFSK the difference between consecutive frequencies is constant, not the ratio. This means the higher frequencies will sound closer together because their ratios are closer together.
As I discussed in the post on FSK, abrupt frequency changes would cause a signal to use an awful lot of bandwidth. The same is true of MFSK, and as before the solution is to taper the pulses to zero on the ends by multiplying each pulse by a windowing function. The FSK post shows how much bandwidth this saves.
When I created the audio files below, at first I didn’t apply pulse shaping. I knew it was important to signal processing, but I didn’t realize how important it is to the sound: you can hear the difference, especially when two consecutive frequencies are the same.
The following files are a 5-bit encoding. They encode random numbers k from 0 to 31 as frequencies of 1000 + 1000k/32 Hz.
Here’s what a random sample sounds like at 32 baud (32 frequency changes per second) with pulse shaping.
Here’s the same data a little slower, at 16 baud.
And here is is even slower, at 8 baud.
If you know of examples of MFSK used as a sound effect, please email me or leave a comment below.
Here’s one example I found: “Sequence 2” from
this page of sound effects sounds like a combination of teletype noise and MFSK. The G7 computer sounds like MFSK too.
2 thoughts on “Multiple Frequency Shift Keying”
This sound effect was straightforward to generate using analog synthesizers (like a Moog). White noise is put into a sample-and-hold module, gated by a clock. The resulting random stepped voltage drove a voltage-controlled oscillator which generated random pitches at the clock rate.
You can also shape the frequency signal itself before applying it to the sine wave, which gives you a signal that’s trivially constant-envelope (which you don’t necessarily get if you lap together two sines of different frequencies, even if your windowing function is smooth and symmetric), but has no frequency discontinuities. This is commonly called Gaussian FSK. Adjusting the width of the filter is a tradeoff between lower bandwidth (more gradual frequency changes) and lower ISI (more rapid frequency changes).