home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / bit / listserv / csgl / 2050 < prev    next >
Encoding:
Text File  |  1993-01-05  |  3.2 KB  |  85 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!HQHSD.BROOKS.AF.MIL!THURMAN
  3. Message-ID: <CSG-L%93010509251648@VMD.CSO.UIUC.EDU>
  4. Newsgroups: bit.listserv.csg-l
  5. Date:         Tue, 5 Jan 1993 09:21:00 CST
  6. Sender:       "Control Systems Group Network (CSGnet)" <CSG-L@UIUCVMD.BITNET>
  7. From:         "HRLOT1::THURMAN" <THURMAN%HRLOT1.decnet@HQHSD.BROOKS.AF.MIL>
  8. Subject:      HyperCard experiments
  9. Lines: 74
  10.  
  11. [From Richard Thurman (930105.0815)]
  12.  
  13.  
  14. Rick Marken (921229.0800) stated:
  15. >By the way -- all this work (including the modeling) was done in HyperCard
  16. >with HyperTalk (inspired by some offline discussions with Rich Thurman).
  17.  
  18. Gary Cziko (930101.1623) described a "control of musical melody" experiment
  19. and asks:
  20. >Could HyperCard be used for a study like this?
  21.  
  22. Rick Marken (930101.1600) replied:
  23. >I think you could do your melody
  24. >control experiment in HyperCard -- but maybe someone else could comment
  25. >on this who has used sound with HyperCard -- I haven't.
  26.  
  27. Gary and Rick --
  28. After reading your posts I experimented a little with the sound
  29. function in HyperCard.  It may be able to handle the kind of
  30. experiment you have in mind.  For example I was able to play
  31. around with it for about 5 minutes and came up with the following
  32. code.
  33.  
  34. ----------- Place this code into a card script ---------------
  35. on mousedown
  36.   repeat until the mouse is up
  37.     play "harpsichord" tempo 150 ((342 - item 2 of the mouseloc) div 4)
  38.     wait until the sound is "done"
  39.   end repeat
  40. end mousedown
  41. --------------------------------------------------------------
  42.  
  43. This tells HyperCard to repeat playing notes as long as the mouse
  44. button is pressed.  The "harpsichord" is a prerecorded sound that
  45. can be played back at a different tempo (in this case 150) and at
  46. different frequencies.  The frequency part is the rather strange
  47. looking ((342 - item 2 of the mouseloc) div 4).  It is using the
  48. mouse location to determine the frequency.  The strange computation
  49. is simply to make middle "C" play when the mouse pointer is about
  50. in the middle of the screen.
  51.  
  52. To add a disturbance, simply add a number to the frequency parameter.
  53. Each increment (or decrement) of 1 would increase (or decrease) the
  54. frequency by one-half step (from C to C# for example).
  55.  
  56. So what do you get when you do the script?
  57. It sounds like a harpsichord playing the scales.
  58.  
  59. Can you play "Happy Birthday" with it?
  60. Well... I can't.  But I think anybody with even the slightest hint
  61. of musical ability might be able to make a recognizable tune with
  62. it.  (I think Pacobel's Cannon might be beyond its capability
  63. though.  But if anybody wants to give it a try I would love to hear
  64. it.)
  65.  
  66. Can it be used as an experimental vehicle?
  67. Yes.  With a few more lines of code you can introduce disturbances
  68. and record responses.  The responses measures will probably be
  69. accurate to within 16 milliseconds.  (Not a great degree of accuracy
  70. but probably OK for this purpose.)
  71.  
  72. Hope this helps.
  73.  
  74. Rich
  75.  
  76. --------------------------------------------------
  77. Richard Thurman
  78. Air Force Armstrong Lab
  79. BLDG. 558
  80. Williams AFB AZ. 85240-6457
  81.  
  82. (602) 988-6561
  83. Internet: Thurman%HRLOT1.Decnet@HQHSD.Brooks.AF.Mil
  84. ---------------------------------------------------
  85.