Fourth World Logo Fourth World Media Corporation
  Embassy Services Products Resources   About Fourth World Contact  


IncWell Logo

SuperCard FAQ

4W Logo

How do I record my own sounds?


SuperTalk includes the command "record sound", defined in the Language Reference like this:

record sound [file] with [quality]

Used to record monophonic sound. SuperCard presents the Standard Apple Sound Input recording dialog. Clicking the "Cancel" button terminates the recording process, but does not terminate the script. In this case, the result is set to the string "Cancel". Clicking the "OK" button causes the recorded sound to be saved. In this case, the result is set to empty.

If sound input is not available to the system, executing this command sets the result to the string "Sound Input capabilities not available." If no sound input device is available or has not been selected, executing this command sets the result to the string "Sound Input device not selected."

Using the keyword "file" specifies that the recorded sound should be saved as an AIFF or AIFF-C sound file on disk. Omitting this keyword causes the sound to be saved as a Type 2 sound resource in the data fork of the project that owns the current window.

When recording a sound file, a path name specifying the location of the file is provided in . If any file of any kind exists at the specified location, it is overwritten. When recording a sound resource, contains the name of the resource to be created. If a sound resource with the same name exists in the current project, it is overwritten.

Use the optional "with" keyword to specify the quality at which the sound is to be recorded, where is either "good", "better", or "best". This option is ignored if the sound is being recorded to a project resource. The following table shows the compression ratios and file formats of sound files recorded in this manner:

OPTION COMPRESSION FORMAT
-------- --------------- --------
good 6:1 AIFF-C
better 3:1 AIFF-C
best none AIFF