-----------------------------------
3]BIRDTALK: TEACHING TWEETIE TO ORATE
3]Or Just Playing With Sounds
3]By Scott Wilcox
-----------------------------------

   One of the redeeming qualities of a computer is its ability to perform
mundane and repetitive tasks. The operator is then free to pursue more
useful things like eating and sleeping.
     There is nothing more repetitive than teaching a stubborn bird to talk.
Over and over you repeat the phrase, hoping the beaked and clawed pupil will
suddenly blurt out the words that have numbed your own tongue. You could
record your voice on a long cassette, but that entails repeating the phrase
for 45 minutes or more, and then it will only play that long before
stopping.
     There is a better way. You have at your fingertips the answer for
numb-tongued bird-teachers everywhere. Let the Amiga do the talking for you.
With its sophisticated sound circuitry and clever coprocessors, the Amiga is
a perfect educational tool for your feathered friends.
     And they said the Amiga is only a game machine! This is a serious
computer application! Teach a bird to talk with an IBM and it will just beep
at you.
     In the BIRDTALK drawer are a selection of likely phrases you might
want to teach your bird. You can hear them by double-clicking their icons.
     You can run this program during the day when no one is home, and it
will also multitask with other programs. Any talking bird, including
cockatiels and parakeets, can use this program. If you have access to a
sound sampler, you can add your own phrases in your own voice.
     If you've never taught a bird to talk before, start with simple words
or phrases and work your way up to more complex ones. Don't go on to another
phrase until the current one is mastered.
    In the Birdtalk directory you will find some sampled sound files, an
excellent sound player and documents by Richard Lee Stockton of Gramma
Software of Seattle, this article, and an executable script file to handle
the repetitive work.
     I used the Mimetics sound sampler at 7040 samples per second, which is
fairly low resolution. I did this to lower memory requirements. The bird
won't insist on CD quality.
     The sound file icons can all be double-clicked to play once, but to use
them in a bird-teaching environment you will need to EXECUTE the TALKLOOP
script file. Below is the listing of the TALKLOOP file. Even if you hate
birds, or don't have one, or don't want yours to talk, you will find some
nice tips in this file on looping, using parameters, defaulting certain
parameters, and other script tricks. Or you can use the sound files any way
you wish.
     Anything after a semicolon ( ; ) is a comment. You really should remove
the semicolons on the lines that copy files to RAM: and make some commands
resident, unless you have many buffers. This script file will build a
temporary file in your T directory, so be sure T is assigned to ram:
in your startup-sequence or in the TALKLOOP file. The temporary file:

Command-01-T0?

. . . will grow after each loop, but will only be about 50K after a days
looping, and will erase when you cancel the program with <Ctrl-C>.
     Ahead is the script file that you execute from a CLI or Shell. You
should CD to the directory holding the sound files, as in:

cd j:birdtalk   <press Return>

. . . Then execute the TALKLOOP file with the sound file as the parameter,
like this:
 
execute talkloop soundfile  <press Return>

     Where "soundfile" is the name of the sound file. If you don't specify a
parameter, POLLY will be used as the default sound file.

Here is the listing of the 'Talkloop' script file:

.key soundfile,counter    ;Defines the parameters
.def soundfile "Polly"     ;Makes 'Polly' the default sound file.
;
;This is a script file that you 'execute' from a CLI or Shell.
;You should 'CD' to the directory the sound files are in (cd j:birdtalk)
;then execute the talkloop file with the sound file as the parameter,
;like this: [execute talkloop hello], where 'hello' is the name of the
;sound file. No parameter will use 'Polly' as default.
;
if "<counter>" eq "IIIIIIIIII"    ;checks to see if counter is full
 wait 10 mins                      ;10 minute pause if it is
 execute talkloop "<soundfile>" I     ;Starts the counter over after pause.
endif
if not "<counter>" eq ""        ;checks to see if this is the first loop.
 skip sayit                     ;skips below to 'sayit' if it isn't,
endif                           ;otherwise goes on to the 'echo' statements.
;
echo ""
echo "          BirdTalk, by Scott Wilcox..."
echo ""
echo "--An Amiga application to teach your bird to talk--"
echo ""
echo "'<soundfile>' will sound twice every 15 seconds for 10 times,"
echo "pause for 10 minutes, then repeat the loop."
echo ""
echo "Type Control-C in this activated window to quit Birdtalk."
echo ""
echo "Listen up, Bird..."
;
;Assign t: ram:     ;If this line or equivalent is not in your startup-
;                   ;sequence, use it by removing the semicolon at the
;                   ;start of the line. It will make the temporary file
;                   ;write to ram: instead of to disk.
;
;copy J:birdtalk/sound ram:         ;These commands will lessen disk access.
;copy J:birdtalk/talkloop ram:      ;To use these commands, remove 
;copy J:birdtalk/<soundfile> ram:   ;the semicolons at the beginning
;cd ram:                            ;of each line.
;
;resident :sound pure                 ;Remove the semicolons at
;resident c:wait pure                 ;the beginning of each line
;resident c:lab pure                  ;to make these commands
;resident c:skip pure                 ;resident, and lessen disk
;resident c:execute pure              ;access (1.3 Workbench only).
;
lab sayit                                   ;The label for this routine.
sound <soundfile>                           ;the command to sound the phrase.
wait 2 secs                                 ;short pause
sound <soundfile>                           ;phrase is repeated
wait 15 secs                                ;longer pause
execute talkloop "<soundfile>" "<counter>I"     ;Add one to counter and repeat
                                                ;the loop.
;

3]AUTHOR'S NOTE
     Another, and perhaps better, bird talking solution is to use the Amicron
program on Fred Fish disk 139. Instructions on that disk will tell you how
to set up a "crontab" file for repetitive tasks.

4]END OF TEXT
