How to Create a Sampled Instrument

Mark Guzdial guzdial at cc.gatech.edu
Mon Mar 8 17:40:11 UTC 1999


Thanks for the comments, John!  I'll add them to the page, if you don't mind.

I haven't read the AIFF spec, but several sources (e.g., "Multimedia Sound
and Music Studio" book, and the "SndSampler" shareware program) claim that
AIF doesn't support saving loop points.  TransferStation and D-SoundPro
both support it, so I was assuming that it was an enhancement/tweak to AIFF.

Mark

At 9:23 AM -0800 3/8/99, johnm at wdi.disney.com wrote:
>Mark,
>
>Great write-up!
>
>Here's how to use Squeak's editor to find loop points. You first need
>identify where the loop ends. I usually choose a point just before
>the sound level starts to tail off in the decay phase. Place the
>cursor there (typically at zero crossing; the cursor will turn blue),
>then push the "Set Loop End" button.
>
>You next need to identify the approximate fundamental frequency.
>(Yes, it should be possible to guess this from the FFT, but that hasn't
>yet been attempted.) By eye, identify what appears to be one complete
>cycle of the wave, and place the cursor one wave before the
>loop endpoint. This needn't be sample-accurate. Now hit the
>"One Cycle" button. Now Squeak knows the approximate pitch of
>the sound and it won't get confused as it searches for loops.
>
>You can now invoke the "choose loop start" menu command.
>This will search backwards from the loop end point for possible
>loops starts. Squeak performs an auto-correlation error calculation
>for each loop point and ranks them in a menu. (This calculation
>is somewhat expensive, but is only done the first time you ask for
>this menu after changing the loop end point.) At this point, you
>can select a possible loop, using both ranking and loop duration
>as a guide, and test it using the "play" button. The "play loop"
>button will play just the loop by itself, but it sometimes sounds
>a bit rougher than playing the loop in context via the "play"
>button.
>
>I'm not quite sure why you say that we're using a "modified"
>AIFF file. Loop points are part of the AIFF spec, although not every
>AIFF file has loops.
>
>Your other instructions look good. Incidentally, the code that
>reads in sampled instruments is based on the idea that the
>set of samples is stored as a set of AIFF files in a folder labelled
>by the name of the instrument. Thus, the individual file names
>don't matter. But, as you found, they'd better be AIFF files! Two
>folder naming conventions that I use are: "-f" and "-p" distinguish
>loud and soft versions of the same instrument. "s.xxx" indicates
>a solo instrument, versus a section. For example, "s.violin-f" would
>be a single solo violin playing loud whereas "violin-p" would be
>an entire violin section playing softly.
>
>Hope this helps!
>
>	-- John
>
>
>
>Mark Guzdial <guzdial at cc.gatech.edu> wrote:
>> I've posted a tutorial on creating sampled instruments in Squeak at
>> http://minnow.cc.gatech.edu/squeak.575  Updates and corrections from people
>> who really know something about computer music would be appreciated :-)
>>
>> Mark


--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
(404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html





More information about the Squeak-dev mailing list