home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22163 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.4 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!zaphod.mps.ohio-state.edu!howland.reston.ans.net!spool.mu.edu!olivea!apple!goofy!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
  2. From: REEKES@applelink.apple.com (Jim Reekes)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Novice programmer seeks help with Sound Manager
  5. Message-ID: <REEKES-250193125843@90.10.20.67>
  6. Date: 25 Jan 93 20:57:17 GMT
  7. References: <C1CEK3.7Gt@dartvax.dartmouth.edu>
  8. Sender: news@gallant.apple.com
  9. Followup-To: comp.sys.mac.programmer
  10. Organization: Apple Computer, Inc.
  11. Lines: 37
  12.  
  13. In article <C1CEK3.7Gt@dartvax.dartmouth.edu>, bryan.y.lee@dartmouth.edu
  14. (Bryan Lee) wrote:
  15. > Well, this is my first time posting to this group, so here goes,
  16. >     I've read about the sound manager, and have read a few example routines
  17. > that play sound, using the sound manager. I figured out how to make new
  18. > channels, and use sndPlay on 'snd ' resources. No sweat. However, I still
  19. > don't understand how to use type 2 'snd ' files. I have read Inside
  20. > Macintosh 5 about these resource types, but still haven't had any luck
  21. > with them.
  22. >     I do the following (simplified a little):
  23. >             SndNewChannel(&my_chan, sampledSynth, 0, NULL);
  24. >             SndPlay(my_chan, my_type2snd, 1);
  25. >             SndDoCommand(my_chan, my_command, 0);
  26. > In this case, "my_command" = noteCmd; <==Does this command do anything or
  27. > what?
  28. > I thought it would be neat to be able to play my own melodies using the
  29. > sounds from these type2 resources, but when I try to play a note using
  30. > noteCmd,  only silence plays for the duration of the note. Am I totally
  31. > off base, or is there something simple I am missing? Maybe there is a FAQ
  32. > that has this somewhere?
  33.  
  34. Before you can use the noteCmd (now known as the "frequencyCmd") you must
  35. use the soundCmd to install the sound header into the channel. The SndPlay
  36. trap will only play the sound as described in the resource. To use the
  37. soundCmd with a resource you'll have to parse the 'snd ' and find the sound
  38. header within it.
  39.  
  40. -----------------------------------------------------------------------
  41. Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
  42.                              |          Sound Manager Expert
  43. Apple Computer, Inc.         | "All opinions expressed are mine, and do
  44. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  45. Cupertino, CA 95014          |       employer, Apple Computer Inc."
  46.