<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Greg Surges &#187; Pure Data</title>
	<atom:link href="http://gregsurges.com/tag/pure-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregsurges.com</link>
	<description>Computer Musician, Programmer, Hardware Hacker</description>
	<lastBuildDate>Mon, 14 May 2012 19:59:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>News &#8211; 4/21/2012</title>
		<link>http://gregsurges.com/programming/pure-data/news-4212012/</link>
		<comments>http://gregsurges.com/programming/pure-data/news-4212012/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 15:40:06 +0000</pubDate>
		<dc:creator>Greg Surges</dc:creator>
				<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[cemec]]></category>
		<category><![CDATA[Live Coding]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[NIME 2012]]></category>
		<category><![CDATA[pucktronix]]></category>

		<guid isPermaLink="false">http://gregsurges.com/?p=1512</guid>
		<description><![CDATA[Some news: My short paper &#8220;DIY Hybrid Analog/Digital Modular Synthesis&#8221; &#8211; which covers the USB-Octomod, tabulaRasa, and snake.corral &#8211;  has been accepted for NIME 2012, and I will present a poster version at the conference. The conference runs from May 21 &#8211; 23, in Ann Arbor, MI. I will perform 4/27 at UCSD and 4/28 [...]]]></description>
			<content:encoded><![CDATA[<p>Some news:</p>
<ul>
<li>My short paper &#8220;DIY Hybrid Analog/Digital Modular Synthesis&#8221; &#8211; which covers the <a title="USB-Octomod" href="http://gregsurges.com/circuitry/usb-octomod/" target="_blank">USB-Octomod</a>, <a title="tabulaRasa – Digital Wavetable Oscillator" href="http://gregsurges.com/circuitry/tabularasa/" target="_blank">tabulaRasa</a>, and <a title="pucktronix.snake.corral" href="http://gregsurges.com/circuitry/pucktronix-snake-corral-2/" target="_blank">snake.corral</a> &#8211;  has been accepted for NIME 2012, and I will present a poster version at the conference. The conference runs from May 21 &#8211; 23, in Ann Arbor, MI.</li>
<li>I will perform 4/27 at UCSD and 4/28 as part of the California Electronic Music Exchange Concert series.</li>
<li>Finally, I&#8217;ve started posting some live coding videos:</li>
</ul>
<p><iframe src="http://www.youtube.com/embed/videoseries?list=PL2FA229D3F6E71922&amp;hl=en_US" frameborder="0" width="640" height="360"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://gregsurges.com/programming/pure-data/news-4212012/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Preset Management in Pure Data</title>
		<link>http://gregsurges.com/programming/preset-management-in-pure-data/</link>
		<comments>http://gregsurges.com/programming/preset-management-in-pure-data/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 21:25:41 +0000</pubDate>
		<dc:creator>Greg Surges</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[preset]]></category>

		<guid isPermaLink="false">http://gregsurges.com/?p=1474</guid>
		<description><![CDATA[I recently spent a few hours putting together a preset manager in Pure Data. The above image shows a set of controls for 8 independent (but identical) signal processing channels. Clearly, 96 parameters is too many to realistically handle in performance, so I needed some way to store and recall settings. As shown in the [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1477" class="wp-caption aligncenter" style="width: 624px"><a href="http://gregsurges.com/wp-content/uploads/2012/03/params.png" rel="lightbox[1474]"><img class=" wp-image-1477 " title="96 Parameters" src="http://gregsurges.com/wp-content/uploads/2012/03/params-1024x711.png" alt="" width="614" height="427" /></a><p class="wp-caption-text">96 Independent Parameters</p></div>
<p>I recently spent a few hours putting together a preset manager in Pure Data. The above image shows a set of controls for 8 independent (but identical) signal processing channels. Clearly, 96 parameters is too many to realistically handle in performance, so I needed some way to store and recall settings. As shown in the image, each parameter has a [receive] object which listens for messages of a specific type. Then, a [route] object filters out all messages except those meant for that specific parameter instance.</p>
<p>Here&#8217;s the object <a href="http://gregsurges.com/wp-content/uploads/2012/03/preset-manager.pd_.zip">preset-manager.pd</a> - though it will take a decent amount of modification to get it to work for another patch.</p>
<div id="attachment_1476" class="wp-caption aligncenter" style="width: 278px"><a href="http://gregsurges.com/wp-content/uploads/2012/03/interface.png" rel="lightbox[1474]"><img class="size-full wp-image-1476" title="interface" src="http://gregsurges.com/wp-content/uploads/2012/03/interface.png" alt="" width="268" height="180" /></a><p class="wp-caption-text">The preset manager interface.</p></div>
<p>Above is the preset manager interface. A particular slot is accessed via the number box, and that slot can be read or written to with a message box.</p>
<div id="attachment_1478" class="wp-caption aligncenter" style="width: 624px"><a href="http://gregsurges.com/wp-content/uploads/2012/03/preset_manager.png" rel="lightbox[1474]"><img class=" wp-image-1478 " title="preset_manager" src="http://gregsurges.com/wp-content/uploads/2012/03/preset_manager-1024x650.png" alt="" width="614" height="390" /></a><p class="wp-caption-text">Innards of the preset manager object.</p></div>
<p>Here are the innards of the preset manager object. The block on the right stores presets, and the block on the left recalls them. Presets are stored as raw text files, named with sequential numbers, and are formatted like this:</p>
<p><code>filter-bypass 1 1 1 1 0 0 0 0;<br />
filter-rate-mod 0.02 0.81 0 50 0 0 0 0;<br />
filter-rate 0.22 0.66 0.95 106 0 0 0 0;<br />
am-bypass 1 1 0 1 0 0 0 0;<br />
am-width 0 0.5 0.52 87 0 0 0 0;<br />
am-rate-mod 16 0.38 0.54 46 0 0 0 0;<br />
am-rate 2.02 1.48 2.54 3.83 0 0 0 0;<br />
fm-bypass 0 0 0 1 0 0 0 0;<br />
fm-rate 173 97 25 1.64 0 0 0 0;<br />
fm-pos/width 55 64 108 96 0 0 0 0;<br />
fm-mode 2 2 2 1 1 0 0 0;<br />
fm-register 1 0 2 2 1 1 1 0;</code></p>
<p>Each parameter type is followed by eight values &#8211; one for each channel. The [textfile] object works really well for reading and writing text files line-by-line.</p>
<div id="attachment_1482" class="wp-caption aligncenter" style="width: 649px"><a href="http://gregsurges.com/wp-content/uploads/2012/03/write_preset.png" rel="lightbox[1474]"><img class=" wp-image-1482   " title="write_preset" src="http://gregsurges.com/wp-content/uploads/2012/03/write_preset.png" alt="" width="639" height="550" /></a><p class="wp-caption-text">Code for writing a preset.</p></div>
<div id="attachment_1479" class="wp-caption aligncenter" style="width: 606px"><a href="http://gregsurges.com/wp-content/uploads/2012/03/read_preset.png" rel="lightbox[1474]"><img class="size-full wp-image-1479  " title="read_preset" src="http://gregsurges.com/wp-content/uploads/2012/03/read_preset.png" alt="" width="596" height="814" /></a><p class="wp-caption-text">Code for reading a preset.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://gregsurges.com/programming/preset-management-in-pure-data/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gates (No. 1)</title>
		<link>http://gregsurges.com/original-music/gates-no-1/</link>
		<comments>http://gregsurges.com/original-music/gates-no-1/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:37:13 +0000</pubDate>
		<dc:creator>Greg Surges</dc:creator>
				<category><![CDATA[Electronic Music]]></category>
		<category><![CDATA[Original Music]]></category>
		<category><![CDATA[Electronic]]></category>
		<category><![CDATA[Feedback]]></category>
		<category><![CDATA[Improvisation]]></category>
		<category><![CDATA[Instrument Building]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[Pure Data]]></category>

		<guid isPermaLink="false">http://gregsurges.com/?p=642</guid>
		<description><![CDATA[I just added this to the page for my piece Gates (No. 1). Gates (No. 1) is a software instrument, programmed in Pure Data. Inspired by other instrument builders, particularly David Tudor&#8217;s electronic instruments, Gates (No. 1) provides the performer with high-level control of musical events, while the moment-to-moment details emerge from the patch itself. [...]]]></description>
			<content:encoded><![CDATA[<p>I just added this to the page for my piece <a href="http://gregsurges.com/compositions/gates-no-1/"><em>Gates (No. 1</em>)</a>.</p>
<p><em>Gates (No. 1) </em>is a software instrument, programmed in <a href="http://www.pure-data.info">Pure Data</a>. Inspired by other instrument builders, particularly David Tudor&#8217;s electronic instruments, <em>Gates (No. 1) </em>provides the performer with high-level control of musical events, while the moment-to-moment details emerge from the patch itself.</p>
<div id="attachment_633" class="wp-caption alignnone" style="width: 297px"><a href="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.02.48-AM.png" rel="lightbox[642]"><img class="size-medium wp-image-633 " title="Gates (No. 1) - Greg Surges: Main Interface" src="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.02.48-AM-287x300.png" alt="The main interface for Gates (No. 1)." width="287" height="300" /></a><p class="wp-caption-text">The main interface for Gates (No. 1).</p></div>
<p>Central to the sound of the instrument is a set of three feedback networks. Implemented using recursive delay lines, each network emphasizes a particular frequency range: low, medium, and high. The frequency ranges are user-selectable, allowing for coarse control over the register of a particular musical event. Slight changes in delay time and filter cutoffs destabilize the feedback, producing glissandi and other effects.</p>
<div id="attachment_634" class="wp-caption alignnone" style="width: 310px"><a href="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.03.11-AM.png" rel="lightbox[642]"><img class="size-medium wp-image-634" title="Feedback network producing low frequency sounds." src="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.03.11-AM-300x230.png" alt="Feedback network producing low frequency sounds." width="300" height="230" /></a><p class="wp-caption-text">Feedback network producing low frequency sounds.</p></div>
<p>The pitch register is selected through a combination of key-presses, which also determines other parameters of the sound. The first of those other parameters is a selection of one of 6 sound-processing algorithms which is applied to the selected feedback network. The 6 processing types are: amplitude modulation by line segments, ring modulation by filtered noise, ring modulation by a sine wave, recursive delay with delay time modulation, a chorus effect, and a set of bandpass filters in series (creating phase cancellations).</p>
<div id="attachment_637" class="wp-caption alignnone" style="width: 310px"><a href="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.04.27-AM.png" rel="lightbox[642]"><img class="size-medium wp-image-637" title="ASCII-based input module." src="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.04.27-AM-300x158.png" alt="ASCII-based input module." width="300" height="158" /></a><p class="wp-caption-text">ASCII-based input module.</p></div>
<div id="attachment_635" class="wp-caption alignnone" style="width: 310px"><a href="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.03.24-AM.png" rel="lightbox[642]"><img class="size-medium wp-image-635" title="Inner workings of the patch." src="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.03.24-AM-300x224.png" alt="Inner workings of the patch. Above are the different processing modules, routed through an echo effect, and out to the DAC." width="300" height="224" /></a><p class="wp-caption-text">Inner workings of the patch. Above are the different processing modules, routed through an echo effect, and out to the DAC.</p></div>
<p>The second parameter is a selection of one of 50 different, hand-drawn wave shapes. The wave shapes provide control data for the modulation sources described above.</p>
<div id="attachment_636" class="wp-caption alignnone" style="width: 310px"><a href="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.04.06-AM.png" rel="lightbox[642]"><img class="size-medium wp-image-636" title="Wave Shapes" src="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.04.06-AM-300x146.png" alt="One set of wave shapes, used to control the sound processing modules." width="300" height="146" /></a><p class="wp-caption-text">One set of wave shapes, used to control the sound processing modules.</p></div>
<p>The key-press combination also determines the duration and number of repeats of a sound, ranging from short, repetitive events to long drones. Finally, the performer can choose to route the output of the instrument through a secondary processing unit, which modifies its processing algorithms according to the rhythmic onsets of the generated sound.</p>
<div id="attachment_639" class="wp-caption alignnone" style="width: 310px"><a href="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.04.50-AM.png" rel="lightbox[642]"><img class="size-medium wp-image-639" title="Secondary effects module." src="http://gregsurges.com/wp-content/uploads/2009/09/Screen-shot-2010-06-28-at-8.04.50-AM-300x198.png" alt="The secondary effects module adds a layer of digital grit, contrasting with the cleaner sounds of the instrument." width="300" height="198" /></a><p class="wp-caption-text">The secondary effects module adds a layer of digital grit, contrasting with the cleaner sounds of the instrument.</p></div>
<p>The variety and diversity of sound generation, processing, and control algorithms ensure that the instrument is never fully under the control of the performer. Rather than a flaw, this is a feature, as it ensures an exciting challenge for the performer, and produces performances which can retain similar characteristics while varying widely in structure and duration.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregsurges.com/original-music/gates-no-1/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Live Coding w/ Chris Burns 12.11.2008 &#8211; Video Now Online</title>
		<link>http://gregsurges.com/uncategorized/live-coding-w-chris-burns-12-11-2008-video-now-online/</link>
		<comments>http://gregsurges.com/uncategorized/live-coding-w-chris-burns-12-11-2008-video-now-online/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 02:26:21 +0000</pubDate>
		<dc:creator>Greg Surges</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Chris Burns]]></category>
		<category><![CDATA[Concert]]></category>
		<category><![CDATA[Improvisation]]></category>
		<category><![CDATA[Live Coding]]></category>
		<category><![CDATA[PD]]></category>
		<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://gregsurges.com/?p=341</guid>
		<description><![CDATA[Just posted a video from a concert I did last year w/ Chris Burns. It&#8217;s live-coding (an improvised performance practice, in which performers program their instruments in concert), using Pure Data. This is the first set, using Vanilla PD. There&#8217;s a second set, using the NRCI networking library &#8211; don&#8217;t know if that one still [...]]]></description>
			<content:encoded><![CDATA[<p>Just posted a video from a concert I did last year w/ Chris Burns. It&#8217;s live-coding (an improvised performance practice, in which performers program their instruments in concert), using Pure Data. This is the first set, using Vanilla PD. There&#8217;s a second set, using the NRCI networking library &#8211; don&#8217;t know if that one still exists&#8230;</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7394523&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=7394523&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/7394523">Christopher Burns and Greg Surges Live Coding &#8211; 12.11.2008</a> from <a href="http://vimeo.com/gregsurges">Greg Surges</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregsurges.com/uncategorized/live-coding-w-chris-burns-12-11-2008-video-now-online/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>A Recent Music Hero</title>
		<link>http://gregsurges.com/original-music/electronic-music/a-recent-music-hero/</link>
		<comments>http://gregsurges.com/original-music/electronic-music/a-recent-music-hero/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 22:18:02 +0000</pubDate>
		<dc:creator>Greg Surges</dc:creator>
				<category><![CDATA[Electronic Music]]></category>
		<category><![CDATA["Solid State"]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Estonia]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[Releases]]></category>

		<guid isPermaLink="false">http://gregsurges.com/?p=321</guid>
		<description><![CDATA[Here&#8217;s a link to an Estonian blog who were nice enough to review my Petcord release Solid State. The Google translation was not so good, but it appears to have earned an 8.2 (out of 10?).]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="http://agier.blogspot.com/2009/10/greg-surges-solid-state-petcord.html">link</a> to an Estonian blog who were nice enough to review my Petcord release <em><a href="http://www.petcord.com/releases/pc0609-02-greg-surges-solid-state/">Solid State</a></em>. The Google translation was not so good, but it appears to have earned an 8.2 (out of 10?).</p>
]]></content:encoded>
			<wfw:commentRss>http://gregsurges.com/original-music/electronic-music/a-recent-music-hero/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Write your own Pure Data External! (Part 4)</title>
		<link>http://gregsurges.com/programming/write-your-own-pure-data-external-part-4/</link>
		<comments>http://gregsurges.com/programming/write-your-own-pure-data-external-part-4/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 16:35:20 +0000</pubDate>
		<dc:creator>Greg Surges</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Pure Data]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://gregsurges.com/?p=317</guid>
		<description><![CDATA[In this section of the tutorial, I&#8217;m going to write about the randomwalk_new() function. As you can see (in the code available here), the function takes three arguments. These are generic arguments, used in the *_new() function of every external you&#8217;ll write. The arguments are as follows: t_symbol *s &#8211; a pointer to the symbolic [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">In this section of the tutorial, I&#8217;m going to write about the <code>randomwalk_new() </code>function.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">As you can see (in the code available <a href="https://pantherfile.uwm.edu:443/gssurges/GregSurges_PD_Tutorial_Files.zip">here</a>), the function takes three arguments. These are generic arguments, used in the <code>*_new()</code> function of every external you&#8217;ll write. The arguments are as follows:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;"><code>t_symbol *s</code> &#8211; a pointer to the symbolic representation of the objects name. You don&#8217;t have to worry about this, it&#8217;s for PD.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;"><code>int argc</code> &#8211; the number of arguments the user has entered, following the name of the object.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;"><code>t_atom *argv</code> &#8211; a pointer to the first of these arguments.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">You&#8217;ll use <code>argc</code> to tell you how many arguments to read, starting from the <code>argv</code> pointer. This allows you to create an object that uses default values if a user doesn&#8217;t enter all of the required arguments.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">In <code>randomwalk.c</code>, I&#8217;m using a <code>switch</code> statement to check the number of arguments provided, and then read the user-provided arguments into their proper variables. The <code>atom_getfloat()</code> function simply takes one of the arguments (of the PD type <code>atom</code>) and returns a C/C++ float, which can be assigned to a variable.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">Below that, I reuse the <code>argc</code> count to determine which variables have to be assigned to defaults. Finally, I do some error checking to make sure that the highbound is actually a higher number than the lowbound, and swap if needed. This kind of error checking is very important to avoid crashes when actually using the object.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">Finally, we have to assign inlets and outlets. The three calls to<code> floatinlet_new()</code> assign inlets which allow direct assignment of the lower, upper, and step variables from PD. There should probably be some error checking here too, because what would happen if a user input a list or a symbol instead? We also define<code> f_out</code> to be an outlet, using <code>outlet_new()</code> which takes two arguments, a reference to the object itself, and the type of value that will be output.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica;">The return statement simply returns the initialized object to PD, ready for use.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregsurges.com/programming/write-your-own-pure-data-external-part-4/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>

