#!perl # "MacPerl Yodels" v1.0 # by David Seay # August 1999 # use Mac::Speech; $channel[0] = NewSpeechChannel($Voice{'Cellos'}) or die $^E; $pitch1 = 68; $pitch2 = $pitch1 + 7; $pause = .05; for $note (0..7) { SetSpeechPitch $channel[0], $pitch1; SpeakText $channel[0], "a"; select(undef, undef, undef, $pause); SetSpeechPitch $channel[0], $pitch2; SpeakText $channel[0], "e"; select(undef, undef, undef, $pause); } SetSpeechPitch $channel[0], $pitch1 + 4; SpeakText $channel[0], "who"; while (SpeechBusy()) {} DisposeSpeechChannel $channel[0] if $channel[0];