1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
<HTML>
<TITLE>TEMPEST</TITLE>
<CENTER><A NAME="tempest"></A>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="SENSE.html">Top of this section</A></B> - <A HREF="./SENSE.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./xyin.html">Next</A>
<HR></CENTER>
<H2>
tempest</H2>
<PRE> ktemp <B>tempest</B> kin, iprd, imindur, imemdur, ihp, ithresh, \
ihtim, ixfdbak, istartempo, ifn[, idisprd, itweek]</PRE>
<HR>
<H4>
<U>DESCRIPTION</U></H4>
Estimate the tempo of beat patterns in a control signal.
<H4>
<U>INITIALIZATION</U></H4>
<I>iprd</I> - period between analyses (in seconds). Typically about .02
seconds.
<P><I>imindur</I> - minimum duration (in seconds) to serve as a unit of
tempo. Typically about .2 seconds.
<P><I>imemdur</I> - duration (in seconds) of the <I>kin</I> short-term
memory buffer which will be scanned for periodic patterns. Typically about
3 seconds.
<P><I>ihp</I> - half-power point (in cps) of a low-pass filter used to
smooth input <I>kin</I> prior to other processing. This will tend to suppress
activity that moves much faster. Typically 2 cps.
<P><I>ithresh</I>- loudness threshold by which the low-passed <I>kin</I>
is center-clipped before being placed in the short-term buffer as tempo-relevant
data. Typically at the noise floor of the incoming data.
<P><I>ihtim</I> - half-time (in seconds) of an internal forward-masking
filter that masks new <I>kin</I> data in the presence of recent, louder
data. Typically about .005 seconds.
<P><I>ixfdbak</I> - proportion of this unit's <I>anticipated value</I>
to be mixed with the incoming <I>kin</I> prior to all processing. Typically
about .3.
<P><I>istartempo</I> - initial tempo (in beats per minute). Typically 60.
<P><I>ifn</I> - table number of a stored function (drawn left-to-right)
by which the short-term memory data is attenuated over time.
<P><I>idisprd</I> (optional) - if non-zero, display the short-term past
and future buffers every <I>idisprd</I> seconds (normally a multiple of
<I>iprd</I>). The default value is 0 (no display).
<P><I>itweek</I> (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).
<H4>
<U>PERFORMANCE</U></H4>
<B>tempest</B> examines <I>kin</I> 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 <I>tempo</I> in beats per minute, is output as <I>ktemp</I>.
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.
<P>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 <B><A HREF="./xyin.html">tempo</A></B> statement.
<H4>
<U>EXAMPLE:</U></H4>
<PRE>ksum <B>specsum</B> wsignal, 1 ; sum the amps of a spectrum
ktemp <B>tempest</B> ksum, .02, .1, 3, 2, 800, .005, 0, 60, 4, .1, .995
; and look for beats</PRE>
<CENTER><P>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="SENSE.html">Top of this section</A></B> - <A HREF="./SENSE.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./xyin.html">Next</A>
<HR></CENTER>
<P><CENTER>
<B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>©
Jean Piché & Peter J. Nix, 1994-97</FONT></FONT></I></B>
</CENTER>
</HTML>
|