Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Metronome
Last updated at 2:16 pm UTC on 7 February 2007
by Eddie Cottongim

A simple metronome.

   Uploaded Image: Metronome.gif

You need two changesets:

QueueSoundEnh.cs.gz (see below for fix)
MetronomeMorph.cs.gz

The first is a slight enhancement to QueueSound. The second is the Metronome itself.

Tested with: Squeak 3.0 #3552 and Squeak 3.2 #4599

dmoc: I thought this was a good example for new morph creators but to work in 3.9 it needs the following change in QueueSound, change "trigger:" to "triggerEvent:"...
nextSound
	| answer |
	self triggerEvent: #soundFinished.
	...