File: lpread.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 (102 lines) | stat: -rw-r--r-- 5,490 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<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>LPREAD</TITLE>
</HEAD>
<BODY>

<CENTER><A NAME="lpread"></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="SIG_MOD.html">Top of this section</A></B> - <A HREF="filter2.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="lpslot.html">Next</A>&nbsp;
<HR></CENTER>

<H2>
lpread, lpreson, lfreson</H2>

<PRE>krmsr,krmso,kerr,kcps&nbsp; <B>lpread</B>&nbsp;&nbsp;&nbsp; ktimpnt, ifilcod[, inpoles][, ifrmrate]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp; <B>lpreson</B>&nbsp;&nbsp; asig&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp; <B>lpfreson</B>&nbsp; asig, kfrqratio</PRE>

<HR>
<H4>
<U>DESCRIPTION</U></H4>
These units, used as a read/reson pair, use a control file of time-varying
filter coefficients to dynamically modify the spectrum of an audio signal.
<H4>
<U>INITIALIZATION</U></H4>
<I>ifilcod</I> - integer or character-string denoting a control-file (reflection
coefficients and four parameter values) derived from n-pole linear predictive
spectral analysis of a source audio signal. An integer denotes the suffix
of a file <I>lp.m</I>; a character-string (in double quotes) gives a filename,
optionally a full pathname. If not fullpath, the file is sought first in
the current directory, then in that of the environment variable <A HREF="../Syntax/dir.html">SADIR</A>
(if defined). Memory usage depends on the size of the file, which is held
entirely in memory during computation but shared by multiple calls (see
also <B><A HREF="../Generate/adsyn.html">adsyn</A>, <A HREF="../Generate/adsyn.html">pvoc</A></B>).

<P><I>inpoles, ifrmrate</I> (optional) - number of poles, and frame rate
per second in the lpc analysis. These arguments are required only when
the control file does not have a header; they are ignored when a header
is detected. The default value for both is zero.
<H4>
<U>PERFORMANCE</U></H4>
<B>lpread</B> accesses a control file of time-ordered information frames,
each containing n-pole filter coefficients derived from linear predictive
analysis of a source signal at fixed time intervals (e.g. 1/100 of a second),
plus four parameter values:
<PRE>krmsr - root-mean-square (rms) of the residual of analysis,&nbsp;
krmso - rms of the original signal,&nbsp;
kerr&nbsp; - the normalized error signal,&nbsp;
kcps&nbsp; - pitch in cps.</PRE>
<B>lpread</B> gets its values from the control file according to the input
value <I>ktimpnt</I> (in seconds). If <I>ktimpnt</I> proceeds at the analysis
rate, time-normal synthesis will result; proceeding at a faster, slower,
or variable rate will result in time-warped synthesis. At each K-period,
<B>lpread</B> interpolates between adjacent frames to more accurately determine
the parameter values (presented as output) and the filter coefficient settings
(passed internally to a subsequent <B>lpreson</B>).

<P>The error signal <I>kerr</I> (between 0 and 1) derived during predictive
analysis reflects the deterministic/random nature of the analyzed source.
This will emerge low for pitched (periodic) material and higher for noisy
material. The transition from voiced to unvoiced speech, for example, produces
an error signal value of about .3. During synthesis, the error signal value
can be used to determine the nature of the <B>lpreson</B> driving function:
for example, by arbitrating between pitched and non-pitched input, or even
by determining a mix of the two. In normal speech resynthesis, the pitched
input to <B>lpreson</B> is a wideband periodic signal or pulse train derived
from a unit such as <B><A HREF="../Generate/buzz.html">buzz</A></B>, and
the nonpitched source is usually derived from <B><A HREF="../Generate/rand.html">rand</A></B>.
However, any audio signal can be used as the driving function, the only
assumption of the analysis being that it has a flat response.

<P><B>lpfreson</B> is a formant shifted <B>lpreson</B>, in which <I>kfrqratio</I>
is the (cps) ratio of shifted to original formant positions. This permits
synthesis in which the source object changes its apparent acoustic size.
<B>lpfreson</B> with <I>kfrqratio</I> = 1 is equivalent to <B>lpreson</B>.

<P>Generally, <B>lpreson</B> provides a means whereby the time-varying
content and spectral shaping of a composite audio signal can be controlled
by the dynamic spectral content of another. There can be any number of
<B>lpread</B>/<B>lpreson</B> (or <B>lpfreson</B>) pairs in an instrument
or in an orchestra; they can read from the same or different control files
independently.
<CENTER></CENTER>

<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="SIG_MOD.html">Top of this section</A></B> - <A HREF="filter2.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="lpslot.html">Next</A>&nbsp;
<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>