next up previous
Next: States Up: Segments, states, and events Previous: Segments, states, and events

Subsections

Segments

A segment is the smallest part of a waveform. Like an element, it has an amplitude (height) and a duration (measured in samples). In addition, a segment also has a range (maximum and minimum values) and an increment of change.

A segment can be of one of three types: a wiggle, a twiggle, or a ciggle. These will be explained in full later.

In the ``segments'' file, you define the segments you want to use. This file must have the extension ``.sg''.

Here's a definition for one segment:

     a1 wiggle               # identifier, type
     10  20 1 1              # initial, max, min, inc (duration)
     0   32000 -32000 4000   # initial, max, min, inc (amplitude)

Every time this segment is iterated, its duration and its amplitude will increase by their respective increments. Once they reach their maxima, they will start shrinking by the their respective increments. When they reach their minima, they will start increasing again.

Since their ranges and increments are not the same, they will reach their minima and maxima at different times.

Segment range limits


next up previous
Next: States Up: Segments, states, and events Previous: Segments, states, and events
Arun Chandra
arunc@evergreen.edu