A lab can include sounds, for example to provide additional commentary on the text. The lab selection screen indicates which labs have sounds with [sound]
following the name, and has an on/off switch. Since sound is optional, labs should work correctly without sounds.
Each section may have 0 or more sounds, interspersed with code for the section. If there is no sound, or sounds are off, all the code is run in a single step. Otherwise, Ctrl+A advances through the section by running any code up to the next sound, then playing the sound.
Sounds are read from a keyed file with extension .jf with the same name as the lab, in the same directory; thus the sound file system\extras\lab\cantor.jf matches the lab file system\extras\lab\cantor.ijt. The key names are included in the code with lines beginning SOUND
, for example:
Lab Section Numbers The integer function (i.) generates numbers: ) i.10 NB. first 10 numbers SOUND integer1 i.4 3 NB. first 12 numbers in a 4 by 3 table SOUND integer2 SOUND integer3
You should create the sounds using any sound recorder, and then import the sound files into the keyed file. First create a directory containing all the wav files to be imported, then use the Lab Author menu item Sounds/Organizer to import the files. Each file is stored with a keyword of the short filename; thus c:\sounds\integer1.wav would be stored under key integer1
.
The sound files are normal keyed files and can be accessed directly using the J keyed file utilities.