Embedding Sound in SqueakPages books

Mark Guzdial guzdial at cc.gatech.edu
Mon Jan 25 16:19:18 UTC 1999


If you modify RecordingControlsMorph>>makeTile so that newStyleTile is
false (see below), tiles made with RecordingControlsMorph actually CONTAIN
their sound, rather than simply refer to them by name.  These tiles
(InterimSoundMorphs, as opposed to SoundTiles) can be dragged into
SqueakPages and saved -- and the sound is saved with them!  See the second
page of the Welcome book at http://minnow.cc.gatech.edu/squeakpages.1

The InterimSoundMorphs also work with the SoundSequencerMorph that Dan and
John demoed at OOPSLA'97.

Mark


makeTile

	| newStyleTile sndName tile |
	recorder pause.
	newStyleTile _ false.  "Change is here"
	newStyleTile
		ifTrue: [
			sndName _ FillInTheBlank
				request: 'Please enter a name this sound'
				initialAnswer: 'sound'.
			sndName isEmpty ifTrue: [^ self].

			sndName _ SampledSound unusedSoundNameLike: sndName.
			SampledSound
				addLibrarySoundNamed: sndName
				samples: recorder condensedSamples
				samplingRate: recorder samplingRate.
			tile _ SoundTile new literal: sndName]
		ifFalse: [
			tile _ InterimSoundMorph new sound:
				(SampledSound
					samples: recorder condensedSamples
					samplingRate: recorder samplingRate)].

	self world hands first attachMorph: tile.

--------------------------
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