My favourite old new media guy is Leon Theremin (the guy in the picture is not him) mainly for his first invention the instrument theremin. It must have been something magic to see/have such an instrument in those times. I also have to give credit to him for persuading Lenin to take theremin lessons... As all good inventions theremin also came almost by accident. He was developing an electronic device for measuring the density of gases and noticed the sound it made changed depending on the position of his hand.Here is a recent tribute article for theremin:http://www.bbc.co.uk/news/magazine-17340257What makes his story even more beautiful is that he was accused of counter-revolutionism and was given an 8 years sentence, during which he had to work for the soviet union developing aircraft technology and bugging devices.Theremin also inspired many other free thinking people, including Robert Moog who designed the famous Moog synthesizer.
When I was a kid a few Christmas and birthdays in a row I was hoping that my parents would bring a Sinclair ZX Spectrum home. Well that didn't happen, so my brother and me decided to save money for it ourselves. In half a year we had a second hand Sinclair computer, which, in fact, was built in a military electronics factory "Nuklonas" in our hometown! So in theory it wasn't even a Sinclair, it was a perfect soviet ripoff of the Sinclair ZX Spectrum.
I was too young then to do any programming, but I had a book with some examples of code, which could draw or play things. So with little tweaking I eventually could beep out the whole Lithuanian anthem ("beep" was a function that played a sine wave of certain frequency and duration). That was fun!
But the most fun was of course playing games! The Sinclair did not have a disk drive. To load a game you had to literally play it from a cassette tape. It took approximately from 5 to 10min. I spent long evenings listening to the weird noises these games programs produced. Sometimes I had very disappointing times when games couldn't load because of the cassette wear-out.
Well now that I am grown up, it is finally a chance for me to find out how actually the game loading of ZX Spectrum works! If I can replicate that at least in a primitive way, then I could do some cool stuff with it, like make sounds with encoded text or images and later load them using my ipod or better a cassette player.
It took me quite some googling to figure out the principle. I registered on the Sinclair nerds forum and they gave me some good tips an pointers to sources.
Basically, binary data is converted into a waveform using so called FSK (frequency shift keying) modulation, which in essence is almost like FM. So, binary data, which has only two states 0 and 1 modulates the carrier signal, where 0 produces lower frequency and 1 produces higher frequency. By convention low is 1000hz and high is 2000hz (or sometimes 1200hz and 2400hz). And that's really there is all to it!Except! There are all sorts of little problems!
But for now I want to play around a bit, and for the sake of fun to actually reproduce the sound of ZX Spectrum!
Given the above described model and assuming that binary data is "kind of" random I made the following max patch which indeed produced a very convincing Sinclair sound.
So here every new bit (random in this case) changes (or not) the frequency of a square wave every 10ms. I couldn't really figure out at what rate ZX Spectrum exactly encoded binary data, but in the paper I read it says that typical values for one element in FSK modulation are between 5 and 22 milliseconds. So in an element of 10ms there are 10 cycles of a 1000hz wave (square wave in my case, but it could as well be a sine wave or a saw i guess) and 20 cycles of 2000hz.
Here is the recording of that patch.
And a youtube video of some dude who recorded the actual game being loaded
If you got bored reading this, then try playing some ZX Spectrum games here:
Encoding binary data in sound is a bit more complicated than I showed above. There are various ways and some of them are better at certain things than the others. But the main goal in this business is that actually not a single bit should get lost, otherwise an error will occur. And the real challenge actually seems to be not encoding itself, but interpreting encoded information. But it's a kind of a closed loop, in order to properly interpret the sound, you need to encode it properly :)
So what I am trying to do is to encode and decode a piece of text as well as possible!
I took the following quote from Aldous Huxley book "Brave new world":
Mother, monogamy, romance. High spurts the fountain; fierce and foamy the wild jet. The urge has but a single outlet. My love, my baby. No wonder those poor pre-moderns were mad and wicked and miserable. Their world didn’t allow them to take things easily, didn’t allow them to be sane, virtuous, happy. What with mothers and lovers, what with the prohibitions they were not conditioned to obey, what with the temptations and the lonely remorses, what with all the diseases and the endless isolating pain, what with the uncertainties and the poverty—they were forced to feel strongly. And feeling strongly (and strongly, what was more, in solitude, in hopelessly individual isolation), how could they be stable?
And converted to binary numbers here:
http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp
Then I got a lot of 0s and 1s. Once i had my binary representation, I converted it to sound in the patch I made.
And there you go! I have my recording. It's 1 min. 56 sec. long.
So now that I have the recording, I can play it back analyze it and load the text from it. For that I wired another max patch which seems to be doing the job:
Once the analysis is finished, I get a bunch of 0s and 1s back. So I go on the website again to translate the binaries back to text,
and
look
what
I
see!
Not so bad for the first try. But obviously an error occurred and screwed up the rest of the text. After an eternity of debugging I am convinced that the problem lies in the interpreter side. And that problem is:
1. analysis is too slow
2. it's hard to keep the input syncronized
No wonder there are various techniques which i didn't mention before of how to make sure that the bits don't get lost. One of them is produce kind of opening and closing sounds for every 5 bits.
It basically just means that the computer is sort of reminded (very often) that it's gonna receive 5 bits. In this way it's easier to keep things in sync.
But for now the solution is to encode and decode the information at a much slower rate. But then it means that the above piece of text would take more than 10 min of sound. Not very efficient, is it? :)