Time Sequence

Relative TSEQ

Sometimes it is useful to define time values relative to another audio signal. In that case, the older help content describes a relative time sequence using this form:

[x;][y]

Example 1

The amplitude of a tone is scaled with a time sequence that is:

The help notes that multiplication with a TSEQ involves linear interpolation between specified time points.

AUX> x = tone(500,1000);
AUX> ts = [0 250 500 1000][0 .7 .3 1];
AUX> y = ts * x;

Time sequence example 1

Example 2

The same TSEQ can be applied to a signal with a different duration:

AUX> x = tone(500,800);
AUX> ts = [0 250 500 1000][0 .7 .3 1];
AUX> y = ts * x;

The older text asks whether this is the desired behavior, implying this example illustrates an absolute rather than relative time course.

Time sequence example 2

Example 3

To scale audio with the same relative time course as Example 1, use a relative TSEQ:

AUX> x = tone(500,800);
AUX> ts = [0 .25 .5 1;][0 .7 .3 1];
AUX> y = ts * x;

Time sequence example 3

Example 4

To adjust amplitude using a desired time course in dB, use the @ operator:

AUX> x = tone(500,800);
AUX> ts = [0 .25 .5 1;][-100 -3 -10 0];
AUX> y = x @ ts;

Time sequence example 4

Current source basis: