home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / ibm / pc / soundcar / 5950 < prev    next >
Encoding:
Text File  |  1993-01-01  |  2.9 KB  |  56 lines

  1. Newsgroups: comp.sys.ibm.pc.soundcard
  2. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!umn.edu!csus.edu!netcom.com!stewarta
  3. From: stewarta@netcom.com (Alex Stewart)
  4. Subject: Re: On GUS memory (question)
  5. Message-ID: <1993Jan1.215241.16188@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. X-Newsreader: Tin 1.1 PL5
  8. References: <C05xEF.38K@watserv2.uwaterloo.ca>
  9. Date: Fri, 1 Jan 1993 21:52:41 GMT
  10. Lines: 44
  11.  
  12. Ok, I don't have a GUS.  I don't have a lot of musical experience, and I don't
  13. know a lot about digital audio techniques, but this is my understanding of
  14. wavetable synthesis (which everybody tells me is what the GUS uses for its 
  15. patches):
  16.  
  17. Let's take a simple sound, say a sine wave with a medium (flat) attack and 
  18. decay (yes, I know this could be done with FM, but this is just an example).
  19. Let's also say that it's about 1 second long.
  20.  
  21. One could easily sample the whole thing, at a decent rate (say 44 Ksamples/s,
  22. 16 bit), and would end up with something that took up about 88K of memory.
  23. However, look at a sine wave.  It's just the same thing over and over and over
  24. again.  If this sine wave we're sampling is at about 440 Hz, then we're really
  25. sampling the same thing 440 different times and storing all of it.
  26.  
  27. So, let's just sample 1/440th of a second of it (one cycle), and then make a
  28. note that the entire thing consists of that sample 440 times.  We have to deal
  29. with attack and decay, but we can do that by just putting in a little data 
  30. that says "start the amplitude at 0, raise it at such-and-such a rate until we
  31. get to full volume, wait for the release, then decay similarly".  This 
  32. information need only take up a few bytes.  We now have exactly the same result
  33. at exactly the same sampling rate/clarity, etc.  It now takes up somewhere 
  34. slightly over 100 bytes.
  35.  
  36. Another advantage of this is that now, if we want to play it for longer than
  37. just a second, we don't have to resample it, we can just change the number of
  38. times we cycle through it.  Moreover, when we change the frequency, we can 
  39. keep the same duration fairly easily.
  40.  
  41. A more complex instrument may need a different sample for the attack phase or 
  42. the decay phase, but this can be whittled down similarly to only the necessary
  43. information.  When you get finished, a 16-bit 44Ks/s piano can be stored in 
  44. somewhere around 20-30K (just guessing), add to that any compression, and you
  45. have no problem fitting several high-quality instruments in 1Meg, or even 256K,
  46. and you get better quality than straight samples, to boot.
  47.  
  48. Hope this helps (hope I'm not way off base, too...),
  49. -alex
  50. -- 
  51. -----------------------------------------------------------------------------
  52. Alex Stewart:         Sysop of YBBS (510) 689-8952 |   This space for rent.
  53. stewarta@netcom.com   .----------------------------'-------------------------
  54. stewarta@carleton.edu | Somebody, somewhere, is offended by what I am saying.
  55. -----------------------------------------------------------------------------
  56.