#!perl # Sing a Scale # by David Seay # v. 1.1 use Mac::Speech; @scalePitches = split(",","48,50,52,53,55,57,59,60"); @scaleWords = split(",","dough,ray,me,fa,soul,la,tee,dough"); $voice = $Voice{Cellos}; $channel = NewSpeechChannel($voice) or die $^E; for $p (0..$#scalePitches) { SetSpeechPitch $channel, $scalePitches[$p]; SpeakText $channel, $scaleWords[$p] or die $^E; while (SpeechBusy()) {} } DisposeSpeechChannel $channel;