<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://cycling74.com/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;feed=atom&amp;action=history</id>
		<title>MSP Sampling Tutorial 5: Waveshaping - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;action=history"/>
		<updated>2013-05-26T09:22:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.1</generator>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=915&amp;oldid=prev</id>
		<title>Gtaylor@rtqe.net at 16:12, 6 July 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=915&amp;oldid=prev"/>
				<updated>2012-07-06T16:12:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:12, 6 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial patch: [[Media:05sWaveshapingSynth.zip]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial patch &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and files&lt;/ins&gt;: [[Media:05sWaveshapingSynth.zip]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial, we'll look at a latent (but very useful) attribute of samples, which is that they can be used as lookup tables to transform the shape of other waveforms. This process is called ''waveshaping'', and is used in synthesis to generate complex spectra from a sinusoidal input. It's also the basic signal processing technique behind many types of amplitude-dependent distortion, and can be used to model the non-linearities of different kinds of amplifier.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial, we'll look at a latent (but very useful) attribute of samples, which is that they can be used as lookup tables to transform the shape of other waveforms. This process is called ''waveshaping'', and is used in synthesis to generate complex spectra from a sinusoidal input. It's also the basic signal processing technique behind many types of amplitude-dependent distortion, and can be used to model the non-linearities of different kinds of amplifier.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gtaylor@rtqe.net</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=913&amp;oldid=prev</id>
		<title>Gtaylor@rtqe.net at 16:08, 6 July 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=913&amp;oldid=prev"/>
				<updated>2012-07-06T16:08:14Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 16:08, 6 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial patch: [[Media:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;05sWaveshapingSynthesis&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;maxpat&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Click here to open the tutorial patch: [[Media:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;05sWaveshapingSynth&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;zip&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial, we'll look at a latent (but very useful) attribute of samples, which is that they can be used as lookup tables to transform the shape of other waveforms. This process is called ''waveshaping'', and is used in synthesis to generate complex spectra from a sinusoidal input. It's also the basic signal processing technique behind many types of amplitude-dependent distortion, and can be used to model the non-linearities of different kinds of amplifier.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In this tutorial, we'll look at a latent (but very useful) attribute of samples, which is that they can be used as lookup tables to transform the shape of other waveforms. This process is called ''waveshaping'', and is used in synthesis to generate complex spectra from a sinusoidal input. It's also the basic signal processing technique behind many types of amplitude-dependent distortion, and can be used to model the non-linearities of different kinds of amplifier.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gtaylor@rtqe.net</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=847&amp;oldid=prev</id>
		<title>Gtaylor@rtqe.net at 15:53, 28 June 2012</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=847&amp;oldid=prev"/>
				<updated>2012-06-28T15:53:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;amp;diff=847&amp;amp;oldid=744&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Gtaylor@rtqe.net</name></author>	</entry>

	<entry>
		<id>http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=744&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Click here to open the tutorial patch: 05sWaveshapingSynthesis.maxpat  In this tutorial, we'll look at a latent (but very useful) attribute of samples, which is that they ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://cycling74.com/wiki/index.php?title=MSP_Sampling_Tutorial_5:_Waveshaping&amp;diff=744&amp;oldid=prev"/>
				<updated>2012-06-25T16:51:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Click here to open the tutorial patch: &lt;a href=&quot;/wiki/index.php?title=05sWaveshapingSynthesis.maxpat&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;05sWaveshapingSynthesis.maxpat (page does not exist)&quot;&gt;05sWaveshapingSynthesis.maxpat&lt;/a&gt;  In this tutorial, we&amp;#039;ll look at a latent (but very useful) attribute of samples, which is that they ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Click here to open the tutorial patch: [[05sWaveshapingSynthesis.maxpat]]&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we'll look at a latent (but very useful)&lt;br /&gt;
attribute of samples, which is that they can be used as lookup&lt;br /&gt;
tables to transform the shape of other waveforms. This process&lt;br /&gt;
is called ''waveshaping'', and is used in synthesis to generate&lt;br /&gt;
complex spectra from a sinusoidal input. It's also the basic signal&lt;br /&gt;
processing technique behind many types of amplitude-dependent distortion,&lt;br /&gt;
and can be used to model the non-linearities of different kinds of&lt;br /&gt;
amplifier.&lt;br /&gt;
&lt;br /&gt;
===Using a stored wavetable as a transfer function===&lt;br /&gt;
&lt;br /&gt;
Take a look at the tutorial patcher. The basic sound-generating&lt;br /&gt;
circuit in the upper-left of the patcher should look familiar, with&lt;br /&gt;
one new object ({{maxword|name=lookup~}}) inserted into the chain. We have&lt;br /&gt;
a {{maxword|name=cycle~}} object going through an amplifier ({{maxword|name=*~}}) to&lt;br /&gt;
the {{maxword|name=ezdac~}}.&lt;br /&gt;
&lt;br /&gt;
* Turn on the {{maxword|name=ezdac~}} object and adjust the {{maxword|name=number}} box&lt;br /&gt;
labeled &amp;lt;code&amp;gt;amplitude&amp;lt;/code&amp;gt;. You should hear a sine wave at &amp;lt;code&amp;gt;220&amp;lt;/code&amp;gt; Hz.&lt;br /&gt;
&lt;br /&gt;
The new object in this signal chain at first seems to be doing&lt;br /&gt;
nothing, and in terms of what we hear, it isn't... yet.&lt;br /&gt;
The {{maxword|name=lookup~}} object interprets a piece of sample memory&lt;br /&gt;
stored in a {{maxword|name=buffer~}} object as a ''transfer function'',&lt;br /&gt;
with the beginning of the sample used representing input values&lt;br /&gt;
of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and the end of the sample used representing values&lt;br /&gt;
of &amp;lt;code&amp;gt;1.&amp;lt;/code&amp;gt; Incoming values are scaled across this ''X'' axis,&lt;br /&gt;
and the resulting audio comes from the corresponding values along&lt;br /&gt;
the ''Y'' axis.&lt;br /&gt;
&lt;br /&gt;
In our patch, the {{maxword|name=buffer~}} named &amp;lt;code&amp;gt;waveform&amp;lt;/code&amp;gt; is serving as&lt;br /&gt;
a ''lookup table'' (or transfer function) for the incoming sine&lt;br /&gt;
wave. When the {{maxword|name=cycle~}} object generates a &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;, for&lt;br /&gt;
example, ''whatever sample value'' is at the beginning of&lt;br /&gt;
the {{maxword|name=buffer~}} comes out of the {{maxword|name=lookup~}} object. When&lt;br /&gt;
our {{maxword|name=cycle~}} hits &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, the {{maxword|name=lookup~}} object reads&lt;br /&gt;
from the end of the {{maxword|name=buffer~}} to find its outgoing sample.&lt;br /&gt;
&lt;br /&gt;
* Double-click the {{maxword|name=buffer~}} object at the bottom of the tutorial&lt;br /&gt;
patcher. Notice that the waveform loaded in is a simple ramp. Because&lt;br /&gt;
our waveshape (the sample in the {{maxword|name=buffer~}} is a linear ramp with&lt;br /&gt;
the beginning of the sample at &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and the end at &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;,&lt;br /&gt;
our {{maxword|name=cycle~}} object sounds unchanged.&lt;br /&gt;
&lt;br /&gt;
The {{maxword|name=lookup~}} object takes three possible arguments: the first&lt;br /&gt;
is the name of the {{maxword|name=buffer~}} to use as its waveshape; the second&lt;br /&gt;
and third are the start and end points (in ''samples'' to use&lt;br /&gt;
within the {{maxword|name=buffer~}} as the boundaries of the transfer function.&lt;br /&gt;
Because we want our {{maxword|name=buffer~}} to be exactly &amp;lt;code&amp;gt;512&amp;lt;/code&amp;gt; samples&lt;br /&gt;
long in our patcher, we created it with the argument of &amp;lt;code&amp;gt;10.66667&amp;lt;/code&amp;gt;&lt;br /&gt;
milliseconds. How did we get this number. At the right of the patcher,&lt;br /&gt;
you can see the {{maxword|name=sampstoms~}} object, which allows us to convert&lt;br /&gt;
from samples to milliseconds.&lt;br /&gt;
&lt;br /&gt;
===The waveform~ object===&lt;br /&gt;
&lt;br /&gt;
Look at the graphical object at the top of the tutorial patcher.&lt;br /&gt;
Notice that it contains the same shape that is loaded into our {{maxword|name=buffer~}}.&lt;br /&gt;
The {{maxword|name=waveform~}} object allows us to view, select regions of, and&lt;br /&gt;
directly modify the contents of a {{maxword|name=buffer~}} with a drawing tool.&lt;br /&gt;
&lt;br /&gt;
* Using your mouse, doodle in the {{maxword|name=waveform~}} object's display.&lt;br /&gt;
Notice how different shapes affect the output sound. Try drawing&lt;br /&gt;
smooth curves, then jagged ones, then ones with lots of plateaus&lt;br /&gt;
(straight horizontal lines). Notice that even slight variations&lt;br /&gt;
in the shape have tremendous impact on the spectrum generated by&lt;br /&gt;
the {{maxword|name=lookup~}} object.&lt;br /&gt;
&lt;br /&gt;
The {{maxword|name=waveform~}} object is operating in &amp;lt;code&amp;gt;draw&amp;lt;/code&amp;gt; mode, where&lt;br /&gt;
you can literally modify a sample loaded into a {{maxword|name=buffer~}} with&lt;br /&gt;
your mouse. Other modes allow you to select regions, the boundaries&lt;br /&gt;
of which can be used as Max messages for other objects.&lt;br /&gt;
&lt;br /&gt;
===Setting sample values with Max messages: peek~===&lt;br /&gt;
&lt;br /&gt;
* Click on the {{maxword|name=button}} labeled &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; in the tutorial patcher.&lt;br /&gt;
Our waveshape (and our sound) should return to normal.&lt;br /&gt;
&lt;br /&gt;
The way we got the default waveshape in our tutorial patcher is through&lt;br /&gt;
the logic controlled by the {{maxword|name=uzi}} below the {{maxword|name=button}}&lt;br /&gt;
labeled &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;. The {{maxword|name=uzi}} object, you may recall, generates a&lt;br /&gt;
lot of data instantly depending on its argument... the right outlet&lt;br /&gt;
of the object generates a numeric ramp from &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; to its argument.&lt;br /&gt;
We've subtracted &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; from that value to generate a stream of Max&lt;br /&gt;
numbers from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;511&amp;lt;/code&amp;gt; when you click the {{maxword|name=button}}.&lt;br /&gt;
These numbers are then sent to the middle and left inlets of a {{maxword|name=peek~}} object...&lt;br /&gt;
the left inlet receives the numbers unchanged; the middle inlet&lt;br /&gt;
receives them after they have been scaled into the range of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt;&lt;br /&gt;
to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (via the {{maxword|name=scale}} object).&lt;br /&gt;
&lt;br /&gt;
The {{maxword|name=peek~}} object allows us to manually set the sample values within&lt;br /&gt;
a {{maxword|name=buffer~}} via Max messages. The left inlet (which is &amp;quot;hot&amp;quot;,&lt;br /&gt;
and actually performs the operation) sets ''which'' sample we're&lt;br /&gt;
changing; the middle inlet sets the value to change that sample to.&lt;br /&gt;
In our case, the {{maxword|name=uzi}} object generates a stream of numbers&lt;br /&gt;
that our entire {{maxword|name=buffer~}} to an ascending ramp, e.g.&lt;br /&gt;
&lt;br /&gt;
Sample Value&lt;br /&gt;
&lt;br /&gt;
0 -1.&lt;br /&gt;
&lt;br /&gt;
1 -0.996086&lt;br /&gt;
&lt;br /&gt;
2 -0.992172&lt;br /&gt;
&lt;br /&gt;
3 -0.988258&lt;br /&gt;
&lt;br /&gt;
4 -0.984344&lt;br /&gt;
&lt;br /&gt;
5 -0.980431&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
508 0.988258&lt;br /&gt;
&lt;br /&gt;
509 0.992172&lt;br /&gt;
&lt;br /&gt;
510 0.996086&lt;br /&gt;
&lt;br /&gt;
511 1.&lt;br /&gt;
&lt;br /&gt;
===For the math geeks in the room===&lt;br /&gt;
&lt;br /&gt;
* Click on the other {{maxword|name=button}} objects in the patcher&lt;br /&gt;
(labeled &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;D&amp;lt;/code&amp;gt;). Notice how the&lt;br /&gt;
waveshape in the {{maxword|name=buffer~}} changes, and note how it affects&lt;br /&gt;
the sound. Each waveshape seems to ''multiply'' the frequency&lt;br /&gt;
of the sound generated by the {{maxword|name=cycle~}} object. The logic&lt;br /&gt;
at &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt; makes our &amp;lt;code&amp;gt;220&amp;lt;/code&amp;gt; Hz wave sound at &amp;lt;code&amp;gt;440&amp;lt;/code&amp;gt;,&lt;br /&gt;
&amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;660&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;D&amp;lt;/code&amp;gt; at &amp;lt;code&amp;gt;880&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The equations that the {{maxword|name=expr}} objects are doing in these parts&lt;br /&gt;
of the patch generate special types of transfer functions&lt;br /&gt;
called ''Chebyshev polynomials''. These functions are interesting&lt;br /&gt;
in that they have the ability to transform sinusoidal input to&lt;br /&gt;
different harmonic multiples. The four Chebyshev polynomials in our&lt;br /&gt;
tutorial are:&lt;br /&gt;
&lt;br /&gt;
y = x ({{maxword|name=uzi}} object &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, leaves the input unchanged)&lt;br /&gt;
&lt;br /&gt;
y = 2*x^2-1 ({{maxword|name=uzi}} object &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;, doubles the frequency)&lt;br /&gt;
&lt;br /&gt;
y = 4*x^3-3*x ({{maxword|name=uzi}} object &amp;lt;code&amp;gt;C&amp;lt;/code&amp;gt;, triples the frequency)&lt;br /&gt;
&lt;br /&gt;
y = 8*x^4-8*x^3+1 ({{maxword|name=uzi}} object &amp;lt;code&amp;gt;D&amp;lt;/code&amp;gt;, quadruples the frequency)&lt;br /&gt;
&lt;br /&gt;
In practice, what they do looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Samplingchapter05a.png|border]]&lt;br /&gt;
''Our four Chebyshev polynomials and their effect on a cosine input''&lt;br /&gt;
&lt;br /&gt;
* Click on the &amp;lt;code&amp;gt;read&amp;lt;/code&amp;gt; messages in patcher area &amp;lt;code&amp;gt;E&amp;lt;/code&amp;gt;. These will&lt;br /&gt;
load 512-sample audio files into our waveshape {{maxword|name=buffer~}}. Notice&lt;br /&gt;
their effect on the sound:&lt;br /&gt;
&lt;br /&gt;
[[Image:Samplingchapter05b.png|border]]&lt;br /&gt;
''Waveshaping through gtr512.aiff and blp512.aiff, respectively.''&lt;br /&gt;
&lt;br /&gt;
* Now that you know a bit more about the expected behavior of the&lt;br /&gt;
waveshaping distortion, return to drawing in the {{maxword|name=waveform~}} object&lt;br /&gt;
to see what kind of results you can achieve.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
The {{maxword|name=lookup~}} object allows you to use a {{maxword|name=buffer~}} as a&lt;br /&gt;
transfer function to perform a process called ''waveshaping''&lt;br /&gt;
on an input sound. Different shapes cause different distortions&lt;br /&gt;
of the spectra and can create very complex timbres. The {{maxword|name=waveform~}}&lt;br /&gt;
object allows you to directly view and modify the contents of an&lt;br /&gt;
MSP {{maxword|name=buffer~}} using your mouse, and the {{maxword|name=peek~}} object&lt;br /&gt;
allows you to set sample values programmatically with Max messages.&lt;br /&gt;
Some transfer functions (such as Chebyshev polynomials) have special&lt;br /&gt;
properties when used as a waveshaping function on a sinusoidal input.&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
&lt;br /&gt;
{{maxword|name=lookup~}} - Transfer function lookup table&lt;br /&gt;
&lt;br /&gt;
{{maxword|name=waveform~}} - buffer~ viewer and editor&lt;br /&gt;
&lt;br /&gt;
{{maxword|name=peek~}} - Read and write sample values&lt;br /&gt;
&lt;br /&gt;
{{maxword|name=sampstoms}} - Convert time from samples to milliseconds&lt;br /&gt;
	&lt;br /&gt;
[[Category:Teaching Material]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>