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)
So, the initial duration for a1 is 10 samples, the maximum duration it will reach is 20 samples, and the minimum duration it will reach is 1 sample. On each iteration of this segment, the duration will change by 1 sample.
The initial amplitude will be 0, it will increase to 32000, and decrease to -32000, and will change by 4000 on each iteration.
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.