<?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>crx091081gb.net</title>
	<atom:link href="http://crx091081gb.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://crx091081gb.net</link>
	<description>Robin Price&#039;s Digital Portfolio and Blog</description>
	<lastBuildDate>Tue, 01 Mar 2011 01:30:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Euclidean sequencer max4live version now here!</title>
		<link>http://crx091081gb.net/?p=426</link>
		<comments>http://crx091081gb.net/?p=426#comments</comments>
		<pubDate>Tue, 01 Mar 2011 01:14:45 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[algorithmic music]]></category>
		<category><![CDATA[euclidean]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[max msp]]></category>
		<category><![CDATA[max4live]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=426</guid>
		<description><![CDATA[Alright I got a bit distracted by other things and I forgot that there were people out there who really wanted this thing. What can I say, I get chronic blog fatigue.  I also wanted it to be good and &#8230; <a href="http://crx091081gb.net/?p=426">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />Alright I got a bit distracted by other things and I forgot that there were people out there who really wanted this thing. What can I say, I get chronic blog fatigue.  I also wanted it to be good and to have preset recall and interpolation so I stalled on the initial release, then the comments mounted up on the teaser post&#8230;</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 565px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2011/02/euclidm4l-2.jpg"><img class="size-full wp-image-427  " title="Euclidean M4L version" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2011/02/euclidm4l-2.jpg" alt="screenshot of max4live version of the euclidean sequencer" width="555" height="136" /></a><p class="wp-caption-text">Euclidean Sequencer M4L</p></div>
<p>But it&#8217;s here now! Installation is a breeze, simply download the file (see the bottom of the post), unzip and copy the &#8220;Euclidean Sequencer&#8221; folder to &lt;your live library&gt;\Presets\MIDI Effects\Max MIDI Effect\&#8221;. The sequencer will then appear the next time you load live in the &#8220;MIDI Effects\Max Midi Effect&#8221; part of Live&#8217;s browser.</p>
<p>A note about presets, presets are <strong>not stored with the live patch</strong> but are stored seperately as max pattr .json files when you click the write button, you can get them back using the read button. When you program a rhythm you like you can store it by selecting a note number and pressing store. Notice that the presets are referred to not by a number but by a note, this is because of how the presets are recalled using MIDI notes.</p>
<p>You can also interpolate between rhythm presets to generate odd material! To start with  manually select two presets to interpolate between by clicking on the note boxes labelled A and B and interpolate between them using the slider (you have to have first stored something in these preset slots for interpolation to occur).  Once you&#8217;ve programmed some material to work with you can go ahead and  sequence and automate the interpolation using MIDI clips or live MIDI input as follows. Playing or sequencing a note with a velocity above 64 causes a rhythm stored with that note to be recalled in box A. If the interpolation slider is set fully left then it will simply recall that rhythm. Playing or sequencing a note with a velocity below 64 causes a pattern stored with that note name to be recalled in box B. Again if the slider is set fully right it will simply recall that pattern. The interpolation slider itself can be controlled by MIDI CC 3.<br />
<strong><br />
REMEMBER PRESETS ARE NOT SAVED WITH LIVE SETS! YOU HAVE TO SAVE THEM SEPARATELY USING THE READ AND WRITE BUTTONS! YOU HAVE BEEN WARNED!</strong></p>
<p style="text-align: center;"><a title="EuclideanSequencer.zip" href="http://registeringdomainnamesismorefunthandoingrealwork.com/EuclideanSequencer.zip">DOWNLOAD EUCLIDEAN SEQUENCER M4L</a> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=Y6556EBA96JQQ&amp;lc=GB&amp;item_name=Evil%20Corp&amp;item_number=Euclidean%20M4L&amp;currency_code=GBP&amp;bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="" /></a></p>
<p>If you like this sequencer then please consider donating me £2 GBP which after PayPal fees will give me roughly the £1.70 a pint of foaming nut brown ale costs in my local Wetherspoons. You don&#8217;t have to, but not doing so means you are well stingy plus since my uni funding ran out I&#8217;m completely brassic.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=426</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Handheld music remote controllers</title>
		<link>http://crx091081gb.net/?p=421</link>
		<comments>http://crx091081gb.net/?p=421#comments</comments>
		<pubDate>Wed, 10 Nov 2010 17:39:29 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[ableton live]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[max for live]]></category>
		<category><![CDATA[XBee]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=421</guid>
		<description><![CDATA[I&#8217;ve been working on a set of remote controllers that can be given out at a gig to create audience participation in electronic music. After a year of designing, re-designing, soldering and programming they&#8217;re nearly ready. Here&#8217;s a video of &#8230; <a href="http://crx091081gb.net/?p=421">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />I&#8217;ve been working on a set of remote controllers that can be given out at a gig to create audience participation in electronic music. After a year of designing, re-designing, soldering and programming they&#8217;re nearly ready. Here&#8217;s a video of the first application I&#8217;ve programmed for them, a simple clip controller for Ableton Live.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" 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://www.youtube.com/v/0p_1HUDzjXU?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/0p_1HUDzjXU?fs=1&amp;hl=en_US" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p>The LEDS light up red for stopped clips, yellow for cued and green for playing and the rotary encoder moves a blinking cursor around while depressing the knob triggers or stops a clip playing. The remotes communicate wirelessly via XBee transceivers using a custom external for XBee that I hope to release as soon as I&#8217;ve created a help patch describing its features.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=421</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Euclidean sequencer &#8211; Max for Live version</title>
		<link>http://crx091081gb.net/?p=389</link>
		<comments>http://crx091081gb.net/?p=389#comments</comments>
		<pubDate>Fri, 26 Mar 2010 05:02:50 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ableton live]]></category>
		<category><![CDATA[algorithmic music]]></category>
		<category><![CDATA[max for live]]></category>
		<category><![CDATA[max msp]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=389</guid>
		<description><![CDATA[Some people have expressed an interest in my Euclidean sequencer patch getting ported to max for live. Ummm, it&#8217;s like nearly there. Any minute now, look&#8230; I&#8217;ve been playing with this little baby for a week now, the algorithmic sequencer &#8230; <a href="http://crx091081gb.net/?p=389">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />Some people have expressed an interest in my Euclidean sequencer patch getting ported to max for live. Ummm, it&#8217;s like nearly there. Any minute now, look&#8230;</p>
<div id="attachment_390" class="wp-caption aligncenter" style="width: 567px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2010/03/euclidm4l.jpg"><img class="size-full wp-image-390 " title="euclidm4l" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2010/03/euclidm4l.jpg" alt="Image of euclidean sequencer running in live" width="557" height="139" /></a><p class="wp-caption-text">Euclidean sequencer ported to max 4 live.</p></div>
<p>I&#8217;ve been playing with this little baby for a week now, the algorithmic sequencer works nice. Programming wise I&#8217;ve been getting bogged down in preset management but after having decided to ditch live&#8217;s presets and just stick with max&#8217;s xml files it&#8217;s nearly there. I wish the live number boxes had settable max and minimum parameters but they don&#8217;t.</p>
<p>This is my first patch in max for live and the new purchase is nice and everything but I can see it just being another barrier between me and music making. That and the fact the sparse documentation just confuses me leaves me grumpy. Ho hum.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=389</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>MPEG7 Encoder for MaxMSP alpha release now here !</title>
		<link>http://crx091081gb.net/?p=246</link>
		<comments>http://crx091081gb.net/?p=246#comments</comments>
		<pubDate>Fri, 26 Jun 2009 14:01:23 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Other stuff]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[max msp]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[MPEG7]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=246</guid>
		<description><![CDATA[A third of what drove my tv installation piece was the audio analysis software that allowed me to segment, analyse and database the sound track of youtube movies. These had been stripped from the downloads and saved as wavs. At &#8230; <a href="http://crx091081gb.net/?p=246">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />A third of what drove my tv installation piece was the audio analysis software that allowed me to segment, analyse and database the sound track of youtube movies. These had been stripped from the downloads and saved as wavs. At first I wrote a simple slicer and segmenter in <a title="VASP" href="http://puredata.info/Members/thomas/vasp" target="_self">VASP</a> that allowed me to get basic amplitude spectral data for entry into a database. But this was hacky, the output data wasn&#8217;t standardised making it useless to use with other patches and crashy (it would analyse solidly for ten minutes then crash Max in annoying fashion). So I came back to an <a title="MPEG7 Java Library" href="http://mpeg7audioenc.sourceforge.net/" target="_self">MPEG7 audio encoder written under LGPL in Java</a>.</p>
<p>I&#8217;d looked at Holger Crysandt&#8217;s library early on in my PhD when I was playtesting ways of getting good audio metadata but ended up sticking with <a title="analyzer~" href="http://web.media.mit.edu/~tristan/maxmsp.html" target="_self">Tristian Jehan&#8217;s analyzer~</a> external. This works great with with signals in real time but if you want to analyze say ten minutes of sound then it takes the ten minutes to play it through analyzer~ and log the details. My desire for faster than realtime, offline analysis, was largely what drove me to write a wrapper in max Java around Holger&#8217;s library.</p>
<div id="attachment_263" class="wp-caption aligncenter" style="width: 508px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/mpeg7encoder.jpg"><img class="size-medium wp-image-263" title="mpeg7encoder" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/mpeg7encoder-300x158.jpg" alt="Alpha release is here !" width="498" height="261" /></a><p class="wp-caption-text">Alpha release is here !</p></div>
<p>The alpha release is now finished and I&#8217;m posting a jar file <span style="text-decoration: line-through;">for windows</span>. UPDATED:  NOW MAC COMPATIBLE.</p>
<p>This alpha release includes an example application patch showing off the slicing abilities and a reference text file to talk you through the numerous attributes of the external (though this is a work in progress, you will need to refer to <a title="Holger's User manual" href="http://mpeg7audioenc.sourceforge.net/user.html" target="_self">Holger&#8217;s website</a> and the <a title="MPEG7 Audio Overview" href="http://www.chiariglione.org/mpeg/standards/mpeg-7/mpeg-7.htm#E11E8" target="_self">MPEG7 audio standard</a> for lots of useful details).</p>
<div id="attachment_262" class="wp-caption aligncenter" style="width: 584px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/frecycle.jpg"><img class="size-full wp-image-262" title="frecycle" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/frecycle.jpg" alt="frecycle is a recycle clone entirely in max msp" width="574" height="487" /></a><p class="wp-caption-text">frecycle is a recycle clone entirely in max msp</p></div>
<p>The frecycle patch is modelled on Propellerhead&#8217;s beat mash up defining <a title="Recycle" href="http://www.propellerheads.se/products/recycle/" target="_self">Recycle</a>. Simpy load a mono audio wav and drag the slice threshold bar to the right to increase the number of slices. These are automatically mapped to midi keyboard keys starting at midi note number 36. The pitch bender gives +/- 50% pitch range and the funky autosequence gives good results with one or two bar drum loops with the slice threshold moderately low. Enjoy!</p>
<p>To install the alpha release simply download the zip and follow the installation instructions in INSTALL.txt.</p>
<p>DL: <a title="mp7 max alpha release" href="http://www.registeringdomainnamesismorefunthandoingrealwork.com/Mpeg7Encoder-alpha-distro-mac-compatible.zip">Mpeg7Encoder-alpha-distro-mac-compatible.zip</a></p>
<p>The technically enclined may enjoy the source code at the <a title="Mpeg7Encoder Sourceforge page" href="http://sourceforge.net/projects/mp7encmax/" target="_self">project&#8217;s Sourceforge page</a>.</p>
<p>Hopefully next week I&#8217;ll follow up with my meta sampler patch that allows you to use the SQL database to auto map sounds according to their spectral features.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=246</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>5 reasons why you need analysed segmented audio</title>
		<link>http://crx091081gb.net/?p=249</link>
		<comments>http://crx091081gb.net/?p=249#comments</comments>
		<pubDate>Mon, 08 Jun 2009 22:28:17 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[beats]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[max msp]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[MPEG7]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=249</guid>
		<description><![CDATA[I checked my google analytics page today and found my bounce rate was over 80%. After having taken the time to find out what that meant I read google&#8217;s (not at all evil) guide to writing web headlines. Hence the &#8230; <a href="http://crx091081gb.net/?p=249">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />I checked my google analytics page today and found my <a title="What the hell is a bounce rate" href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en-uk&amp;answer=81986" target="_self">bounce rate</a> was over 80%. After having taken the time to find out what that meant I read google&#8217;s (not at all evil) <a title="Five Tips for becoming a corporate whore" href="http://www.google.com/support/conversionuniversity/bin/answer.py?answer=77157&amp;hl=en" target="_self">guide to writing web headlines</a>. Hence the title.</p>
<p>I&#8217;ve spent the past fortnight polishing up an external I wrote to analyse, segment and store information on sounds in MaxMSP, there are a couple of other objects that do similar stuff like <a title="analyzer~" href="http://web.media.mit.edu/~tristan/maxmsp.html" target="_self">Jehan&#8217;s analyzer~</a> or the <a title="slice~" href="http://www.maxobjects.com/index.php?v=objects&amp;id_objet=3494&amp;requested=slice&amp;operateur=AND&amp;id_plateforme=0&amp;id_format=0" target="_self">mac only and now defunct slice~</a> but I wanted something that could work offline, automated and in a database friendly fashion. The version I came up with to achieve this uses a fairly thick wrapper, written in mxj, around <a title="Java MPEG7 library" href="http://mpeg7audioenc.sourceforge.net/index.html" target="_self">Holger Crysandt&#8217;s java MPEG7 encoder</a>.So what are the five reasons why this might be any use to you?</p>
<ol>
<li>How often do you find yourself wishing you had a simple beat slicer like that of recycle, kontakt or live in max that didn&#8217;t need a load of patching on your part but could just be dropped in to work with files or audio? I work with libraries of breakbeats in my music making and spend a lot of time slicing, plus for generative art pieces as I am wont to create, segmenting audio is often the first step in reappraising and changing existing works into new ones.</li>
<li>Wouldn&#8217;t it be nice if when the slicing was finished rather than grouping kicks, snares, hats and other percussion by hand you could let the computer do it for you? A slicer that has inbuilt audio analysis is the first step for doing this.</li>
<li>When you&#8217;re working on a beat and you want to try similar sounds wouldn&#8217;t it be nice if the computer could suggest similar sounds from a set you&#8217;ve specified? Analysed audio with good metadata can make this possible.</li>
<li>Isn&#8217;t life too short to spend an age cutting and labelling every beat before deciding if they even work in a track? By using automated tools for cutting up audio you could test many sounds, find surprising new relationships before saving the segments for use in whatever package you fancy.</li>
<li>Segmented, meta-data heavy audio file formats such as MPEG7 open up some interesting new possibilities for generative and interactive audio as well as regular music applications, why not get ahead on an emerging standard by spending a few hours knobbing about with it in everyone&#8217;s favourite graphical patching language?</li>
</ol>
<p>That&#8217;s it, those were my five reasons, and if you don&#8217;t click on the below photo for a closer look at my <a title="MPEG7 Audio Overview" href="http://www.chiariglione.org/mpeg/standards/mpeg-7/mpeg-7.htm#E11E8" target="_self">MPEG7</a> external development then my bounce rate will only increase. Expect a buggy beta this week.</p>
<div id="attachment_251" class="wp-caption aligncenter" style="width: 577px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/mpeg7development.jpg"><img class="size-full wp-image-251" title="mpeg7development_small" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/mpeg7development_small.jpg" alt="Screenshot of MPEG7 encoder and database externals for MaxMSP, writing helpfiles and proper documentation are some of the least fun things I do" width="567" height="393" /></a><p class="wp-caption-text">Screenshot of MPEG7 encoder and database externals for MaxMSP, writing helpfiles and proper documentation are some of the least fun things I do.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=249</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Euclidean beat generator redux</title>
		<link>http://crx091081gb.net/?p=236</link>
		<comments>http://crx091081gb.net/?p=236#comments</comments>
		<pubDate>Mon, 08 Jun 2009 12:09:05 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[algorithmic music]]></category>
		<category><![CDATA[beats]]></category>
		<category><![CDATA[euclidean]]></category>
		<category><![CDATA[max msp]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=236</guid>
		<description><![CDATA[After developing my euclidean beat generator for use in my Journey through a burning brain exhibit and reading some of the feedback from other users, I have developed some new features. This version is fully pattrstorage compatible allowing interpolation between &#8230; <a href="http://crx091081gb.net/?p=236">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />After developing my euclidean beat generator for use in my <a title="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=210" href="http://" target="_self">Journey through a burning brain</a> exhibit and reading some of the feedback from other users, I have developed some new features. This version is fully pattrstorage compatible allowing interpolation between beat presets. This came out of a conversation I had with a user I met on the max forums who had put the patch to use with his own genetic algorithms using brain waves as a fitness test. I was pretty impressed with what he&#8217;d done and was delighted to see a photo of his patch on David Zicarelli&#8217;s <a title="Look back at expo '74" href="http://www.cycling74.com/story/2009/4/29/212749/470" target="_self">look back at expo &#8217;74</a>.</p>
<div id="attachment_237" class="wp-caption aligncenter" style="width: 510px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/bannoneeggeneticeuclid.jpg"><img class="size-full wp-image-237" title="EEG Genetic Euclidean screenshot" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/bannoneeggeneticeuclid.jpg" alt="Expo '74 Attendee patch running EEG (brainwave) controlled genetic algorithms for better euclidean beats. Photo by attendee John Manoogian III." width="500" height="375" /></a><p class="wp-caption-text">Expo &#39;74 Attendee patch running EEG (brainwave) controlled genetic algorithms for better euclidean beats. Photo by attendee John Manoogian III.</p></div>
<p>Future versions will include less buggy gui recall and the ability to specify simple strings to the js object that program the sequences.</p>
<div id="attachment_240" class="wp-caption aligncenter" style="width: 507px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/euclid101.jpg"><img class="size-full wp-image-240" title="euclid101" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/06/euclid101.jpg" alt="Euclidean beat generator 1.01, now with added preset interpolation, discover the grooves between the grooves" width="497" height="476" /></a><p class="wp-caption-text">Euclidean beat generator 1.01, now with added preset interpolation, discover the grooves between the grooves</p></div>
<p>Euclid Max Source Patches: <a title="EUCLID.zip" href="http://www.registeringdomainnamesismorefunthandoingrealwork.com/EUCLID.zip" target="_blank">EUCLID.zip</a></p>
<p>Euclid Standalone: <a title="euclid_standalone.zip" href="http://www.registeringdomainnamesismorefunthandoingrealwork.com/euclid_standalone.zip" target="_blank">euclid_standalone.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=236</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Journey through a burning brain</title>
		<link>http://crx091081gb.net/?p=210</link>
		<comments>http://crx091081gb.net/?p=210#comments</comments>
		<pubDate>Tue, 26 May 2009 13:37:09 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Other stuff]]></category>
		<category><![CDATA[2009 symposium]]></category>
		<category><![CDATA[algorithmic music]]></category>
		<category><![CDATA[jitter]]></category>
		<category><![CDATA[JTABB]]></category>
		<category><![CDATA[SARC]]></category>
		<category><![CDATA[tv installation]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=210</guid>
		<description><![CDATA[Last Saturday as part of the 2009 Symposium on user generated content, interaction and design I had the opportunity to road test my installation piece &#8216;Journey through a burning brain&#8217; which until I was forced to choose a title for &#8230; <a href="http://crx091081gb.net/?p=210">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" />Last Saturday as part of the <a title="2009 Symposium" href="http://twothousand.wordpress.com/" target="_self">2009 Symposium</a> on user generated content, interaction and design I had the opportunity to road test my installation piece &#8216;Journey through a burning brain&#8217; which until I was forced to choose a title for the printed materials was previously known as my &#8216;youtube TV installation&#8217;.</p>

<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0683.jpg" title="" class="shutterset_singlepic52" >
	<img class="ngg-singlepic" src="http://crx091081gb.net/wp-content/gallery/cache/52__x_IMG_0683.jpg" alt="IMG_0683.jpg" title="IMG_0683.jpg" />
</a>

<p>Similar to my previous <a title="Fix 07" href="http://fixcatalyst.wordpress.com/2007/11/27/interactive-beat-machine-that-yearns-for-the-human-touch/" target="_self">radio piece</a> I chose an old piece of hardware to form the interface which I could then go about subverting. This time a 1970&#8242;s Hitachi TV that I found languishing under the stairs when I moved into my flat was put into service along with a gigantic space age TV remote that I found in Maplins. On reflection the space age remote might go next time around as it sort of breaks with the conceit of interacting with an aged decrepit telly.</p>
<p>The central idea behind the piece was to use the content of youtube to provide a navigable database of content which could be reinterpreted through algorithmic cut ups. Again as with my radio piece it&#8217;s about the idea of browsing, channel hopping, surfing, constantly hunting through media for the next thing that will satiate us for a moment.</p>
<p><object width="425" height="344" data="http://www.youtube.com/v/QCCeDS_gs-A&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/QCCeDS_gs-A&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /></object></p>
<p>Technically the installation consisted of three laptops running MaxMSP/Jitter, my IR ardiuno box, the telly and remote.  The first laptop took care of downloading, transcoding and analysing videos from youtube, the second receiving and interpreting the user&#8217;s clicks and re-sequencing and playing the audio while the third played the videos through my Rutt Etra jitter synth and visualized the youtube database.</p>
<p>It was well recieved at the symposium but I feel that the remote control button&#8217;s mapping to the indivual features of the piece needs a little work before I find a gallery where it can sit for a week. I&#8217;m now hoping to move the piece online and use google&#8217;s <a title="Youtube API" href="http://code.google.com/apis/youtube/overview.html" target="_self">youtube API</a> to automatically repost my algorithmic video mashups and then incorporate video rating/play counts as a fitness test for genetic algorithms controlling the sequencing and sample selection.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-2-210">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://crx091081gb.net/?p=210&amp;show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://crx091081gb.net/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=2&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-58" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0704.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0704.jpg" alt="IMG_0704.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0704.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-57" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0699.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0699.jpg" alt="IMG_0699.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0699.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-56" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0697.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0697.jpg" alt="IMG_0697.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0697.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-55" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0693.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0693.jpg" alt="IMG_0693.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0693.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-54" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0685.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0685.jpg" alt="IMG_0685.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0685.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-52" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0683.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0683.jpg" alt="IMG_0683.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0683.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-51" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0681.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0681.jpg" alt="IMG_0681.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0681.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-50" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0680.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0680.jpg" alt="IMG_0680.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0680.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-49" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0676.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0676.jpg" alt="IMG_0676.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0676.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-48" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/IMG_0671.jpg" title=" " class="shutterset_set_2" >
								<img title="IMG_0671.jpg" alt="IMG_0671.jpg" src="http://crx091081gb.net/wp-content/gallery/jtabb-2009-symposium/thumbs/thumbs_IMG_0671.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=210</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Euclidean algorithmic beat generator</title>
		<link>http://crx091081gb.net/?p=189</link>
		<comments>http://crx091081gb.net/?p=189#comments</comments>
		<pubDate>Sat, 04 Apr 2009 00:54:15 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[algorithmic music]]></category>
		<category><![CDATA[beats]]></category>
		<category><![CDATA[euclidean]]></category>
		<category><![CDATA[max msp]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=189</guid>
		<description><![CDATA[After stumbling upon an interesting thread on the max forums, reading Godfried Toussaint&#8217;s interesting paper on the subject and checking out some other similar creations across the internets, including a vst, ruby and lisp implementation I decided this sounded interesting &#8230; <a href="http://crx091081gb.net/?p=189">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" /><div id="attachment_193" class="wp-caption aligncenter" style="width: 417px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/04/euclid.jpg"><img class="size-full wp-image-193 " title="euclid" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/04/euclid.jpg" alt="euclid" width="407" height="330" /></a><p class="wp-caption-text">Euclidean rhythm generator with minimalist sequence visualizer</p></div></p>
<p style="text-align: justify;">After stumbling upon an interesting thread on the <a href="http://www.cycling74.com/forums/index.php?t=msg&amp;rid=4892&amp;S=58439fb8b1d645aee7d291dd9cd0038e&amp;th=36588&amp;goto=157591#msg_157591">max forums</a>, reading <a href="http://www-cgrl.cs.mcgill.ca/~godfried/publications/banff.pdf">Godfried Toussaint&#8217;s interesting paper</a> on the subject and checking out some other similar creations across the internets, including a <a href="http://d.hatena.ne.jp/VSTLINK/20081126/1227672029" target="_self">vst</a>, <a href="http://blog.noizeramp.com/2008/10/26/rhythm-generation-with-an-euclidian-algorithm/" target="_self">ruby</a> and <a href="http://ruinwesen.com/blog?id=216" target="_self">lisp</a> implementation I decided this sounded interesting enough to devote some time to and perhaps a good excuse to learn some scripting for Max. I won&#8217;t bother going over how Euclid&#8217;s algorithm works for sequencing beats as it is detailed very well in the <a href="http://www-cgrl.cs.mcgill.ca/~godfried/publications/banff.pdf" target="_self">paper</a> and this <a href="http://ruinwesen.com/blog?id=216" target="_self">blog post</a> by Ruin &amp; Wesen. Instead I&#8217;ll focus on how I made the patch and the things I learnt along the way. For those who just want the patch to play with I&#8217;ll post the links here to save you a whole load of scrolling. I&#8217;ve also built a standalone version for those without Max who want to get in on the whole algorithmic beat generation thing.</p>
<p style="text-align: justify;"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/04/euclid_patches.zip">euclid_patches.zip</a> Max 5 Patcher file and js</p>
<p><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/euclid_standalone.zip">euclid_patches.zip</a> Max 5 standalone</p>
<p style="text-align: justify;">Scripting the creation, connection and destruction of Max objects from inside Max itself is pretty much the last thing in the instruction manual. I think is because of the weight Cycling put into the idea that Max is a graphical programming language for non-programmer types. While I think it&#8217;s great that Max appeals to arty programming phobes I like programming and and I&#8217;m arrogant enough to think I&#8217;m pretty good at it. I also periodically yearn for &#8216;for&#8217; loops and proper conditional logic while patching without resorting to convoluted chains of uzis, gates and less-than objects. I think some people are really good at using Max that way and can mangle a coll into doing their evil bidding through shear patch magic, but I get annoyed after three clicks when I know I could achieve the same task in a single line in a &#8216;proper&#8217; programming language.</p>
<p style="text-align: justify;">As such I&#8217;ve become increasingly enamoured with Max&#8217;s js and mxj objects that allow you to program in javascript and java respectively, as well as Thomas Grill&#8217;s really nice <a href="http://puredata.info/Members/thomas/py" target="_self">py external</a> which allows for python scripting inside Max. For this project I quickly decided on js as I wanted to try out some auto patch generation. As most of the gui objects have their creation scripted I don&#8217;t have to bother monotonously naming each of them and pixel pushing them into alignment. This is js&#8217;s first really nice feature but I quickly learnt that it&#8217;s best if your js checks for the existence of an object before creating one or you have to delete all your objects before you reload your altered js program every time you make a change.</p>
<p style="text-align: justify;">In the rhythm sequencer I wanted boxes for the number of steps, pulses, accents, offset, accent offset and midi note number and I wanted a set of these boxes for each rhythm part. This is what the first part of the code achieves.</p>
<pre><code >//maximum number of parts
var maxparts = 16;

//x and y to start drawing boxes from
var px = 30;
var py = 500;

//inlets and outlets
inlets = 1;
outlets = 1;

//global variables
var p = this.patcher; //saves typing
var numparts;

//Maxobj variables for scripting
var step_boxes = new Array(maxparts);
var s_message = new Array(maxparts);
var pulse_boxes = new Array(maxparts);
var p_message = new Array(maxparts);
var accent_boxes = new Array(maxparts);
var a_message = new Array(maxparts);
var offset_boxes = new Array(maxparts);
var o_message = new Array(maxparts);
var aoffset_boxes = new Array(maxparts);
var ao_message = new Array(maxparts);
var note_boxes = new Array(maxparts);
var n_message = new Array(maxparts);
var seq;
var lcd1;
var lcd2;
var lcd_width = 300;
var lcd_height = 600;

//arrays for holding steps, pulses, accents and offsets and midi note numbers
var steps = new Array(maxparts);
var pulses = new Array(maxparts);
var accents = new Array(maxparts);
var offsets = new Array(maxparts);
var aoffsets = new Array(maxparts);
var outnote = new Array(maxparts);

//array for all the sequences
var riddims = new Array();

//useful number
var deg2rad = 2 * Math.PI / 360

//executed on startup
function loadbang() {
    post("euclidean rhythm generator - robin price 2009\n");
    //do comments
    step_comment = p.getnamed("step_comment");
    if (step_comment == null) {
        step_comment = p.newdefault(px, py + 20, "comment", "@text", "Steps", "@varname", "step_comment", "@presentation", 1);
    }
    pulse_comment = p.getnamed("pulse_comment");
    if (pulse_comment == null) {
        pulse_comment = p.newdefault(px + 60, py + 20, "comment", "@text", "Pulses", "@varname", "pulse_comment", "@presentation", 1);
    }
    accent_comment = p.getnamed("accent_comment");
    if (accent_comment == null) {
        accent_comment = p.newdefault(px + 120, py + 20, "comment", "@text", "Accents", "@varname", "accent_comment", "@presentation", 1);
    }
    offset_comment = p.getnamed("offset_comment");
    if (offset_comment == null) {
        offset_comment = p.newdefault(px + 180, py + 20, "comment", "@text", "Offset", "@varname", "offset_comment", "@presentation", 1);
    }
    aoffset_comment = p.getnamed("aoffset_comment");
    if (aoffset_comment == null) {
        aoffset_comment = p.newdefault(px + 240, py + 20, "comment", "@varname", "aoffset_comment", "@presentation", 1);
        aoffset_comment.message("set", "Accent\nOffset");
    }
    note_comment = p.getnamed("note_comment");
    if (note_comment == null) {
        note_comment = p.newdefault(px + 300, py + 20, "comment", "@varname", "note_comment", "@presentation", 1);
        note_comment.message("set", "Output\nNote");
    }
    //other scripted objects
    seq = p.getnamed("seq");
    if (seq == null) {
        seq = p.newdefault(1000, 1000, "seq~");
        seq.message("sendbox", "varname", "seq");
    }
    lcd1 = p.getnamed("lcd1");
    if (lcd1 == null) {
        lcd1 = p.newdefault(900, 900, "lcd", "@border", 0, "@ignoreclick", 1, "@presentation", 1);
        lcd1.message("varname", "lcd1");
        lcd1.message("size", lcd_width, lcd_height);
    }
    lcd2 = p.getnamed("lcd2");
    if (lcd2 == null) {
        lcd2 = p.newdefault(900, 900, "lcd", "@border", 0, "@ignoreclick", 1, "@bgtransparent", 1, "@presentation", 1);
        lcd2.message("varname", "lcd2");
        lcd2.message("size", lcd_width, lcd_height);
        p.bringtofront(lcd2);
    }
    for (i = 0; i &amp;lt; maxparts; i++) {
        steps[i] = 16;
        pulses[i] = 4;
        accents[i] = 2;
        offsets[i] = 0;
        aoffsets[i] = 0;
        outnote[i] = 60 + i;
        //step boxes and messages
        step_boxes[i] = p.getnamed("step_" + i);
        if (step_boxes[i] == null) {
            step_boxes[i] = p.newdefault(px, py - i*25, "number", "@minimum", 1, "@maximum", 128, "@varname", "step_" + i);
        }
        step_boxes[i].set(steps[i]);
        s_message[i] = p.getnamed("step_message_" + i);
        if (s_message[i] == null) {
            s_message[i] = p.newdefault(px, 100 + py + i*25, "message", "@varname", "step_message_" + i);
        }
        s_message[i].message("set", "step", i, "\$1");
        p.connect(step_boxes[i], 0, s_message[i], 0);
        p.connect(s_message[i], 0, this.box, 0);
        //pulse boxes and messages
        pulse_boxes[i] = p.getnamed("pulse_" + i);
        if (pulse_boxes[i] == null) {
            pulse_boxes[i] = p.newdefault(px + 60, py - i*25, "number", "@minimum", 0, "@varname", "pulse_" + i);
        }
        pulse_boxes[i].set(pulses[i]);
        pulse_boxes[i].message("maximum", steps[i]);
        p_message[i] = p.getnamed("pulse_message_" + i);
        if (p_message[i] == null) {
            p_message[i] = p.newdefault(px + 60, 100 + py + i*25, "message", "@varname", "pulse_message_" + i);
        }
        p_message[i].message("set", "pulse", i, "\$1");
        p.connect(pulse_boxes[i], 0, p_message[i], 0);
        p.connect(p_message[i], 0, this.box, 0);
        //accent boxes and messages
        accent_boxes[i] = p.getnamed("accent_" + i);
        if (accent_boxes[i] == null) {
            accent_boxes[i] = p.newdefault(px + 120, py - i*25, "number", "@minimum", 0, "@varname", "accent_" + i);
        }
        accent_boxes[i].set(accents[i]);
        accent_boxes[i].message("maximum", pulses[i]);
        a_message[i] = p.getnamed("accent_message_" + i);
        if (a_message[i] == null) {
            a_message[i] = p.newdefault(px + 120, 100 + py + i*25, "message", "@varname", "accent_message_" + i);
        }
        a_message[i].message("set", "accent", i, "\$1");
        p.connect(accent_boxes[i], 0, a_message[i], 0);
        p.connect(a_message[i], 0, this.box, 0);
        //offset boxes and messages
        offset_boxes[i] = p.getnamed("offset_" + i);
        if (offset_boxes[i] == null) {
            offset_boxes[i] = p.newdefault(px + 180, py - i*25, "number", "@minimum", 0, "@varname", "offset_" + i);
        }
        offset_boxes[i].set(offsets[i]);
        offset_boxes[i].message("maximum", steps[i] - 1);
        o_message[i] = p.getnamed("offset_message_" + i);
        if (o_message[i] == null) {
            o_message[i] = p.newdefault(px + 180, 100 + py + i*25, "message", "@varname", "offset_message_" + i);
        }
        o_message[i].message("set", "offset", i, "\$1");
        p.connect(offset_boxes[i], 0, o_message[i], 0);
        p.connect(o_message[i], 0, this.box, 0);
        //accent offset boxes and messages
        aoffset_boxes[i] = p.getnamed("accent_offset_" + i);
        if (aoffset_boxes[i] == null) {
            aoffset_boxes[i] = p.newdefault(px + 240, py - i*25, "number", "@minimum", 0, "@varname", "accent_offset_" + i);
        }
        aoffset_boxes[i].set(aoffsets[i]);
        aoffset_boxes[i].message("maximum", pulses[i] - 1);
        ao_message[i] = p.getnamed("accent_offset_message_" + i);
        if (ao_message[i] == null) {
            ao_message[i] = p.newdefault(px + 240, 100 + py + i*25, "message", "@varname", "accent_offset_message_" + i);
        }
        ao_message[i].message("set", "accent_offset", i, "\$1");
        p.connect(aoffset_boxes[i], 0, ao_message[i], 0);
        p.connect(ao_message[i], 0, this.box, 0);
        //note boxes and messages
        note_boxes[i] = p.getnamed("note_" + i);
        if (note_boxes[i] == null) {
            note_boxes[i] = p.newdefault(px + 300, py - i*25, "number", "@minimum", 0, "@maximum", 127, "@format", 4, "@varname", "note_" + i);
        }
        note_boxes[i].set(outnote[i]);
        n_message[i] = p.getnamed("note_message_" + i);
        if (n_message[i] == null) {
            n_message[i] = p.newdefault(px + 300, 100 + py + i*25, "message", "@varname", "note_message_" + i);
        }
        n_message[i].message("set", "note", i, "\$1");
        p.connect(note_boxes[i], 0, n_message[i], 0);
        p.connect(n_message[i], 0, this.box, 0);
    }
    notifyclients();
    calculate(-1);
    parts(1);
    bang();
}</code></pre>
<p style="text-align: justify;"> This seems fairly dense at first but mostly it&#8217;s just doing the same thing over and over again to create all the number boxes along with a message box that allow us to update our variable inside js. I chose this method of creating each number box connected to a personalised message box because js in Max has no native method of reading the contents of a screen object. Hence the workaround, each group of objects, step, pulse boxes or whatever are created connected to a message box which is connected to the js object. The message boxes are formatted so that when the user changes the number in any of the gui boxes a method is called that tells js which box changed and what number it now carries. This allows for a user interface where each of the boxes is updated as the other entries are changed. This lets you add nice features like number boxes that update the other boxes around them so they cannot display nonsensical values, i.e. a rhythm part with more pulses than steps to hold them.</p>
<p style="text-align: justify;">Looking through the code you can see first off I define a <code>maxparts</code> global variable which sets the maximum number of rhythm parts and thus groups of number boxes the script creates. I then create variables to control where the patch starts creating the objects in the patcher window and the number of inlets and outlets on the js box itself. The variable <code>p</code> is just to save typing <code>this.patcher</code> every time I want to do something with the patcher and <code>numparts</code> describes the number of active rhythm parts at the present time. Next I create references to all of the objects I&#8217;ll create and access in the script, for the most part these references are stored in arrays as there are so many of them and doing so allows for thing like iterating across them. Then I create arrays to hold the settings for each rhythm part and an array that will hold all the sequences that have been generated.</p>
<p style="text-align: justify;">The <code>loadbang()</code> is executed when the patch is started just like a loadbang in the patch, this creates the comments, number and message boxes and a few other goodies. Note the form for each object.</p>
<pre><code >step_comment = p.getnamed("step_comment");
if (step_comment == null) {
    step_comment = p.newdefault(px, py + 20, "comment", "@text", "Steps", "@varname", "step_comment", "@presentation", 1);
}</code></pre>
<p>First I try and get a reference to an object in the patch and then I check if that reference is null, if it is it&#8217;s obviously been clobbered or something so I recreate it. This way whenever you reload a js during its development it doesn&#8217;t create multiple copies of the same set of objects.</p>
<p>Next I define a set of functions that will be called by the user changing the values of the number boxes. These allow the script to take care of updating the other boxes and the seq~ object whenever anything changes. Here is the function for the step boxes.</p>
<pre><code >function step(n, val) {
    if (n &amp;gt;= 0 &amp;amp;&amp;amp; n &amp;lt; maxparts &amp;amp;&amp;amp; val &amp;gt;= 0 &amp;amp;&amp;amp; val &amp;lt;= 128) {
        //number of steps must always be greater than or equal to the number of pulses
        if (val &amp;gt;= pulses[n] &amp;amp;&amp;amp; val &amp;gt; offsets[n] &amp;amp;&amp;amp; val &amp;gt;= accents[n]) {
            steps[n] = val;
            pulse_boxes[n].message("maximum", val);
            offset_boxes[n].message("maximum", val - 1);
        } else {
            if (val &amp;lt; pulses[n]) {
                pulses[n] = val;
                pulse_boxes[n].message("set", val);
                pulse_boxes[n].message("maximum", val);
                if (val &amp;lt;= aoffsets[n]) {
                    aoffsets[n] = val;
                    aoffset_boxes[n].message("set", val - 1);
                    aoffset_boxes[n].message("maximum", val - 1);
                }
            }
            if (val &amp;lt;= offsets[n]) {
                offsets[n] = val - 1;
                offset_boxes[n].message("set", val - 1);
                offset_boxes[n].message("maximum", val - 1);
            }
            if (val &amp;lt; accents[n]) {
                accents[n] = val;
                accent_boxes[n].message("set", val);
                accent_boxes[n].message("maximum", val);
            }
            steps[n] = val;
        }
        notifyclients();
        calculate(n);
        programme_seq(n);
        bang();
    } else {
        post("steps message needs two integers between 0 0 and " + maxparts + " 128\n");
    }
}</code></pre>
<p>This function starts by checking the values it&#8217;s been passed (which number box got changed, n, and it&#8217;s new value, val) make sense and then goes on to update the internal representation <code>steps[n]</code> and update the other number boxes in the rhythm part if the new value requires it. Finaly it causes the new rhythm to be calculated, programmes the seq~ and redraws the graphics which I&#8217;ll discuss after touching on the next noteworthy function.</p>
<pre><code >function parts(i) {
    if (arguments.length) { //bail if no arguments
        a = arguments[0];
        if (a &amp;lt; 0) a = 0;
        if (a &amp;gt; maxparts) a = maxparts;
        numparts = a;
        for (z = 0; z &amp;lt; maxparts; z++) {
            if (z &amp;lt; numparts) {
                step_boxes[z].message("presentation", 1);
                pulse_boxes[z].message("presentation", 1);
                accent_boxes[z].message("presentation", 1);
                offset_boxes[z].message("presentation", 1);
                aoffset_boxes[z].message("presentation", 1);
                note_boxes[z].message("presentation", 1);
                programme_seq(z);
            } else {
                step_boxes[z].message("presentation", 0);
                pulse_boxes[z].message("presentation", 0);
                accent_boxes[z].message("presentation", 0);
                offset_boxes[z].message("presentation", 0);
                aoffset_boxes[z].message("presentation", 0);
                note_boxes[z].message("presentation", 0);
                clear_seq(z);
            }
        }
        notifyclients();
        bang();
    } else {
        post("parts message needs integer argument between 0 and " + maxparts + "\n");
    }
}</code></pre>
<p>This nugget of javascript allows us to change the number of currently active rhythm parts and update the visible elements of the patch so we&#8217;re not distracted by anything that isn&#8217;t doing anything.</p>
<p>As for calculating the rhythm this is taken care of by the <code>calculate()</code> function which gets the euclidean sequence for a given number of pulses and steps, the sequence for a number of accents and pulses, applies any rotation to the either sequences (using code I stole from <a href="http://jsfromhell.com/array/rotate">here</a>) and applies the accents to the rhythm. Actually most of the work is done by sub functions <code>eugen()</code> and <code>apply_accents()</code>.</p>
<pre><code >function eugen(s, p) {
    var r = new Array();
    if (p &amp;gt;= s || s == 1 || p == 0) { //test for input for sanity
        if (p &amp;gt;= s) {
            for (i = 0; i &amp;lt; s; i++) { //give trivial rhythm of a pulse on every step
                r.push(1);
            }
        } else if (s == 1) {
            if (p == 1) {
                r.push(1);
            } else {
                r.push(0);
            }
        } else {
            for (i = 0; i &amp;lt; s; i++) {
                r.push(0);
            }
        }
    } else { //sane input
        pauses = s - p;
        if (pauses &amp;gt;= p) { //first case more pauses than p
            per_pulse = Math.floor(pauses / p);
            remainder = pauses % p;
            for (i = 0; i &amp;lt; p; i++) {
                r.push(1);
                for (j = 0; j &amp;lt; per_pulse; j++) {
                    r.push(0);
                }
                if (i &amp;lt; remainder) {
                    r.push(0);
                }
            }
        } else { //second case more p than pauses
            per_pause = Math.floor( (p - pauses) / pauses);
            remainder = (p - pauses) % pauses;
            for (i = 0; i &amp;lt; pauses; i++) {
                r.push(1);
                r.push(0);
                for (j = 0; j &amp;lt; per_pause; j++) {
                    r.push(1);
                }
                if (i &amp;lt; remainder) {
                    r.push(1);
                }
            }
        }
    }
    return r;
}

function apply_accents(r, a) {
    var offset = 0;
    var out = new Array(r.length);
    for (b = 0; b &amp;lt; r.length; b++) {
        if (r[b] == 1) {
            if (a[offset] == 1) {
                out[b] = 1;
            } else {
                out[b] = 0.5;
            }
            offset += 1;
        } else {
            out[b] = 0;
        }
    }
    return out;
}</code></pre>
<p><code>Eugen()</code> is basically the most important part of the whole thing as it implements the algorithm for the distribution of the beats. When the rhythm is programmed the seq~ object in the Max patch is updated by the <code>programme_seq()</code> function. This sends a sequence of messages to the named seq~ object in the patch (no need for patch cables, we can send them direct) that programmes the id number and midi notes into the seq~.</p>
<pre><code >function programme_seq(arg) {
    clear_seq(arg);
    r = riddims[arg];
    for (l = 0; l &amp;lt; steps[arg]; l++) {
        if (r[l] == 1) {
            seq.message("add", 0, l / steps[arg], arg, outnote[arg], 127);
            seq.message("add", 0, l / steps[arg] + (1 / steps[arg] - 1 / 256), arg, outnote[arg], 0);
        } else if (r[l] == 0.5) {
            seq.message("add", 0, l / steps[arg], arg, outnote[arg], 100);
            seq.message("add", 0, l / steps[arg] + (1 / steps[arg] - 1 / 256), arg, outnote[arg], 0);
        }
    }
}

programme_seq.local = 1;

function clear_seq(arg) {
    if (arg == -1) {
        for (h = 0; h &amp;lt; maxparts; h++) {
            seq.message("delete", 0, 0.0, 1.0, h);
        }
    } else {
        seq.message("delete", 0, 0.0, 1.0, arg); //delete all entries for sequence
    }
}

clear_seq.local = 1;</code></pre>
<p>The last part of the js takes care of the ultra minimalistic sequence visualization. At first I tried using Max&#8217;s jsui object but I found it is an exceptional CPU hog so I created two lcd objects one for the sequence and one for the red line showing the playback location. The red line lcd has a transparent background and sits on top of the other sequence visualizer. This way when ever the playback line is redrawn we don&#8217;t have to redraw the rest of the sequence visualization. This is a really good example of using js&#8217;s procedural (as opposed to graphical) logic to send a set of messages to a Max object, this would be tricky (for me at least) to achieve with native Max graphical methods.</p>
<pre><code >function draw() {
    lcd1.message("clear");
    var rowheight = (0.5 * lcd_height) / numparts;
    for (y = numparts - 1; y &amp;gt;= 0; y--) {
        var boxwidth = lcd_width / steps[y];
        var arcwidth = 360 / steps[y];
        var arcradius = (lcd_width/2) * (y + 1) / numparts;
        var r = riddims[y];
        for (x = 0; x &amp;lt; steps[y]; x++) {
            if (r[x] == 1) {
                lcd1.message("frgb", 0, 0, 0);
                lcd1.message("pensize", 1, 1);
                lcd1.message("paintarc", lcd_width/2 - arcradius, lcd_width/2 - arcradius, lcd_width/2 + arcradius, lcd_width/2 + arcradius, x * arcwidth, arcwidth + 2);
                lcd1.message("paintrect", boxwidth*x, lcd_height - rowheight*(y+1), boxwidth*(x+1), lcd_height - rowheight*y);
            } else if (r[x] == 0.5) {
                lcd1.message("frgb", 100, 100, 100);
                lcd1.message("pensize", 1, 1);
                lcd1.message("paintarc", lcd_width/2 - arcradius, lcd_width/2 - arcradius, lcd_width/2 + arcradius, lcd_width/2 + arcradius, x * arcwidth, arcwidth + 2);
                lcd1.message("paintrect", boxwidth*x, lcd_height - rowheight*(y+1), boxwidth*(x+1), lcd_height - rowheight*y);
            } else {
                lcd1.message("frgb", 255, 255, 255);
                lcd1.message("pensize", 1, 1);
                lcd1.message("paintarc", lcd_width/2 - arcradius, lcd_width/2 - arcradius, lcd_width/2 + arcradius, lcd_width/2 + arcradius, x * arcwidth, arcwidth + 2);
            }
        }
    }
    for (y = 0; y &amp;lt; numparts; y++) {
        var boxwidth = lcd_width / steps[y];
        for (x = 0; x &amp;lt; steps[y]; x++) {
            lcd1.message("frgb", 255, 255, 255);
            lcd1.message("linesegment", boxwidth*x, lcd_height - rowheight * y - 1, boxwidth * x, lcd_height - rowheight * (y+1));
        }
    }
}

function settime(time) {
    lcd2.message("clear");
    lcd2.message("frgb", 255, 0, 0);
    lcd2.message("linesegment", ((time + 0.001) * lcd_width) % lcd_width, lcd_height/2, ((time + 0.001) * lcd_width) % lcd_width, lcd_height);
    lcd2.message("linesegment", lcd_width/2, lcd_height/4, lcd_width/2 + (lcd_width/2) * Math.sin(-time*Math.PI*2 - Math.PI), lcd_width/2 + (lcd_width/2) * Math.cos(-time*Math.PI*2 - Math.PI));
}</code></pre>
<p>That pretty much covers most of what my patch is doing, in the future I hope to update it with some interesting swing and shuffle options by sending the phasor~ signal through a table lookup waveshaper and some industrial sounding msp beatbox voices.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=189</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Acieeeeeeeeed Sunrise</title>
		<link>http://crx091081gb.net/?p=185</link>
		<comments>http://crx091081gb.net/?p=185#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:04:41 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[acid]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=185</guid>
		<description><![CDATA[A new track is here, a new dawn rises on the world of acid based music as blah blah blah. My ears are ringing from mixing all weekend so I&#8217;ll cut to the chase, here&#8217;s the track. Acid Sunrise This &#8230; <a href="http://crx091081gb.net/?p=185">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" /><div id="attachment_186" class="wp-caption aligncenter" style="width: 382px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/03/acid_sunrise.png"><img class="size-full wp-image-186" title="acid_sunrise" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/03/acid_sunrise.png" alt="10,000 Hours in MS-Paint" width="372" height="372" /></a><p class="wp-caption-text">10,000 Hours in MS-Paint</p></div></p>
<p>A new track is here, a new dawn rises on the world of acid based music as blah blah blah. My ears are ringing from mixing all weekend so I&#8217;ll cut to the chase, here&#8217;s the track.</p>
<p><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/Acid_Sunrise.mp3">Acid Sunrise</a></p>
<p>This track grew out of little riff that I had programmed in to my x0xb0x when experimenting with ridiculously long slides. Andy and I bopped and grooved for about 3 hours in the studio while recording variations on it, mainly tweaking out shit loads of distortion off Brian Castro&#8217;s excellent <a href="http://www.myspace.com/x0xb0xmod">x0xi0 back panel mod</a>. At the same time I came up with a melody on the Juno which Andy knob twiddled all over, riding the filter like porn stars ride big black cocks. This left us with a shit load of wavs and no real structure, so we gave the whole thing to Pete for a fortnight. Pete started looping tiny sections of the Juno&#8217;s sunshine sound and created the rythmic pad element that is the key to the whole track as well as coming up with some really nice drum patterns. We then got back together and worked out a 6 minute slow burning acid build up that busts out into low pass filtered joy by the end of the track.</p>
<p>I really enjoyed making this but it has come at some cost, I&#8217;m pretty sure my upstairs neighbours hate me. They&#8217;re new to the house and don&#8217;t have the same tolerance for repetitive bass heavy sound at all hours of the day as the previous tennants. As well as the typical foot stomping in protest (maybe praise ??) at my band&#8217;s output at one point all out sound war was declared as the brought a power drill into their room above my studio and tried to out do me. Fuckers.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=185</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://registeringdomainnamesismorefunthandoingrealwork.com/Acid_Sunrise.mp3" length="7328813" type="audio/mpeg" />
		</item>
		<item>
		<title>Rubber Steak Knife Acid</title>
		<link>http://crx091081gb.net/?p=170</link>
		<comments>http://crx091081gb.net/?p=170#comments</comments>
		<pubDate>Sat, 07 Mar 2009 22:48:14 +0000</pubDate>
		<dc:creator>crx</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[ableton live]]></category>
		<category><![CDATA[acid]]></category>

		<guid isPermaLink="false">http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/?p=170</guid>
		<description><![CDATA[Between working frantically on my youtube TV installation I have finished off a track that me and a mate called Andy started one rainy afternoon. Andy&#8217;s pretty awesome at the old techno though he won&#8217;t admit it because he&#8217;s faaaaart &#8230; <a href="http://crx091081gb.net/?p=170">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p id="top" /><div id="attachment_173" class="wp-caption aligncenter" style="width: 466px"><a href="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/03/1182786790_smiley_face.jpg"><img class="size-full wp-image-173" title="1182786790_smiley_face" src="http://registeringdomainnamesismorefunthandoingrealwork.com/blogs/wp-content/uploads/2009/03/1182786790_smiley_face.jpg" alt="ACIEED" width="456" height="485" /></a><p class="wp-caption-text">ACIEEEEEEED</p></div></p>
<p>Between working frantically on my youtube TV installation I have finished off a track that me and a mate called Andy started one rainy afternoon. Andy&#8217;s pretty awesome at the old techno though he won&#8217;t admit it because he&#8217;s faaaaart too nice to be in your face with that kind of stuff. Anyway me and <a href="http://www.sarc.qub.ac.uk/~pbennett/">Pete</a> who together form <a href="http://www.myspace.com/acidcollectiveinternationaldisco">A.C.I.D</a> decided we should let him in the band and this is his first track with us. Andy programmed the bass lines which came off my <a href="http://www.ladyada.net/make/x0xb0x/">x0xb0x</a> and Native Instrument&#8217;s <a href="http://www.native-instruments.com/index.php?id=massive">Massive</a> while I made some simple &#8216;pippy&#8217; drums on my <a href="http://www.vintagesynth.com/misc/xbase09.php">Jomox XBase09</a> which Andy augmented with some 808 samples in Battery. Basically we grooved around my studio for a few hours a fortnight ago in <a href="http://www.ableton.com/">Ableton Live</a> making a big loop which I padded out into 7 minutes of repetitive funk over the last two weeks. I added the lead synth line while Andy was in the studio off a <a href="http://www.vintagesynth.com/roland/juno60.php">Juno 60</a> which coincidentally was Andy&#8217;s till I bought it off him last December for £400. The Juno&#8217;s a lovely synth and there&#8217;s buckets of sounds to explore inside it&#8217;s simple architecture, here I was using all 3 oscillators and keeping the amplitude envelope&#8217;s sustain down low while twiddling the decay and release knobs. When I was fleshing the track out I went for dub delay drenched sound inspired by <a href="http://en.wikipedia.org/wiki/Kruder_&amp;_Dorfmeister">Kruder and Dorfmeister</a> after Pete said that when dry the Juno sounded too trancy. The delay lines, all 3 of them, came from from <a href="http://www.native-instruments.com/index.php?id=reaktor5_us">Reaktor</a>&#8216;s echomania ensemble which is a personal favourite of mine and a one stop dub delay shop. The low tone in the background and the high pads came off my two <a href="http://www.vintagesynth.com/waldorf/pulse.php" target="_self">Waldorf Pulses</a> as did the reversed wooshing sound at 3:50. A heavily filtered <a href="http://www.native-instruments.com/index.php?id=fm8" target="_self">FM8</a> sample made into the first break down and I think that was pretty much it.</p>
<p>Andy and I were both really inspired after listening to <a href="http://www.amazon.co.uk/M-N-D-Y-Controls-Various-Artists/dp/B000I6AGI2">M.A.N.D.Y At The Controls</a> mix album (probably one of the best cd&#8217;s I&#8217;ve bought, definitely in the top 5) and we were going for that kind of minimal tech house kind of style. I don&#8217;t know if the dub delay crowded the mix too much but either way I&#8217;m pleased with the results. Check the track below and let us know what you think.</p>
<p><a href="http://www.registeringdomainnamesismorefunthandoingrealwork.com/Rubber_Steak_Knife_Acid.mp3">Rubber Steak Knife Acid</a></p>
<p>About the name, the bass is kind of rubbery, the beat is sort of meaty and the lead line is sharp, simples.</p>
]]></content:encoded>
			<wfw:commentRss>http://crx091081gb.net/?feed=rss2&#038;p=170</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://www.registeringdomainnamesismorefunthandoingrealwork.com/Rubber_Steak_Knife_Acid.mp3" length="10635729" type="audio/mpeg" />
		</item>
	</channel>
</rss>

