File: specptrk.html

package info (click to toggle)
csound-doc 3.47b2-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,492 kB
  • ctags: 272
  • sloc: makefile: 36
file content (83 lines) | stat: -rw-r--r-- 3,945 bytes parent folder | download | duplicates (6)
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>&nbsp; koct&nbsp;&nbsp; <B>specptrk</B>&nbsp; wsig, inptls, irolloff, iodd[, interp, ifprd, iwtflg]
&nbsp; ksum&nbsp;&nbsp; <B>specsum</B>&nbsp;&nbsp; wsig[, interp]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>specdisp</B>&nbsp; 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>&nbsp; ksum <B>specsum</B>&nbsp;&nbsp;&nbsp; wsig,&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; sum the spec bins, and ksmooth
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ksum &lt; 2000&nbsp;&nbsp; kgoto&nbsp; zero ; if sufficient amplitude
&nbsp; koct <B>specptrk</B>&nbsp;&nbsp; wsig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;&nbsp;&nbsp; pitch-track the signal
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kgoto&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; contin
zero:&nbsp; koct&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; 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>&copy;
Jean Pich&eacute; &amp; Peter J. Nix, 1994-97</FONT></FONT></I></B>&nbsp;
</CENTER>
</HTML>