This program is free - make as many copies as you wish. The original, Pascal program (as it appeared in BYTE, Nov. 1984) is copyrighted, however, so please DO NOT sell this program.
What does Travesty do? It takes a source file of text that you provide, analyzes it, and produces random output that sounds something like the original, but is generally rather meaningless. This random text is based on the occurrences of basic letter-combinations in the source file. (For more detail, see the original article in the Nov. 1984 BYTE.) The degree to which the output resembles the source is controlled by the scan-pattern length, known as the "order" of the travesty. A high order will cause output to greatly resemble source; a low order will sound more like gibberish. In MacTravesty, the possible orders are 3-15; select the order of the next travesty by the Travesty menu. You may also choose how much output you want; default output size is 1000 characters. (If you're just playing around, try orders of 4-7 and output sizes of 2000-3000.)
WHAT IS IT GOOD FOR?
Not much. But, it's fun to play with. Feed it an essay from your freshman English class and see what comes out. Feed in the President's latest speech and distort it beyond recognition. Feed in some classic literature and see if it still sounds like the author's style of writing (it usually does). Whatever. If you have a stupid sense of humor (like me), it's funny to read.
WORKING THE PROGRAM:
Select "Load source text..." to load source text (i.e., text to be analyzed) into the Source window. [Note: since this program uses standard TextEdit routines to hold source and output text, the source file may not be larger than 32K.] The next two menu options both begin Travesty generation from the source text, except "Erase Old╔" first any text in the Travesty window, and the second does not. "Save current Travesty╔" saves the text in the Travesty window.
The Travesty menu controls the "order" of the Travesty output, and the number of characters of output. "Output Size╔" is pretty straightforward, and you can select the "order" (scan pattern depth) by the menu items beneath.
If you realy want to get fancy, you can use the "Varying Order╔" option. You specify a beginning and ending pattern length; both of these must be in the range 3╔15. Your output is generated with the "order" of the travesty linearly varying from the start to end values. e.g., if you specify an output size of 1000 characters and a pattern range of 4 thru 7, then the first 250 characters output will be order 4, the next 250 will be order 5, the next 250 will be order 6, and the last 250 will be order 7. By now, you may be wondering what this could possibly be good for. Well, this allows you to have your output start out fairly reasonable-sounding, and degenerate into incoherent babble by the end (if you specify 15->3), or have gibberish slowly transform into words (if you specify 3->15).
Note that the source must be saved as a "text only" file; MacWrite and Word files must be converted before they can be travestied. To convert, load the file into MacWrite or Word and choose "Save As"-- and be sure to click the "text only" button before clicking ok. Any travesty you save is also saved as "text only"; thus, a saved travesty can be edited with Write or Word.
This program is based on the program "Travesty" from the November 1984 BYTE, originally written in Pascal by Hugh Kenner and Joseph O'Rourke, which was, in turn, based on an article by Brian Hayes in the Nov. 1983 Scientific American. This version of the program also uses the "hashing" enhancement by Trygve Lode from the March 1985 BYTE to speed up output. This was written in LightspeedC, v2.11, thus portions copyright ⌐ Think Technologies.
UPDATES TO VERSION 3.0 FROM VERSION 2.0:
Well, this version allows you to see (and edit) the source text, and drag-n-grow both windows. On the other hand, it now limits your source text to a maximum of 32K. It now allows varying-order travesties, for whatever that's worth.
KNOWN BUGS:
I don't know of any major ones yet, but I haven't tested it much. Let me know if you find any.