home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / txtutl / travesty.arc / TRAVESTY.MSG < prev   
Internet Message Format  |  1988-12-18  |  3KB

  1. From: amlovell@phoenix.princeton.edu (Anthony M. Lovell)
  2. Newsgroups: comp.binaries.ibm.pc
  3. Subject: v01i065: travesty, text/music style simulator w/C source
  4. Date: 17 Dec 88 23:01:05 GMT
  5. Summary: travesty.arc, text/music style simulator w/C source
  6. Approved: dhesi@bsu-cs.UUCP
  7.  
  8. Posting-number: Volume 01 Issue 065
  9. Originally-from: amlovell@phoenix.princeton.edu (Anthony M. Lovell)
  10. Submitted-by: amlovell@phoenix.princeton.edu (Anthony M. Lovell)
  11. Archive-name: travesty/travesty.uue
  12.  
  13. [
  14. This is Anthony M. Lovell's implementation of a "travesty" algorithm.
  15. The purpose of travesty is to analyze some text and find statistical
  16. correlations between characters, then create some text that preserves
  17. these correlations.  The result will stylistically resemble the
  18. original, though it might make little or no sense.
  19.  
  20. This could be useful if, for example, you were Bacon and you wanted
  21. to write a play and pretend that you were Shakespeare.  You would
  22. do something like:
  23.  
  24.      C:\PLAYS> trav 4 < hamlet > macbeth
  25.  
  26. The output would be stylistically similar to Shakespeare's style in
  27. Hamlet, though it might not make much sense.  Oh what a tangl'd web we
  28. weave when first we practise to deceive...Of course, I have no evidence
  29. that the real Bacon actually did this, or that he even owned a
  30. microcomputer.  The parameter "4" to the "trav" program above asks it
  31. to use a fourth order travesty, which means that it will look for
  32. correlations of characters in groups of four.
  33.  
  34. More interestingly, Anthony Lovell points out that it is possible to
  35. encode a melody into characters, and ask this program to generate new
  36. melodies from the encoded original.  If you were to take a number of
  37. Chopin waltzes, for example, and do a travesty on them, the output
  38. might be some fairly decent-sounding music in Chopin's style.  This
  39. makes me wonder if it might not be possible to write a travesty program
  40. that would take as its input four concurrent streams of data
  41. representing four-part harmony and preserve their relationships in a
  42. smooth way, so the output would contain some reasonable harmony too.
  43. Naturally, to make the output sound like something by Debussy, you
  44. would probably take the input from a random number generator. :-)
  45.  
  46. There is a known bug in this program:  If a parameter of 2 is supplied,
  47. the output may not be very random.  Other values work well.
  48.  
  49. Source for Turbo C 2.0 is included here.  Anthony Lovell wants to
  50. credit the source of this idea thus:  He wrote this program after a
  51. friend, who had seen the algorithm in an old BYTE article, described it
  52. to him.  He has not seen the article himself.
  53.  
  54. He suggests:  "I recommend you try this out on a textfile you know
  55. well - it's more fun that way."
  56.  
  57. -- R.D.
  58. ]
  59.