The ASIO Signal Generator as a musical instrument...


staff
Für Elisa

Swedish translation courtesy of Weronika Pawlak

When I was developing the ASIO Test Signal Generator, since it was such a simple application, I became obsessed with the desire to make it the most accurate tone generator ever created in software to make up for it's complete lack of features. Each tone produced is a perfect sine wave calculated to 80 bits of floating point accuracy. Each signal generated begins and end at a zero point – that is to say, consists of a number of whole sine waves. Furthermore, these signals begin and end with a linear taper equal in duration to some multiple of the period of the signal. The signals are produced with no DC component. Here is the complete specification.

Once I completed the tone generator, I noticed that short musical notes played with it sounded different than your usual test tones. I suppose the linear taper at the start and end gave them some form of wave shaping, and the fact that they were complete whole wave forms added to the musical effect. I imagine a flute would produce such a waveform, if it weren't for the 'breathiness' and resonances, so perhaps I created the perfect flute in the Platonic sense of the word. I began to wonder what music would sound like played on such an instrument.

Months passed since I first created the signal generator, and finally one weekend I decided that I would create an interface to the signal generator so that I could program it to play music. (If only I had done this 40 years ago, I would be have been hailed as a pioneer of electronic music. Alas, I am only a few years behind the times.)

I downloaded the score for a couple of well know pieces, one by Beethoven and the other by Bach, and passed an entire weekend tediously programming in the notes one by one. The result exceeded my wildest dreams when played on my typical computer speakers. However, when played on an set of high quality headphones, it sounded rather flat and boring. Obviously, my speakers added just the right colours, and the subwoofer pumped up the base.

The Bach piece is his “Inventions in F”, and is a natural selection for such an experiment because it was among the first pieces released by Robert A. Moog, inventor of the Moog Synthesizer. “Switched-on Bach was released at the end of 1968 and became an immediate success. It was acclaimed as real music by musicians and the listening public alike. As a result, the Moog Synthesizer was suddenly accepted with open arms by the music business community. We witnessed the birth of a new genre of music--classical music, realized with impeccable musicianship on synthesizer and tape recorder.” (quoted from www.wendycarlos.com/+sob.html).

The other is the romantic “Fur Elisa” by Beethoven, and this even managed to convey some feeling when played on my signal generator engine. I gave it a dynamic range of 20 dBs to give it some emotion, while the Bach is played at an even level 6 dBs down. The scores I downloaded were for the piano, and are played with only “two fingers”, one playing the left hand part and the other the right hand part.

If you can't use the software versions, I have provided mp3 versions you can download, Bach.mp3 (770K) and Beethoven.mp3 (876 K - *Note: see next paragraph). They are only standard 44.1 K, 16 bit, stereo files, but will allow you to hear the tunes at least. The mp3 compression even manages to preserve many of the characteristics of the specially crafted notes, but not all – for example, amplitudes don't come out quite the same, but they do seem to deliver 0 DC like the originals.

*UPDATE 26/DEC/2006

I have known for some time now that there is some distortion in the mp3 version of Beethoven, but just didn't get around to dealing with that until now. It's an artifact introduced by the codec and there seems to be nothing I can do about it, except to make this piece available in other formats. You can try BeethovenIMA.wav (2.33 mb) (IMA ADPCM is a standard Window's codec), or even download the full PCM waveformat file Beethoven.wav (9.3 mb). It is interesting to look at in a sound editor, where you can see how the notes were created.

You can download the software that plays these tunes here . You must have a sound card with an ASIO driver to run this software. Most professional sound cards such as M-Audio's Delta have such a driver. Even the Sound Blaster Audigy comes with an ASIO driver, however, though supported by my software, the Audigy runs at 48 KHz and only has a 16 bit buffer, so you won't get all the precision there is to be had. (The Audigy also has a 24 bit, 96 KHz mode, but my software doesn't support 24 bits as yet.) You can actually play these tunes on consumer grade sound cards if you download and install the ASIO4All emulator. Set it for a buffer size of 1024 or 2048 samples if a setting of 512 samples sounds crackly. Try this music on your 32 bit sound card at a sampling rate of 96 KHz for the best possible sound. Even the notes of the scales are calculated with 12 decimal places of precision, so you can use the music as a frequency standard. You can test your speakers with it. If you have very accurate speakers, the music may sound flat and boring. However, if your speakers have 'character' like mine, the music may sound quite pretty.

The Windows Zip file contains two DOS executables and a DLL with a version of the engine from the ASIO signal generator. Just unzip the files into a single folder, and double click on the executables to play. Each one produces a little debug file where you'll find information about your sound card and driver(s). If you are having trouble loading in the correct driver, create a little text file called “ASIOConfig.txt” with the number of the desired ASIO driver as the first character in it, and stick the file into the folder with the applications. To know what the number of the driver needed is, just examine the debug file created by one of the executables. In it you will find a numbered list of each ASIO driver found on your computer.

Now at the end of writing up this description, I wonder why in the world I went to so much trouble! Too much free time on my hands? ...rather, at times I get carried away with my passion for programming. But nothing is a waste. Parts of the code developed for this will eventually find their way into other programs, and even into commercial software that I develop. Feel free to drop me a line if you found this interesting.


Valid HTML 4.0 Transitional