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