<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="Module.2003-12-16.3817">
  <name>Approaching Good Distortion</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2003/12/16 18:38:17 US/Central</md:created>
  <md:revised>2003/12/17 16:00:23.051 US/Central</md:revised>
  <md:authorlist>
    <md:author id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:author>
    <md:author id="jbuck">
      <md:firstname>Jason</md:firstname>
      <md:othername>A</md:othername>
      <md:surname>Buck</md:surname>
      <md:email>jbuck@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>lizzardg@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="mhusband">
      <md:firstname>Mark</md:firstname>
      <md:othername>S.</md:othername>
      <md:surname>Husband</md:surname>
      <md:email>mhusband@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="richb">
      <md:firstname>Richard</md:firstname>
      <md:othername>G.</md:othername>
      <md:surname>Baraniuk</md:surname>
      <md:email>richb@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="jbuck">
      <md:firstname>Jason</md:firstname>
      <md:othername>A</md:othername>
      <md:surname>Buck</md:surname>
      <md:email>jbuck@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>distortion</md:keyword>
    <md:keyword>MATLAB</md:keyword>
    <md:keyword>wavread</md:keyword>
    <md:keyword>harmonics</md:keyword>
    <md:keyword>noise</md:keyword>
    <md:keyword>banpass</md:keyword>
    <md:keyword>filter</md:keyword>
  </md:keywordlist>

  <md:abstract>Discovering quirks in MATLAB, finding a simple noise filter, and getting great sound!</md:abstract>
</metadata>

  <content>
    <section id="s1">
      <name>Creating the Distortion</name>
      <para id="s1p1">
	As we discovered in <cnxn document="m">Problems with
	Distortion</cnxn>, when we work with the modified power
	series, we do not get the expected result.  In fact, we only
	get a lower quality version of our original sound file!
	However, taking a look at the minimum and maximum of our sound
	vector, we soon discover the problem: all values of our signal
	are between 1 and -1!  When we take these numbers to the ten
	power, or even the five power, all we do is make our sound
	values smaller.  Therefore, a quick fix would be to take these
	numbers to the <emphasis>one-tenth</emphasis> power or the
	<emphasis>one-fifth</emphasis> power, in effect dividing each
	power by ten.  Upon checking out our signal, we get the
	wonderful distortion that we needed!  As we play around with
	different coefficients and powers (all less than one), our own
	discerning ears determine which coefficients and powers are
	best for the distortion we want.  However, in all of this
	playing around, a particular evil has crept in among our
	distortion: noise!
      </para>
    </section>
    <section id="s2">
      <name>Dealing with the Noise</name>
      <para id="s2p1">
	Several different methods can be used to take out the noise
	from our signal.  In fact, an <link src="http://www.owlnet.rice.edu/~elec301/Projects02/lorisFor/">entire
	project</link> was dedicated to noise-elimination in 2002.
	However, since this project focuses mainly on a MATLAB
	approach rather than a C approach, we'll leave implimenting
	that noise filter to a more adventurous group.
      </para>
      <para id="s2p2">
	The simplest way to get rid of the noise would be to impliment
	a band pass filter in MATLAB, allowing only for the frequency
	range of the guitar (about 100Hz to about 4000Hz, perhaps
	higher depending on the high notes you play).  This filter
	will get rid of most of the noise, except for the noise that
	lies within those frequencies.
      </para>
      <para id="s2p3">
	Another easy way to get rid of the noise involves the FFT.
	After taking the FFT of the signal, you can decrease noise by
	throwing out the frequencies below a certain threshold.
      </para>
    </section>
  </content>
  
</document>
