1 unstable release
new 0.1.0 | Jan 28, 2025 |
---|
#69 in Audio
320KB
893 lines
The Taylorator
The Taylorator is a piece of software which allows you to use an SDR (such as a LimeSDR) to transmit music on every valid frequency in the FM broadcast band. It's named the Taylorator because it was originally written to broadcast Taylor Swift on every channel at once, to force everyone to listen to her music.
I built this because I thought it would be funny.
Check out the demo here, or read the blog post!
How?
This repository is just software, so how do we create radio waves? We use something called an SDR (Software Defined Radio). This allows us to do all of our math in software, compute an arbitrary waveform, and send it to the SDR. The SDR essentially acts as a very high speed sound card.
I've only tested this project with a LimeSDR (pictured above) but it should work with others. Minor code changes may be required.
Every valid frequency?
(Note that I am Canadian and the things here may or may not apply outside of Canada and the US).
The FM broadcast band spans 88 - 108 MHz. Due to the required bandwidth of each radio station, as well as legal regulations, stations can only be placed on odd-numbered frequencies (such as 88.3, 97.9, 103.7, etc).
By default, the Taylorator will target every odd-numbered frequency in this band, although this is configurable via command-line arguments. This works out to 100 different songs which will be played at the same time. The Taylorator prints out a list of which song can be found on each frequency.
Performance
A significant amount of the effort of this project was just getting it to run fast enough. With 20MHz of bandwidth, we're sampling at 20MS/s, and with 100 channels, we're looking at quite a bit of computation we need to do!
My laptop, with a 10th gen i5 CPU, is too slow to handle the full FM broadcast band in real-time. My desktop, a Ryzen 2700X, is able to handle it, though, at about 2-3x realtime. If you can't handle the full FM broadcast band, you can always lower the frequency range (and thus occupy less channels). CPU performance scales with the square of the frequency range. In other words, decreasing the frequency range a small amount will result in disproportionately less CPU usage.
RAM usage can also be a little high, because all of your music needs to be loaded into memory. Depending on your music, a few gigabytes is not unreasonable. There's also some per-thread overhead on top of this. If you're running out of RAM, try spawning fewer threads using the -t
option.
Is this legal?
So uh, technically probably not, unless possibly if you're in a Faraday cage.
In this case we're only transmitting at a few milliwatts, and that power is being spread over many MHz, so it's almost undetectable from more than a few dozen meters away. This is not an endorsement to do illegal things, however. Also, if you connected your SDR to an amplifier you would almost certainly grab the attention of some sort of governing body. The FM broadcast band is generally pretty well protected, and the Taylorator essentially becomes a jammer at higher power levels.
<legal disclaimer> Don't do illegal things! And if you do, don't tell me about it! </legal disclaimer>
Dependencies
~11–21MB
~370K SLoC