JF https://www.javantea.com/page/make/296

First, download Song 20i [441.3 kB]. It is an ogg audio file, which means you need Winamp, XMMS, ogg123, or some ogg player. It is 1 minute long and it is monaural. Then, if you think it is keen and you want to be able to do something 1000x better, then download Song 20 source [5.6 kB]. You probably noticed that this file is extremely small. That is because it is 'compressed' using the highest of high tech solutions. Read on to find out the hows and whats. If you're wondering what the ugly pictures are, they are compressed versions of the ogg and source. Can you tell which is which? If you are, you deserve a gold star of hacking.

I submit for your criticism, the theory that CSound could become an algorithm for compression that far exceeds BZip2, DivX, Ogg, and any other known compression algorithm. It is reasonably fast, simple, and mathematically sound. It uses mathematical methods on waves for its compression. It has compressed a 441.3 kB ogg file into 526 B (song20i.csd.gz). That is compression ratio of 859:1. While this is a simple case where ogg is an inefficient compression method, it follows that a compression of 10:1 could be obtained from ogg/mp3 to CSound. If you recall, uncompressed CD quality is 176400 B/s (44100*2*2) and ogg/mp3 is ~16000 B/s. This is a compression of 11:1. If Csound can compress 10:1 upon ogg/mp3, it will have a massive impact on the transmission and distribution of music and data. The mp3 compression allowed file sharing on the internet to download/upload 2 songs in realtime using a broadband connection (256 kbps) for $40 per month. If CSound could compress the data by a factor of 10, a person could download/upload 20 songs in realtime using the same connection. Or the person could download/upload a 5 minute song in 15 seconds instead of 2.5 minutes. This is the power of compression. The use of CSound for movies may also be possible. Similar compression would allow high quality video content to be transferred quickly on the same broadband connection.

README for Song 20
by Javantea aka. Joel R. Voss

This 'song' is the random use of a Theremin. It uses my new Python 'extention' to CSound.

In order to create song 20, you need: this archive, Python, CSound, and OggUtils. All three of these programs are open source (GPL) and highly portable, so you should have no problem getting them. Making them work is another thing altogether. For that, I suggest downloading appropriate binaries or becoming a high level hacker and compiling the source. I run Linux, but I have run all these in Windows, so I know they will work.

'csound.py' is a python interface that one can use to create csound files. However, it is useless without instruments.
'theremin.py' is an instrument that can be used with the python extension to csound.
These two files allow a person to make 'song20a.ogg' from 'song20.py'.

This archive is 4.5 kB without this README, which is absolutely astounding. Considering that a person could make a 400kB Ogg file (or a 1000 MB if you were to change one number in the code) from it, it is an extremely interesting system. In fact, song18e is a very complex song with drum and synth and can be made from ~10kB. This is the power of computing in information theory. ^_^

To create song20a.ogg from song20.py, follow these directions:
python song20.py >song20a.csd
That's all, I made the Makefile so that it will accept the song20a.csd and such. To make a longer sample, simply edit song20.py and change line 42 where it says:
while curTime < 60.0:
to anything you want. Remember, the longer it is, the more time and space it takes. But I've created a 175 MB song in 15 minutes quite easily by setting the length to either 5000 or 20000 (I forget which).

Other things to try:

Download more instruments at javantea.com.
Available now:
Electric Guitar
Infinite Instrument
Create more structured songs by making more while loops.
Create more complex songs using dozens of instruments.
Create more interesting songs by using different extents.
Create a bunch of different random songs by running:
python song20.py >song20n.csd
where n is the entire alphabet.

In the end, have fun with it. The CSound Python extension was created to allow me to create radically weird songs like Song20. This song was created to simulate a person testing the boundaries of the Theremin.

I license under the GNU GPL. That means that you are free to do whatever you wish with this software except give it away without source and without attribution to me. If you don't respect that, I am a hacker too. r0x0r as you wish and live with the consequences. ^_^

There are two problems with compression with CSound. The first is technical. Information theory says that only so much information can be stored data. Translate that: you cannot pull a rabbit out of an empty hat. Say that you have a potato, a carrot, and water. You cannot make rabbit stew no matter how much you cook it, chop it, spice it up with whatever. Like the law of conservation of mass/energy, there is conservation of information. In fact, there's a logical explanation of that: if I plan to compress the Matrix into 2 bits, there are only 4 possible combinations. So if I send 00, I get the Matrix. If I send 01, I get something else. If I send 10, I get something else. If I send 11, I get something else. Of course, I can only encode 4 things. There is another 'law', one that I wish to see broken. It says that a person cannot compress random information with a program that is less than the size gained. So say that gzip is 53kB. That means that I cannot gzip any amount of truly random information and gain 53kB. I can easily gzip 5MB of non-random information and gain 53kB. The reason that I wish to break this law is because of my experience with CSound and Ogg. Ogg is quite nearly random. CSound can beat it by 859:1. So given a large enough Ogg file, I could make a CSound which creates it which will gain more than enough rooom to fit CSound. You can see a discussion of this somewhere on the web, I forget where. Probably the newsgroup comp.sci.compression. I remember that there is a $1000 prize out there for the person who does it. If you do it with CSound, be sure to kick back a few bills to me for giving you such a good idea. I'm claiming prior art right now for compression using CSound. If this becomes something I think it should be, this is one thing that patents won't touch.

The second problem is that many wealthy content producers don't seem to like the transmission of digital data. It is my hope to evade their grasp as I topple their system of data hoarding. *cough* Specifically, the RIAA and MPAA don't want to see their monopoly fall to those who transmit data. There are two ways that transmitting data can destroy the system. The first is my favorite: with production costs minimized, artists no longer need a recording industry to produce and distribute music/video/media. This is happening and it is good. These independent artists can make a buck because they can compete fairly on the internet with transmission so easy. With production costs so low, they can even turn a profit with a small paying fanbase. (I know this for a fact because I am a producer of an independent artist who buys cds from me for $1.00 a piece and sells for $4.00 a piece to listeners.) The second way the current system can be overthrown would be people stop buying cds and downloading songs. While this is not just to the artist or the hard working meglomaniacs/lawyers at the RIAA, it is popular. It is not effective, people still buy CDs. In fact, in this economic downturn with an excess of shitty music produced by RIAA and shitty movies produced by the MPAA, they haven't totally lost their asses. I expect that the first way will do them in shortly. A celebrity panel of music artists at EMP said it well: "The recording industry has no future."


Comments: 0

Leave a reply »

  • Leave a Reply
    Your gravatar
    Your Name