NAME
auRecord - Create an audio recording object.
SYNOPSIS
auRecord parentName ?options?
DESCRIPTION
The auRecord command create a new object which can be used
to record audio data that consists of a sequence of discrete
samples (au format).
An auRecord object cannot record sound until the lts and
device slots are set. Audio data will not be recorded unless
the lts object's -speed slot is set to 1.0. Recording begins
immediately once the object is readied and the speed is set
appropriately. A device is the part of the auRecord object
responsible for recording audio from an input source (e.g.
microphone or line-in). The only input device currently
available is Sparc audio device ("sparc").
auRecord objects can be in one of two states: ready or
unready. When first created the object is in the unready
state. The object can be put into the ready state by cal-
ling the object's ready command. The required slots (lts
and device) must be set before calling the ready command.
OPTIONS
-gain
The output gain at which sound should be recorded, specified
as a floating point number between 0 and 1. The object does
not actually use this value, but passes it to the device.
-sampleRate
An integer specifying the number of samples per second.
This option is also used only by the device.
-channels
An integer specifying the number of channels to be recorded.
Used only by the device.
-input
Input source for the sound. Valid values are the strings
"microphone" and "line_in". Used only by the device.
-delayTime
How many seconds after the time the sound started to be
recorded to schedule playback. Note that this should be
longer than the cycleTime.
-cycleTime
How frequently to send the accumulated audio data. Deter-
mines buffer requirements.
-device
Should be set to the recording device type. If "default",
the compiled default device will be used. Current device
types are: "sparc". This slot must be set for the object to
work. Attempting to issue the "ready" command to the object
when this slot has not yet been set will generate an error.
-format
Indicates the format of audio to be recorded. Valid choices
are dependent on the device type. With sparc audio devices,
valid choices are "mu-law" and "linear16". This slot is only
used by the device and may not affect anything if the device
does not support the format chosen.
-lts
Should be set to the logical time system object (lts) to be
used for synchronization. This slot must be set for the
resource object to work. Attempting to issue the "ready"
command to the object when this slot has not yet been set
will generate an error. Currently, to record, the lts -speed
slot must be set to 1.0.
-outCmd
Indicates the command to call when sending data. If the com-
mand begins with a "@" symbol, an appropriate registered C
command is looked up and used, otherwise the command is
evaluated as a Tcl command with a Tcl string representation
of a scatter buffer list appended as the final argument.
WIDGET COMMANDS
The auRecord command creates a new command objectName.
ObjectName is generating by concatenating the value of
parent and a unique string generated internally. The empty
string is a valid value for parent. This new command,
objectName, is used to invoke various operations on the new
object.
For more information on object names and why they are gen-
erated by the cm process and not set by the user, please
read the object management overview for the cm toolkit.
The command objectName has the following general form:
objectName option ?arg arg arg...?
Option and the args determine the exact behavior of the com-
mand. The following commands are available:
objectName configure ?options?
Query or modify the configuration options described
above. If the object was in the ready state (see the
ready command below), the configure command puts the
object into the unready state, requiring the the ready
command be given again for data to start flowing.
objectName destroy
Destroys the object.
objectName ready
This command readies the object. The required slots
(lts and device) must be set. In order to record, the
lts -speed must be 1.0.
objectName unready
This command unreadies the object stopping data from
being recorded.
objectName stats
This command is not yet implemented but will eventually
return a list of statistics concerning the object's
performance.
objectName deviceList
This command returns a list of valid device types.
KEYWORDS
cm, audio, audiofile, play, cm toolkit
SEE ALSO
audio(5), lts(l), auPlay(l)
AUTHORS
Jonathan Logan (logan@acm.org)