[Squeakland] Importing wav files

JOHN VOIKLIS voiklis at gmail.com
Fri Sep 21 12:13:03 PDT 2007


Hello Subbu,

In order to import a WAVE file (at least for pre-OLPC Squeak), you
would need to run (i.e., "do") the following Smalltalk code (replacing
"variableName", "soundFile", and "soundName" with your own appropriate
values):

variableName := SampledSound fromWaveFileNamed: 'soundFile.wav'.
SampledSound addLibrarySoundNamed: 'soundName'
		samples: variableName samples
		samplingRate: variableName originalSamplingRate.

After which you can call the sound named "soundName" from either the
eToys or Smalltalk interface. Note that, in order to make the sound a
permanent part of the Squeak image, you will need to save the image.

I hope this helps (and is still relevant to the current version of Squeak).

All best,

John

On 9/21/07, subbukk <subbukk at gmail.com> wrote:
> Hi,
>
> How do I import a wav file into Squeak? The filelist dialog doesn't recognize
> wav files as sound files. The SoundRecorder widget only generates sound tiles
> but cannot export/import wav :-(
>
> TIA .. Subbu
>
> _______________________________________________
> Squeakland mailing list
> Squeakland at squeakland.org
> http://squeakland.org/mailman/listinfo/squeakland
>



More information about the Squeakland mailing list