Shift-keying is a method used widely for data transmission over things such as phone lines, radio waves, et c. One quite famous example is the the Bell 202 modem. This script generates PSK, FSK, or ASK (configurably) depending on the configuration.
This script was adapted from a SAME header encoder located here and made by nicksmadscience. This script is a generalized version of that one.