How to Fade-In/Fade-Out a Sampled/Repeating/Mixed Sound

Dan Ingalls Dan at SqueakLand.org
Thu May 4 07:06:09 UTC 2006


Hi, again, Rob -

>Well, actually I did just try it and got a .wav file that sounded right...
>	| snd |
>	snd _ FMSound new.
>	snd addEnvelope: (VolumeEnvelope exponentialDecay: 0.985).
>	(snd setPitch: 2000 dur: 4.0 loudness: 0.5) storeWAVOnFileNamed: ' out.wav'.

Doggone.  I see now that you had this figured out and were having problem with sampled sounds.

The one thought I have without getting into it deeply is that you might be able to initialize an FMSound in such a way that its buffer comes from  'aWAVFile.wav, and its various parameters cause it simply to be played through once with no FM (ie the degenerate case is basically like a SampledSound.  Then I think the envelope logic should work.

Hopefully you'll hear more from one of the real sound jocks.

	- Dan



More information about the Squeak-dev mailing list