home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!HQHSD.BROOKS.AF.MIL!THURMAN
- Message-ID: <CSG-L%93010509251648@VMD.CSO.UIUC.EDU>
- Newsgroups: bit.listserv.csg-l
- Date: Tue, 5 Jan 1993 09:21:00 CST
- Sender: "Control Systems Group Network (CSGnet)" <CSG-L@UIUCVMD.BITNET>
- From: "HRLOT1::THURMAN" <THURMAN%HRLOT1.decnet@HQHSD.BROOKS.AF.MIL>
- Subject: HyperCard experiments
- Lines: 74
-
- [From Richard Thurman (930105.0815)]
-
-
- Rick Marken (921229.0800) stated:
- >By the way -- all this work (including the modeling) was done in HyperCard
- >with HyperTalk (inspired by some offline discussions with Rich Thurman).
-
- Gary Cziko (930101.1623) described a "control of musical melody" experiment
- and asks:
- >Could HyperCard be used for a study like this?
-
- Rick Marken (930101.1600) replied:
- >I think you could do your melody
- >control experiment in HyperCard -- but maybe someone else could comment
- >on this who has used sound with HyperCard -- I haven't.
-
- Gary and Rick --
- After reading your posts I experimented a little with the sound
- function in HyperCard. It may be able to handle the kind of
- experiment you have in mind. For example I was able to play
- around with it for about 5 minutes and came up with the following
- code.
-
- ----------- Place this code into a card script ---------------
- on mousedown
- repeat until the mouse is up
- play "harpsichord" tempo 150 ((342 - item 2 of the mouseloc) div 4)
- wait until the sound is "done"
- end repeat
- end mousedown
- --------------------------------------------------------------
-
- This tells HyperCard to repeat playing notes as long as the mouse
- button is pressed. The "harpsichord" is a prerecorded sound that
- can be played back at a different tempo (in this case 150) and at
- different frequencies. The frequency part is the rather strange
- looking ((342 - item 2 of the mouseloc) div 4). It is using the
- mouse location to determine the frequency. The strange computation
- is simply to make middle "C" play when the mouse pointer is about
- in the middle of the screen.
-
- To add a disturbance, simply add a number to the frequency parameter.
- Each increment (or decrement) of 1 would increase (or decrease) the
- frequency by one-half step (from C to C# for example).
-
- So what do you get when you do the script?
- It sounds like a harpsichord playing the scales.
-
- Can you play "Happy Birthday" with it?
- Well... I can't. But I think anybody with even the slightest hint
- of musical ability might be able to make a recognizable tune with
- it. (I think Pacobel's Cannon might be beyond its capability
- though. But if anybody wants to give it a try I would love to hear
- it.)
-
- Can it be used as an experimental vehicle?
- Yes. With a few more lines of code you can introduce disturbances
- and record responses. The responses measures will probably be
- accurate to within 16 milliseconds. (Not a great degree of accuracy
- but probably OK for this purpose.)
-
- Hope this helps.
-
- Rich
-
- --------------------------------------------------
- Richard Thurman
- Air Force Armstrong Lab
- BLDG. 558
- Williams AFB AZ. 85240-6457
-
- (602) 988-6561
- Internet: Thurman%HRLOT1.Decnet@HQHSD.Brooks.AF.Mil
- ---------------------------------------------------
-