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
|
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (X11; I; IRIX 6.3 IP32) [Netscape]">
<TITLE>SPECPTRK</TITLE>
</HEAD>
<BODY>
<CENTER><A NAME="specptrk"></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="SPECTRAL.html">Top of this section</A></B>
- <A HREF="specaddm.html">Previous</A> - <A HREF="../CONTENTS.html">Contents</A>
- <A HREF="../INDEX.html">Index</A> - <B><U><A HREF="../Sensing/SENSE.html">Next
Section</A></U></B>
<HR></CENTER>
<H2>
specptrk, specsum, specdisp</H2>
<PRE> koct <B>specptrk</B> wsig, inptls, irolloff, iodd[, interp, ifprd, iwtflg]
ksum <B>specsum</B> wsig[, interp]
<B>specdisp</B> wsig, iprd[, iwtflg]</PRE>
<HR>
<H4>
<U>INITIALIZATION</U></H4>
<I>interp</I> (optional) - if non-zero, interpolate the output signal (<I>koct
</I>or <I>ksum</I>). The default value is 0 (repeat the signal value between
changes).
<P><I>ifprd</I> (optional) - if non-zero, display the internally computed
fundamental spectrum. The default value is 0 (no display).
<P><I>iwtflg</I> (optional) - wait flag. If non-zero, hold each display
until released by the user. The default value is 0 (no wait).
<H4>
<U>PERFORMANCE</U></H4>
<B>specptrk</B> - estimate the pitch of the most prominent complex tone
in the spectrum. At note initialization this unit creates a set of <I>inptls</I>
harmonically related partials (odd if <I>iodd</I> non-zero) with amplitude
rolloff to the fraction <I>irolloff</I> per octave. Then at each new frame
of <I>wsig</I>, the spectrum is cross-correlated with this set, and the
result at each point added to an internal copy of the spectrum (optionally
displayed). A pitch is then estimated, and the result is released in decimal
octave form. Between frames, the output is either repeated or interpolated
at the K-rate.
<P><B>specsum</B> - sum the magnitudes across all channels of the spectrum.
At each new frame of <I>wsig</I>, the magnitudes are summed and released
as a scalar <I>ksum</I> signal. Between frames, the output is either repeated
or interpolated at the K-rate. This unit produces a k-signal summation
of the magnitudes present in the spectral data, and is thereby a running
measure of its moment-to-moment overall strength.
<P><B>specdisp</B> - display the magnitude values of spectrum <I>wsig</I>every
<I>iprd</I> seconds (rounded to some integral number of <I>wsig</I>'s originating
<I>iprd</I>).
<H4>
<U>EXAMPLE:</U></H4>
<PRE> ksum <B>specsum</B> wsig, 1 ; sum the spec bins, and ksmooth
if ksum < 2000 kgoto zero ; if sufficient amplitude
koct <B>specptrk</B> wsig ; pitch-track the signal
kgoto contin
zero: koct = 0 ; else output zero
contin:</PRE>
</BODY>
<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="SPECTRAL.html">Top of this section</A></B>
- <A HREF="specaddm.html">Previous</A> - <A HREF="../CONTENTS.html">Contents</A>
- <A HREF="../INDEX.html">Index</A> - <B><U><A HREF="../Sensing/SENSE.html">Next
Section</A></U></B>
<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>
|