Use Non-Frames Version Previous Page Next Page
Instrument Control: Sensing and Control

tempest

  ktemp   tempest   kin, iprd, imindur, imemdur, ihp, ithresh, ihtim, ixfdbak, istartempo, ifn[, idisprd, itweek]

Description

Estimate the tempo of beat patterns in a control signal.

Initialization

iprd – period between analyses (in seconds). Typically about .02 seconds.

imindur – minimum duration (in seconds) to serve as a unit of tempo. Typically about .2 seconds.

imemdur – duration (in seconds) of the kin short-term memory buffer which will be scanned for periodic patterns. Typically about 3 seconds.

ihp – half-power point (in Hz) of a low-pass filter used to smooth input kin prior to other processing. This will tend to suppress activity that moves much faster. Typically 2 Hz.

ithresh – loudness threshold by which the low-passed kin is center-clipped before being placed in the short-term buffer as tempo-relevant data. Typically at the noise floor of the incoming data.

ihtim – half-time (in seconds) of an internal forward-masking filter that masks new kin data in the presence of recent, louder data. Typically about .005 seconds.

ixfdbak – proportion of this unit's anticipated value to be mixed with the incoming kin prior to all processing. Typically about .3.

istartempo – initial tempo (in beats per minute). Typically 60.

ifn – table number of a stored function (drawn left-to-right) by which the short-term memory data is attenuated over time.

idisprd (optional) – if non-zero, display the short-term past and future buffers every idisprd seconds (normally a multiple of iprd). The default value is 0 (no display).

itweek (optional) – fine-tune adjust this unit so that it is stable when analyzing events controlled by its own output. The default value is 1 (no change).

Performance

tempest examines kin for amplitude periodicity, and estimates a current tempo. The input is first low-pass filtered, then center-clipped, and the residue placed in a short-term memory buffer (attenuated over time) where it is analyzed for periodicity using a form of autocorrelation. The period, expressed as a tempo in beats per minute, is output as ktemp. The period is also used internally to make predictions about future amplitude patterns, and these are placed in a buffer adjacent to that of the input. The two adjacent buffers can be periodically displayed, and the predicted values optionally mixed with the incoming signal to simulate expectation.

This unit is useful for sensing the metric implications of any k-signal (e.g.- the RMS of an audio signal, or the second derivative of a conducting gesture), before sending to a tempo statement.

Example

  ksum    specsum   wsignal, 1               ; sum the amps of a spectrum
  ktemp   tempest   ksum, .02, .1, 3, 2, 800, .005, 0, 60, 4, .1, .995 
                                             ; and look for beats

Use Non-Frames Version Previous Page Next Page
Instrument Control: Sensing and Control