<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:m="http://www.w3.org/1998/Math/MathML" id="new">
  <name>Linear Prediction and Cross Synthesis</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2007/09/28 10:13:02 GMT-5</md:created>
  <md:revised>2008/03/18 09:47:06.885 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="doering">
      <md:firstname>Ed</md:firstname>
      
      <md:surname>Doering</md:surname>
      <md:email>doering@rose-hulman.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="doering">
      <md:firstname>Ed</md:firstname>
      
      <md:surname>Doering</md:surname>
      <md:email>doering@rose-hulman.edu</md:email>
    </md:maintainer>
    <md:maintainer id="eluther">
      <md:firstname>Erik</md:firstname>
      <md:othername>B</md:othername>
      <md:surname>Luther</md:surname>
      <md:email>erik.luther@ni.com</md:email>
    </md:maintainer>
    <md:maintainer id="SShearman">
      <md:firstname>Sam</md:firstname>
      <md:othername>D.</md:othername>
      <md:surname>Shearman</md:surname>
      <md:email>sam.shearman@ni.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>cross synthesis</md:keyword>
    <md:keyword>LabVIEW</md:keyword>
    <md:keyword>linear prediction</md:keyword>
    <md:keyword>spectral envelope</md:keyword>
    <md:keyword>time-varying digital filter</md:keyword>
    <md:keyword>vocal tract</md:keyword>
  </md:keywordlist>

  <md:abstract>Linear prediction coding (LPC) models a speech signal as a time-varying filter driven by an excitation signal. The time-varying filter coefficients model the vocal tract spectral envelope. “Cross synthesis” is an interesting special effect in which a musical instrument signal drives the digital filter (or vocal tract model), producing the sound of a “singing instrument.” The theory and implementation of linear prediction are presented in this module.</md:abstract>
</metadata>

<content>

<table id="labview_banner" frame="none"><tgroup cols="2">
<colspec rowsep="0" colsep="0"/> <colspec colwidth="6in" rowsep="0" colsep="0"/>
<tbody>
  <row>
    <entry morerows="3"><media type="image/png" src="LabVIEWq.png"/></entry>
    <entry> This module refers to LabVIEW, a software development environment that features a graphical programming language.
       Please see the <cnxn document="m15428">LabVIEW QuickStart Guide</cnxn> module for tutorials and documentation that will help you:</entry>
  </row>
  <row> <entry>• Apply LabVIEW to Audio Signal Processing </entry> </row>
  <row> <entry>• Get started with LabVIEW</entry> </row>
  <row> <entry>• Obtain a fully-functional evaluation edition of LabVIEW</entry> </row>
</tbody>
</tgroup>
</table>


<section id="sec1">
<name>Introduction</name>

<para id="par2">
		<term>Subtractive synthesis</term> methods are characterized by a wideband excitation source followed
		by a time-varying filter. <term>Linear prediction</term> provides an effective way to estimate
		the time-varying filter coefficients by analyzing an existing music or speech signal. 
		<term>Linear predictive coding</term> (<term>LPC</term>) is one of the first applications of linear
		prediction to the problem of speech compression. In this application, a speech signal is modelled as
		a time-varying digital filter driven by an <term>innovations sequence</term>. The LPC method identifies
		the filter coefficients by minimizing the prediction error between the filter output and the original
		signal. Significant compression is possible because the innovations sequence and filter coefficients 
		require less space than the original signal.</para>

<para id="par3">		<term>Cross synthesis</term> is a musical adaptation of the speech compression technique. A musical
		instrument or speech signal serves as the original signal to be analyzed. Once the filter coefficients
		have been estimated, the innovations sequence is discarded and another signal is used as the filter
		excitation. For example, a "singing guitar" effect is created by deriving the filter coefficients from
		a speech signal and driving the filter with the sound of an electric guitar; listen to the audio clips below:
</para>

<list id="list4" type="bulleted">

<item> <link src="speech.wav">speech.wav</link> -- Speech signal for digital filter coefficients
			(audio courtesy of the Open Speech Repository,
			<link src="http://www.voiptroubleshooter.com/open_speech">www.voiptroubleshooter.com/open_speech</link>; 
			the sentences are two of the many phonetically balanced <term>Harvard Sentences</term>, an important standard
		       for the speech processing community) </item>
<item> <link src="eguitar.wav">eguitar.wav</link> -- Electric guitar signal for filter input </item>
<item> <link src="speech_eguitar.wav">speech_eguitar.wav</link> -- Cross-synthesized result (filter output) </item>

</list>

</section>

<section id="sec5">
<name>Linear Prediction Theory</name>

<para id="par6">
		The <cnxn target="video-theory"/> screencast video develops the theory behind linear prediction and describes
		how the technique is applied to musical signals. Practical issues such as choosing the filter block size and filter order
		are also discussed.
</para>

<figure id="video-theory">
<media type="image/png" src="sub_lpc-theory.html">
   <param name="thumbnail" value="sub_lpc-theory.png"/>
   </media>
<caption>
   [video] Theory of linear prediction and cross synthesis
</caption>
</figure>

</section>

<section id="sec8">
<name>Linear Prediction Implementation</name>

<para id="par9">
		The previous section explains how you can use the all-pole filter model to implement
		cross synthesis. But how are the all-pole filter coefficients actually created?</para>

<para id="par10">		The LabVIEW MathScript feature includes the function <term>lpc</term>, which accepts a signal
		(1-D vector or array) and the desired filter order and returns an array of filter coefficients.
		For details, select "Tools | MathScript Window" and type <code type="inline">help lpc</code>.
</para>

</section>

</content>
</document>
