The files used by SoundSync are all based on the same basic format.
The following basic format is used for all keyset files, track files, and recognizer configuration files used by SoundSync. The format is a simple, block-structure with commands and parameters.
Statements are single line commands in the following form:
command <parameter1> <parameter2> <parameter3> ...
Blocks are used to surround groups of statements or other blocks as follows:
begin <blockname> <parameter1> ... command <parameter1> <parameter2> <parameter3> ... command <parameter1> <parameter2> <parameter3> ... ... begin <blockname> <parameter1> ... command <parameter1> <parameter2> <parameter3> ... command <parameter1> <parameter2> <parameter3> ... ... end end
Track files are created automatically by SoundSync. You create the keyset files and any additional recognizers.
| For further information about creating a recognizer, see the Recognizer section later in this chapter. |
Keyset files contain the links between a wire file and the keyframes that define keyshapes and keysets. The elements of the keyset file are listed below.
The wire block usage statement is as follows:
wire <wirefile-name> <neutral-frame>
The keyset block format is as follows:
begin keyset <keyset-name> key <key-name> <frame> [<image-filename>] .... end
A keyset defines a series of keyshapes and frame numbers. A keyset can contain any number of keys, but in practice if a keyset contains more than twenty keys it may be more appropriate to divided it into separate keysets.
Each key in a keyset can only apply transformations to one set of dag nodes in the wire file.
If an image filename is specified, the image is used in the image display mode and is used to display a keyshape image in the keyshape palette. If no image is specified, one is generated automatically from the geometry at start-up. Images are assumed to be in the current project's /pix directory.
| If you run the program in -nogeom mode, keysets without images are reported as an error. |
Keyset names must be unique. If there is more than one keyset with the same name, the keyset is not loaded and an error is reported.
If you load and configure recognizers during a session and then save the keyset, the keyset file contains recognizer configuration and linkage information.
Here is an example of a keyset file using keyset blocks:
wire mywirefile 0
begin keyset head
key open 0 frog.0
key closed 10 frog.10
key wide 20 frog.20
key open2 30 frog.30
key croak 40 frog.40
end keyset head
begin keyset foot
key stomp 60 stomp.60
key lift 70 stomp.70
end keyset foot
The shapeset block format is as follows:
begin shapeset <shapeset-name> <control-dag-name> <channel> key <key-name> <value> [<image-filename>] ... end
A shapeset defines a series of values for a control node for the given Shapeshifter deformation. At least two values (which define the minimum and maximum values for the control node) are needed. As many intermediate values can be specified as are needed.
As in the keyset, if an image is specified, it is used in the image display mode. If no image is specified, one is generated automatically at start-up.
The track file contains all of the animation information from a SoundSync session:
The sound block format is as follows:
sound <soundfile-name>
<soundfile-name> is assumed to be:
The fps block format is as follows:
fps <value>
fps <value> specifies the frame rate for the animation.
The frame rate is typically either 24 or 30 frames per second. This value is very important because it determines the relationship of the frame numbers and the soundtrack. At 24 frames per second, frame 240 is ten seconds from the start of the sound while at 30 frames per second frame 240 is only eight seconds from the start.
Set the frames per second value appropriately when you start SoundSync and do not change it indiscriminately during a session or by editing the track file after a session.
The marktrack block format is as follows:
begin marktrack mark <frame-time> <character> .... end
The marktrack block lists single characters that are aligned with the soundtrack as a method of annotating the soundtrack. Each frame and character are listed on a separate line.
The keytrack block format is as follows:
begin keytrack <keyset-name> event <frame-time> <key-name> <smooth-type> <value> ... end
The keytrack block refers to the keyset from which it is derived. It has the same name as the keyset and it contains direct text references to the keyshape names given in the keyset file. The <smooth-type> parameter is flat, linear, or smooth. The <value> parameter specifies the value of the key at the event time. The default <value> is 1.0, but it can be more or less to exaggerate or reduce a deformation.
The recognizer configuration files are highly specific to the individual recognizer type. These files are always found with the actual plug-in shared objects and are generally automatically.
For further information about recognizer configuration files, see the Recognizer section later in this chapter.
Each file type has a specific location within the standard Alias project directory structure as follows: