<?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>cassiel</title>
	<atom:link href="http://www.cassiel.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cassiel.com</link>
	<description>music, media, systems, performance, installation</description>
	<lastBuildDate>Tue, 21 Feb 2012 13:06:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fusion Programming: From Python to Clojure and Back</title>
		<link>http://www.cassiel.com/2012/02/19/fusion-programming/</link>
		<comments>http://www.cassiel.com/2012/02/19/fusion-programming/#comments</comments>
		<pubDate>Sun, 19 Feb 2012 20:30:11 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Clojure]]></category>
		<category><![CDATA[Field]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Jython]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=297</guid>
		<description><![CDATA[Recently we&#8217;ve been working on several digital art projects using Field as a development and presentation platform but with Clojure running the core, domain-specific algorithmic code. This choice is, admittedly, partly because Clojure is new and shiny, but we also like the Emacs- and Leiningen-based development environment (complete with continuous integration testing), and Clojure&#8217;s clean&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.cassiel.com/wp-content/uploads/2012/02/clojure-python-2.jpg' alt='clojure-python-2' width="440" height="285" class='alignnone size-medium' /></p>

<p>Recently we&#8217;ve been working on several digital art projects using <a href="http://openendedgroup.com/field/wiki/OverviewBanners2">Field</a> as a development and presentation platform but with <a href="http://clojure.org/">Clojure</a> running the core, domain-specific algorithmic code. This choice is, admittedly, partly because Clojure is new and shiny, but we also like the Emacs- and <a href="https://github.com/technomancy/leiningen">Leiningen</a>-based development environment (complete with <a href="http://jakemccrary.com/blog/2011/12/16/continuous-testing-with-clojure-and-expectations/">continuous integration testing</a>), and Clojure&#8217;s clean functional semantics lends itself to realtime, evolutionary artworks. Since Field works at the level of Python-on-Java (via <a href="http://jython.org/">Jython</a>), and Clojure runs in the JVM, the Python and Clojure worlds inevitably collide.</p>

<p><span id="more-297"></span></p>

<p>Field hosts Clojure directly &#8211; in fact, it hosts several JVM-based languages &#8211; using something called <a href="http://openendedgroup.com/field/wiki/MayaIntegration#Texttransformarea">Text Transforms</a>. Activate the Clojure transform, as in the splash image above, and execution flips from Python to Clojure and back again. The transform passes Python bindings into the Clojure namespace, and bindings made within Clojure are passed out again (within a dedicated variable called <code>_clojure</code>). Both Python and Clojure have access to anything the JVM can see via its classpath. There are one or two wrinkles (such as the hack, shown above, of making sure a variable is retrieved from the Python world before its first use in the Clojure world, since Field&#8217;s dynamic lookup machinery only works for Python), but everything pretty much just works.</p>

<p>If we&#8217;re developing in two languages at once, we need to be able to pass information between them, not least configuration information from Python into Clojure. In Python, we organise our manifest constants without polluting the top-level namespace by declaring things like this:</p>

<div class="no-hang" style="width:440px;"><div id="gist-1831280" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="n">m_Configuration</span> <span class="o">=</span> <span class="n">Manifest</span><span class="p">(</span></div><div class='line' id='LC2'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">FULL_CANVAS</span> <span class="o">=</span> <span class="bp">False</span><span class="p">,</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">DO_VORONOI</span> <span class="o">=</span> <span class="bp">True</span><span class="p">,</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">TREE_DEPTH</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">FIELD_TIMER_INTERVAL</span> <span class="o">=</span> <span class="mf">0.033</span><span class="p">,</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">ASSETS_DIR</span> <span class="o">=</span> <span class="s">&quot;/Users/nick/CASSIEL/FIELDWORKSPACE/&quot;</span></div><div class='line' id='LC7'><span class="p">)</span></div><div class='line' id='LC8'><br/></div><div class='line' id='LC9'><span class="n">m_Nested</span> <span class="o">=</span> <span class="n">Manifest</span><span class="p">(</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">A</span> <span class="o">=</span> <span class="n">Manifest</span><span class="p">(</span><span class="n">B</span> <span class="o">=</span> <span class="mi">6</span><span class="p">,</span> <span class="n">C</span> <span class="o">=</span> <span class="s">&quot;Hello&quot;</span><span class="p">),</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">D</span> <span class="o">=</span> <span class="n">Manifest</span><span class="p">(</span><span class="n">E</span> <span class="o">=</span> <span class="bp">False</span><span class="p">),</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">L</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="n">Manifest</span><span class="p">(</span><span class="n">Z</span> <span class="o">=</span> <span class="mi">14</span><span class="p">)],</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">L_L</span> <span class="o">=</span> <span class="p">[[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">],</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="p">[</span><span class="mi">5</span><span class="p">]],</span> <span class="mi">6</span><span class="p">,</span> <span class="p">[]],</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">N</span> <span class="o">=</span> <span class="bp">None</span></div><div class='line' id='LC15'><span class="p">)</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1831280/3da41bc7d21c072afb59d24b68ead95062b75fbe/gistfile1.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1831280#file_gistfile1.py" style="float:right;margin-right:10px;color:#666">gistfile1.py</a>
            <a href="https://gist.github.com/1831280">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</div>

<p>This lets us use names like <code>m_Configuration.TREE_DEPTH</code> (value <code>5</code>) or (if we use our rather implausible test declaration) <code>m_Nested.A.C</code> (<code>"Hello"</code>). The Python for <code>Manifest</code> is pretty simple:</p>

<div class="no-hang" style="width:440px;"><div id="gist-1863409" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="k">class</span> <span class="nc">Manifest</span><span class="p">:</span></div><div class='line' id='LC2'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">kw</span><span class="p">:</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">kw</span><span class="p">[</span><span class="n">k</span><span class="p">])</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1863409/5fa0c9212543bd74b08cf5859a2c70e146f76689/gistfile1.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1863409#file_gistfile1.py" style="float:right;margin-right:10px;color:#666">gistfile1.py</a>
            <a href="https://gist.github.com/1863409">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</div>

<p>So what of the Clojure world? Passing a <code>Manifest</code> into Clojure exposes an object constructed from numerous Jython components, whereas what we really want is Clojure hash maps with keywords, so that we can write things like <code>(:TREE_DEPTH m_Configuration)</code> or <code>(:C (:A m_Nested))</code>. So, here&#8217;s an implementation of something we call <code>hashify</code>:</p>

<div class="hang-2-column" style="width:620px;"><div id="gist-1863525" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="p">(</span><span class="nf">ns</span><span class="w"> </span><span class="nv">oncotrees.util</span><span class="w"></span></div><div class='line' id='LC2'><span class="w">  </span><span class="p">(</span><span class="no">:import</span><span class="w"> </span><span class="p">[</span><span class="nv">org.python.core</span><span class="w"> </span><span class="nv">PyFloat</span><span class="w"> </span><span class="nv">PyInteger</span><span class="w"> </span><span class="nv">PyBoolean</span><span class="w"> </span><span class="nv">PyString</span><span class="w"></span></div><div class='line' id='LC3'><span class="w">            </span><span class="nv">PyList</span><span class="w"> </span><span class="nv">PyInstance</span><span class="w"> </span><span class="nv">PyNone</span><span class="p">]</span><span class="w"></span></div><div class='line' id='LC4'><span class="w">           </span><span class="p">[</span><span class="nv">java.util</span><span class="w"> </span><span class="nv">NoSuchElementException</span><span class="p">]))</span><span class="w"></span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="p">(</span><span class="nf">defn</span><span class="w"> </span><span class="nv">hashify</span><span class="w"> </span><span class="p">[</span><span class="nv">py-object</span><span class="p">]</span><span class="w"></span></div><div class='line' id='LC7'><span class="w">  </span><span class="p">(</span><span class="nf">cond</span><span class="w"> </span><span class="p">(</span><span class="nf">instance?</span><span class="w"> </span><span class="nv">PyNone</span><span class="w"> </span><span class="nv">py-object</span><span class="p">)</span><span class="w"> </span><span class="nv">nil</span><span class="w"></span></div><div class='line' id='LC8'><span class="w">        </span><span class="p">(</span><span class="nf">instance?</span><span class="w"> </span><span class="nv">PyInstance</span><span class="w"> </span><span class="nv">py-object</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC9'><span class="w">        </span><span class="p">(</span><span class="nf">letfn</span><span class="w"> </span><span class="p">[(</span><span class="nf">retr</span><span class="w"> </span><span class="p">[</span><span class="nv">key</span><span class="p">]</span><span class="w"> </span><span class="p">(</span><span class="nf">.__getitem__</span><span class="w"> </span><span class="p">(</span><span class="nf">.__dict__</span><span class="w"> </span><span class="nv">py-object</span><span class="p">)</span><span class="w"> </span><span class="nv">key</span><span class="p">))</span><span class="w"></span></div><div class='line' id='LC10'><span class="w">                </span><span class="p">(</span><span class="nf">de-iter</span><span class="w"> </span><span class="p">[</span><span class="nv">iter</span><span class="w"> </span><span class="nv">result</span><span class="p">]</span><span class="w"></span></div><div class='line' id='LC11'><span class="w">                  </span><span class="p">(</span><span class="nf">let</span><span class="w"> </span><span class="p">[</span><span class="nv">n</span><span class="w"> </span><span class="p">(</span><span class="nf">try</span><span class="w"></span></div><div class='line' id='LC12'><span class="w">                            </span><span class="p">(</span><span class="nf">.next</span><span class="w"> </span><span class="nv">iter</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC13'><span class="w">                            </span><span class="p">(</span><span class="nf">catch</span><span class="w"> </span><span class="nv">NoSuchElementException</span><span class="w"> </span><span class="nv">_</span><span class="w"> </span><span class="nv">nil</span><span class="p">))]</span><span class="w"></span></div><div class='line' id='LC14'><span class="w">                    </span><span class="p">(</span><span class="nf">if</span><span class="w"> </span><span class="p">(</span><span class="nf">nil?</span><span class="w"> </span><span class="nv">n</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC15'><span class="w">                      </span><span class="p">(</span><span class="nf">reverse</span><span class="w"> </span><span class="nv">result</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC16'><span class="w">                      </span><span class="p">(</span><span class="nf">recur</span><span class="w"> </span><span class="nv">iter</span><span class="w"> </span><span class="p">(</span><span class="nf">cons</span><span class="w"> </span><span class="nv">n</span><span class="w"> </span><span class="nv">result</span><span class="p">)))))</span><span class="w"></span></div><div class='line' id='LC17'><span class="w">                </span><span class="p">(</span><span class="nf">lookup</span><span class="w"> </span><span class="p">[</span><span class="nv">key</span><span class="p">]</span><span class="w"></span></div><div class='line' id='LC18'><span class="w">                  </span><span class="p">(</span><span class="nf">let</span><span class="w"> </span><span class="p">[</span><span class="nv">p</span><span class="w"> </span><span class="p">(</span><span class="nf">retr</span><span class="w"> </span><span class="nv">key</span><span class="p">)]</span><span class="w"></span></div><div class='line' id='LC19'><span class="w">                    </span><span class="p">(</span><span class="nf">condp</span><span class="w"> </span><span class="nv">=</span><span class="w"> </span><span class="p">(</span><span class="nf">class</span><span class="w"> </span><span class="nv">p</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC20'><span class="w">                        </span><span class="nv">PyFloat</span><span class="w"> </span><span class="p">(</span><span class="nf">.asDouble</span><span class="w"> </span><span class="nv">p</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC21'><span class="w">                        </span><span class="nv">PyInteger</span><span class="w"> </span><span class="p">(</span><span class="nf">.asInt</span><span class="w"> </span><span class="nv">p</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC22'><span class="w">                        </span><span class="nv">PyBoolean</span><span class="w"> </span><span class="p">(</span><span class="nf">.__nonzero__</span><span class="w"> </span><span class="nv">p</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC23'><span class="w">                        </span><span class="nv">PyString</span><span class="w"> </span><span class="p">(</span><span class="nf">.asString</span><span class="w"> </span><span class="nv">p</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC24'><span class="w">                        </span><span class="nv">PyList</span><span class="w"> </span><span class="p">(</span><span class="nf">map</span><span class="w"> </span><span class="nv">hashify</span><span class="w"> </span><span class="p">(</span><span class="nf">de-iter</span><span class="w"> </span><span class="p">(</span><span class="nf">.iterator</span><span class="w"> </span><span class="nv">p</span><span class="p">)</span><span class="w"> </span><span class="nv">nil</span><span class="p">))</span><span class="w"></span></div><div class='line' id='LC25'><span class="w">                        </span><span class="p">(</span><span class="nf">hashify</span><span class="w"> </span><span class="nv">p</span><span class="p">))))]</span><span class="w"></span></div><div class='line' id='LC26'><span class="w">          </span><span class="p">(</span><span class="nf">reduce</span><span class="w"> </span><span class="p">(</span><span class="nf">fn</span><span class="w"> </span><span class="p">[</span><span class="nv">m</span><span class="w"> </span><span class="nv">k</span><span class="p">]</span><span class="w"> </span><span class="p">(</span><span class="nf">assoc</span><span class="w"> </span><span class="nv">m</span><span class="w"> </span><span class="p">(</span><span class="nf">keyword</span><span class="w"> </span><span class="nv">k</span><span class="p">)</span><span class="w"> </span><span class="p">(</span><span class="nf">lookup</span><span class="w"> </span><span class="nv">k</span><span class="p">)))</span><span class="w"></span></div><div class='line' id='LC27'><span class="w">                  </span><span class="p">(</span><span class="nf">hash-map</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC28'><span class="w">                  </span><span class="p">(</span><span class="nf">.keys</span><span class="w"> </span><span class="p">(</span><span class="nf">.__dict__</span><span class="w"> </span><span class="nv">py-object</span><span class="p">))))</span><span class="w"></span></div><div class='line' id='LC29'><span class="w">        </span><span class="no">:else</span><span class="w"> </span><span class="nv">py-object</span><span class="p">))</span><span class="w"></span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1863525/b3425269c1a29d8d319be08fbc4f1ef4b2d180be/gistfile1.clj" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1863525#file_gistfile1.clj" style="float:right;margin-right:10px;color:#666">gistfile1.clj</a>
            <a href="https://gist.github.com/1863525">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</div>

<p>We scan through the keys, turning each one into a Clojure keyword and converting its value (recursively, so that we can handle nested manifest objects and lists). The conversion from Java iterator into Clojure list is rather ugly &#8211; I&#8217;m a bit surprised that there&#8217;s no pre-existing support for this.</p>

<p>Looking back at the Field listing at the top: we pass the various manifest objects as arguments to top-level Clojure functions which are higher-order and hence return the actual functions we call from Python, having hashified the manifests. Here&#8217;s the main function from a current artwork:</p>

<div class="hang-2-column" style="width:620px;"><div id="gist-1863592" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="p">(</span><span class="nf">defn</span><span class="w"> </span><span class="nv">kick</span><span class="w"></span></div><div class='line' id='LC2'><span class="w">  </span><span class="p">[</span><span class="nv">m_Configuration</span><span class="w"> </span><span class="nv">m_Geometry</span><span class="p">]</span><span class="w"></span></div><div class='line' id='LC3'><span class="w">  </span><span class="p">(</span><span class="nf">let</span><span class="w"> </span><span class="p">[{</span><span class="no">:keys</span><span class="w"> </span><span class="p">[</span><span class="nv">DO_VORONOI</span><span class="w"> </span><span class="nv">TREE_DEPTH</span><span class="w"> </span><span class="nv">BRANCH_BEND_PATHS</span><span class="p">]}</span><span class="w"></span></div><div class='line' id='LC4'><span class="w">        </span><span class="p">(</span><span class="nf">u/hashify</span><span class="w"> </span><span class="nv">m_Configuration</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC5'><span class="w">        </span><span class="p">{</span><span class="no">:keys</span><span class="w"> </span><span class="p">[</span><span class="nv">CELL_ROWS</span><span class="w"> </span><span class="nv">CELL_COLS</span><span class="w"> </span><span class="nv">CELL_SIZE</span><span class="w"> </span><span class="nv">DELTA</span><span class="w"></span></div><div class='line' id='LC6'><span class="w">                </span><span class="nv">INITIAL_LEN</span><span class="w"> </span><span class="nv">LEN_MUL</span><span class="p">]}</span><span class="w"></span></div><div class='line' id='LC7'><span class="w">        </span><span class="p">(</span><span class="nf">u/hashify</span><span class="w"> </span><span class="nv">m_Geometry</span><span class="p">)]</span><span class="w"></span></div><div class='line' id='LC8'><span class="w">    </span><span class="p">(</span><span class="nf">fn</span><span class="w"> </span><span class="p">[</span><span class="nv">t</span><span class="p">]</span><span class="w"></span></div><div class='line' id='LC9'><span class="w">      </span><span class="p">(</span><span class="nf">let</span><span class="w"> </span><span class="p">[</span><span class="nv">v-fn</span><span class="w"> </span><span class="p">(</span><span class="nf">if</span><span class="w"> </span><span class="nv">DO_VORONOI</span><span class="w"></span></div><div class='line' id='LC10'><span class="w">                   </span><span class="p">(</span><span class="nf">voronoi-with</span><span class="w"> </span><span class="p">(</span><span class="nf">*</span><span class="w"> </span><span class="nv">CELL_COLS</span><span class="w"> </span><span class="nv">CELL_SIZE</span><span class="w"> </span><span class="mi">1</span><span class="nv">/2</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC11'><span class="w">                                 </span><span class="p">(</span><span class="nf">*</span><span class="w"> </span><span class="nv">CELL_ROWS</span><span class="w"> </span><span class="nv">CELL_SIZE</span><span class="w"> </span><span class="mi">1</span><span class="nv">/2</span><span class="p">))</span><span class="w"></span></div><div class='line' id='LC12'><span class="w">                   </span><span class="nv">no-voronoi</span><span class="p">)]</span><span class="w"></span></div><div class='line' id='LC13'><span class="w">        </span><span class="p">(</span><span class="nf">v-fn</span><span class="w"> </span><span class="nv">t</span><span class="w"></span></div><div class='line' id='LC14'><span class="w">              </span><span class="p">(</span><span class="nf">d/fixed</span><span class="w"> </span><span class="nv">CELL_ROWS</span><span class="w"> </span><span class="nv">CELL_COLS</span><span class="w"> </span><span class="nv">CELL_SIZE</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC15'><span class="w">              </span><span class="p">(</span><span class="nf">fn</span><span class="w"> </span><span class="p">[</span><span class="nv">t</span><span class="p">]</span><span class="w"> </span><span class="p">(</span><span class="nf">let</span><span class="w"> </span><span class="p">[</span><span class="nv">depth-here</span><span class="w"> </span><span class="nv">TREE_DEPTH</span><span class="w"></span></div><div class='line' id='LC16'><span class="w">                            </span><span class="nv">tip</span><span class="w"> </span><span class="mi">1</span><span class="w"></span></div><div class='line' id='LC17'><span class="w">                            </span><span class="nv">tree0</span><span class="w"> </span><span class="p">((</span><span class="nf">d/tree</span><span class="w"> </span><span class="nv">DELTA</span><span class="w"> </span><span class="nv">LEN_MUL</span><span class="w"> </span><span class="nv">tip</span><span class="w"> </span><span class="nv">BRANCH_BEND_PATHS</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC18'><span class="w">                                   </span><span class="nv">t</span><span class="w"> </span><span class="nv">depth-here</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="w"> </span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="nv">INITIAL_LEN</span><span class="w"> </span><span class="nv">nil</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC19'><span class="w">                            </span><span class="nv">tree1</span><span class="w"> </span><span class="p">(</span><span class="nf">map</span><span class="w"> </span><span class="nv">rotate-R</span><span class="w"> </span><span class="nv">tree0</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC20'><span class="w">                            </span><span class="nv">tree2</span><span class="w"> </span><span class="p">(</span><span class="nf">map</span><span class="w"> </span><span class="nv">flip-seg-Y</span><span class="w"> </span><span class="nv">tree0</span><span class="p">)</span><span class="w"></span></div><div class='line' id='LC21'><span class="w">                            </span><span class="nv">tree3</span><span class="w"> </span><span class="p">(</span><span class="nf">map</span><span class="w"> </span><span class="p">(</span><span class="nf">comp</span><span class="w"> </span><span class="nv">flip-seg-X</span><span class="w"> </span><span class="nv">flip-seg-Y</span><span class="p">)</span><span class="w"> </span><span class="nv">tree0</span><span class="p">)]</span><span class="w"></span></div><div class='line' id='LC22'><span class="w">                        </span><span class="p">(</span><span class="nf">cons</span><span class="w"> </span><span class="p">[[</span><span class="mi">0</span><span class="w"> </span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="w"> </span><span class="mi">0</span><span class="p">]]</span><span class="w"> </span><span class="nv">tree1</span><span class="p">))))))))</span><span class="w"></span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1863592/5af232435f4aa944c56d22fd24377a287ab29f57/gistfile1.clj" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1863592#file_gistfile1.clj" style="float:right;margin-right:10px;color:#666">gistfile1.clj</a>
            <a href="https://gist.github.com/1863592">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</div>

<p>The big win here is the ability to map-bind the entries of a manifest in one go. Using the <code>:keys</code> form here binds the names directly, at the cost of a pile of ugly upper-case identifiers in the middle of the code &#8211; but there&#8217;s no reason why we couldn&#8217;t modify <code>hashify</code> to downcase everything.</p>

<p>The final push: it makes sense to pass composite data objects from Clojure back to Python in the same form (rather straining the original intent of &#8220;manifest&#8221;), but how do we turn Clojure&#8217;s persistent hash maps back into manifest objects? It would be great if we could overload the <code>Manifest</code> constructor to take a hash map; since we can&#8217;t, this is the closest I managed to get: an optional non-keyword argument which can be a hash map. <code>Manifest</code> now looks like this:</p>

<div class="hang-2-column" style="width:620px;"><div id="gist-1864710" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="kn">from</span> <span class="nn">java.util</span> <span class="kn">import</span> <span class="n">Map</span><span class="p">,</span> <span class="n">List</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="k">class</span> <span class="nc">Manifest</span><span class="p">:</span></div><div class='line' id='LC4'>	<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">h</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span></div><div class='line' id='LC5'>		<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">kw</span><span class="p">:</span></div><div class='line' id='LC6'>			<span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">kw</span><span class="p">[</span><span class="n">k</span><span class="p">])</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'>		<span class="k">if</span> <span class="n">h</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></div><div class='line' id='LC9'>			<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">h</span><span class="o">.</span><span class="n">iterator</span><span class="p">():</span></div><div class='line' id='LC10'>				<span class="n">n</span> <span class="o">=</span> <span class="n">k</span><span class="o">.</span><span class="n">getKey</span><span class="p">()</span><span class="o">.</span><span class="n">getName</span><span class="p">()</span></div><div class='line' id='LC11'>				<span class="n">v</span> <span class="o">=</span> <span class="n">k</span><span class="o">.</span><span class="n">getValue</span><span class="p">()</span></div><div class='line' id='LC12'>				<span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__unpack</span><span class="p">(</span><span class="n">v</span><span class="p">))</span></div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'>	<span class="k">def</span> <span class="nf">__unpack</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span></div><div class='line' id='LC15'>		<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">Map</span><span class="p">):</span></div><div class='line' id='LC16'>			<span class="k">return</span> <span class="n">Manifest</span><span class="p">(</span><span class="n">x</span><span class="p">)</span></div><div class='line' id='LC17'>		<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">List</span><span class="p">):</span></div><div class='line' id='LC18'>			<span class="k">return</span> <span class="nb">map</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__unpack</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span></div><div class='line' id='LC19'>		<span class="k">else</span><span class="p">:</span></div><div class='line' id='LC20'>			<span class="k">return</span> <span class="n">x</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1864710/e168ea3e0c7a4ae29f6a60f08507096271e9ada4/gistfile1.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1864710#file_gistfile1.py" style="float:right;margin-right:10px;color:#666">gistfile1.py</a>
            <a href="https://gist.github.com/1864710">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</div>

<p>This is effectively &#8220;<code>unhashify</code>&#8221; on the Python side (and again it&#8217;s recursive to handle nested structures). The instance check for <code>Map</code> gets us hash maps; the instance check for <code>List</code> gets us Clojure lists, vectors and sequences. The only real Clojure-dependent part of this is the <code>.getName()</code> call on the keywords to turn them back into strings. (Again, we&#8217;d probably want to upcase these to be typographically correct.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2012/02/19/fusion-programming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Loadbang Reloaded</title>
		<link>http://www.cassiel.com/2011/12/22/loadbang-reloaded/</link>
		<comments>http://www.cassiel.com/2011/12/22/loadbang-reloaded/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 23:49:47 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[MaxMSP]]></category>
		<category><![CDATA[Monome]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Shado]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=266</guid>
		<description><![CDATA[We&#8217;ve been putting some effort in recently to shift our major JVM-hosted MaxMSP projects to GitHub. Most of them started out hosted privately in CVS and built using Eclipse, and then migrated to hosting in Mercurial, with a different directory structure and a fair degree of pain in getting the various Ant scripts to work&#8230;]]></description>
			<content:encoded><![CDATA[<div class="hang-2-column" style="width:170px;"><img src='http://www.cassiel.com/wp-content/uploads/2011/12/jython170.jpg' alt='jython170' width="170" height="171" class='alignleft size-thumbnail' /></div>

<p>We&#8217;ve been putting some effort in recently to shift our major
JVM-hosted MaxMSP projects to <a href="https://github.com/">GitHub</a>. Most of them started
out hosted privately in CVS and built using Eclipse, and then migrated
to hosting in Mercurial, with a different directory structure and a
fair degree of pain in getting the various Ant scripts to work
again. Moving everything to GitHub made sense, but that required
another rearrangement of source directories and build paths, so it was
obviously time to bite the bullet and use <a href="http://maven.apache.org/">Maven</a> to build everything
instead. This decision has lowered the maintenance effort considerably.</p>

<p><span id="more-266"></span></p>

<p>Without further ado:</p>

<ul>
<li><p><a href="https://github.com/cassiel/net.loadbang.lib">net.loadbang.lib</a> base libraries used by everything else</p></li>
<li><p><a href="https://github.com/cassiel/net.loadbang.osc">net.loadbang.osc</a> a simple but versatile and well-documented
OSC library, supporting UDP and TCP transmission and reception</p></li>
<li><p><a href="https://github.com/cassiel/net.loadbang.scripting">net.loadbang.scripting</a> a support library for the
various JVM-hosted scripting languages</p></li>
<li><p><a href="https://github.com/cassiel/net.loadbang.groovy">net.loadbang.groovy</a> the Groovy language for MaxMSP</p></li>
<li><p><a href="https://github.com/cassiel/net.loadbang.jython">net.loadbang.jython</a> the Python language for MaxMSP, using
the Jython system</p></li>
<li><p><a href="https://github.com/cassiel/net.loadbang.shado">net.loadbang.shado</a> a high-level sprite-based rendering
library for the monome and arc control surfaces</p></li>
</ul>

<p>A few things are still missing from this list:</p>

<ul>
<li><p><a href="http://www.loadbang.net/space/Software/net.loadbang-SQL">SQL</a> a wrapper on top of some zero-footprint SQL databases
(plus a MySQL shim): with the advent of Python and Clojure as DSLs
for Java, it&#8217;s not clear that this package serves any real purpose</p></li>
<li><p><code>net.loadbang.straker</code> a not-yet-released modular sequencing
framework for the monome</p></li>
<li><p><code>net.loadbang.fireflash</code> a not-yet-released multi-app, multi-device
heterogeneous monome protocol router</p></li>
<li><p><a href="http://www.loadbang.net/space/Software/net.loadbang.web">web</a> an embedded Jetty-based web server for Max</p></li>
<li><p>various user-interface goodies like <a href="http://www.loadbang.net/space/Software/Nixies">Nixie tubes</a> and
<a href="http://www.loadbang.net/space/Software/TextBrick">rotating text</a></p></li>
<li><p><a href="https://github.com/cassiel/maxmsp-clojure">Clojure</a> &#8211; the most important at this stage -
Clojure for MaxMSP</p></li>
</ul>

<p>Clojure will be getting some love very soon (we&#8217;re <a href="http://maxuk.wordpress.com/">teaching it</a>
in about three weeks). The link above is to an early build we put
together for the Cycling &#8217;74 <a href="http://cycling74.com/2011/03/30/announcing-expo-74-2011/">Expo</a> last October; it still needs
to be Mavenised and updated for Clojure 1.3.</p>

<p>Some videos: this is what <code>straker</code> looks like when it&#8217;s running (a
sight familiar to recent audiences at the <a href="http://www.lottolab.org/articles/sciencemuseumlates.asp">Lottolab</a> gigs):</p>

<div width='440'><iframe class='alignnone size-medium' src='http://player.vimeo.com/video/2260727?title=0&byline=0&portrait=0' width='440' height='247.5' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div><p/>

<p>This is <code>fireflash</code>:</p>

<div width='440'><iframe class='alignnone size-medium' src='http://player.vimeo.com/video/8696044?title=0&byline=0&portrait=0' width='440' height='247.5' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div><p/>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/12/22/loadbang-reloaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MaxMSP Showing and Telling</title>
		<link>http://www.cassiel.com/2011/12/13/maxmsp-showing-and-telling/</link>
		<comments>http://www.cassiel.com/2011/12/13/maxmsp-showing-and-telling/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 23:17:24 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Activities]]></category>
		<category><![CDATA[Clojure]]></category>
		<category><![CDATA[Gig]]></category>
		<category><![CDATA[MaxMSP]]></category>
		<category><![CDATA[Monome]]></category>
		<category><![CDATA[Workshop]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=257</guid>
		<description><![CDATA[We&#8217;re workshopping, and gigging, at the M4_u (Max/MSP for Users) Convention, 13th to 14th of January, Phoenix Square, Leicester. The workshop is pretty much going to be a repeat of that given at the Cycling &#8217;74 Expo &#8211; building an algorithmic step sequencer and abstract display system using Clojure. The gig will be monome-based, probably&#8230;]]></description>
			<content:encoded><![CDATA[<div class="hang-2-column" style="width:170px;"><img src='http://www.cassiel.com/wp-content/uploads/2011/12/m4u_170.jpg' alt='m4u_170' width="170" height="123" class='alignleft size-thumbnail' /></div>

<p>We&#8217;re workshopping, and gigging, at the <a href="http://maxuk.wordpress.com/">M4_u (Max/MSP for Users) Convention</a>, 13th to 14th of January, Phoenix Square, Leicester. The workshop is pretty much going to be a repeat of that given at the <a href="http://cycling74.com/2011/03/30/announcing-expo-74-2011/">Cycling &#8217;74 Expo</a> &#8211; building an algorithmic step sequencer and abstract display system using <a href="http://clojure.org">Clojure</a>. The gig will be <a href="http://monome.org">monome</a>-based, probably with some pulse sequencer action.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/12/13/maxmsp-showing-and-telling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plenum at Lumiere Durham</title>
		<link>http://www.cassiel.com/2011/12/12/plenum-at-lumiere-durham/</link>
		<comments>http://www.cassiel.com/2011/12/12/plenum-at-lumiere-durham/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 23:35:44 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Durham]]></category>
		<category><![CDATA[Field]]></category>
		<category><![CDATA[Lumiere]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[Plenum]]></category>
		<category><![CDATA[Rob Godman]]></category>
		<category><![CDATA[Simeon Nelson]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=250</guid>
		<description><![CDATA[This short video shows Plenum projected onto St. Oswald&#8217;s church as part of the Lumiere Durham festival. This was the third outing for the piece this year, the first two being at Skyway (Toruń, Poland) and Valgus (Tallinn, Estonia), associated with Lux Scientia. As mentioned in an earlier blog entry, This version of Plenum dispenses&#8230;]]></description>
			<content:encoded><![CDATA[<div width='620'><iframe class='alignnone size-large' src='http://player.vimeo.com/video/32473866?title=0&byline=0&portrait=0' width='620' height='348.75' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div><p/>

<p>This short video shows <a href="http://simeonnelson.wordpress.com/2011/07/25/lux-scientia-a-european-constellation/">Plenum</a> projected onto St. Oswald&#8217;s church as part of the <a href="http://www.lumieredurham.co.uk/">Lumiere Durham</a> festival. This was the third outing for the piece this year, the first two being at <a href="http://www.skyway.art.pl/">Skyway</a> (Toruń, Poland) and <a href="http://www.valgusfestival.ee/">Valgus</a> (Tallinn, Estonia), associated with <a href="http://luxscientia.wordpress.com/">Lux Scientia</a>.</p>

<p><span id="more-250"></span></p>

<div class="hang-2-column" style="width:170px;"><img src='http://www.cassiel.com/wp-content/uploads/2011/12/plenum-field-170.jpg' alt='plenum-field-170' width="170" height="278" class='alignleft size-thumbnail' /></div>

<p>As mentioned in an <a href="http://www.cassiel.com/2011/08/04/plenum-european-tour-2011/">earlier blog entry</a>, This version of Plenum dispenses with the (rather fragile) Processing plugin for graphics and instead uses <a href="http://openendedgroup.com/field/wiki/OverviewBanners2">Field</a>&#8216;s own antialiased scenegraph renderer. Having something resolution-independent with a virtual camera and the ability to render onto a foldable frame buffer surface was a great help when it came to calibrating for the Tallinn town hall. (We aren&#8217;t doing projection mapping, and have no intention of being drawn into that area until a convincing, coherent creative process presents itself.)</p>

<p>The overall timeline arc &#8211; the disintegration of a matrix into gravitationally orbiting and escaping bodies &#8211; is much the same as the version developed for Skyway in 2010, but the current version also employs a complex, dynamic set of mutation functions which change the sizes of the points according to geometric formulae, resulting in visual artifacts (rings, bars) overlaying the disintegration of the basic pattern.</p>

<p>As before, the Field system transmits musical cues and control signals via <a href="http://opensoundcontrol.org/">OSC</a> to a synthesis system designed and programmed by <a href="http://www.robgodman.com">Rob Godman</a>.</p>

<p>(The cryptic diagram in the left hand margin is Field&#8217;s sequencing canvas for Plenum, showing the various elements of the piece along a timeline.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/12/12/plenum-at-lumiere-durham/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding for the Cathedral: Dreamhub at Vor Frue Kirke</title>
		<link>http://www.cassiel.com/2011/12/05/coding-for-the-cathedral/</link>
		<comments>http://www.cassiel.com/2011/12/05/coding-for-the-cathedral/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 20:16:58 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ableton Live]]></category>
		<category><![CDATA[AudioCubes]]></category>
		<category><![CDATA[Copenhagen]]></category>
		<category><![CDATA[Dreamhub]]></category>
		<category><![CDATA[Lysets Lyd]]></category>
		<category><![CDATA[MaxMSP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Vor Frue Kirke]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=237</guid>
		<description><![CDATA[We recently did a bit of coding for Dreamhub: the Lysets Lyd chill-out gig at Vor Frue Kirke required twelve Percussa AudioCubes connected into an Ableton Live set, capable of sending MIDI data to Live (to trigger clips from the sensors) and of responding to MIDI (to transform automation controller messages into colour changes). Percussa&#8217;s&#8230;]]></description>
			<content:encoded><![CDATA[<div width='440'><iframe class='alignnone size-medium' src='http://player.vimeo.com/video/32446378?title=0&byline=0&portrait=0' width='440' height='247.5' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div><p/>

<p>We recently did a bit of coding for <a href="http://www.dreamhub.dk">Dreamhub</a>: the <a href="http://www.facebook.com/lysetslyd">Lysets Lyd</a> chill-out gig at <a href="http://www.koebenhavnsdomkirke.dk">Vor Frue Kirke</a> required twelve <a href="http://www.percussa.com">Percussa AudioCubes</a> connected into an <a href="http://www.ableton.com">Ableton Live</a> set, capable of sending MIDI data to Live (to trigger clips from the sensors) and of responding to MIDI (to transform automation controller messages into colour changes). Percussa&#8217;s bundled control software wasn&#8217;t up to the task at the time, being limited to four cubes at once and a rather laborious manual setup procedure, so we built a custom <a href="http://cycling74.com/products/max/">Max</a> patcher using an external object by <a href="http://www.percussa.com/2011/07/10/check-out-thomas-grills-flext-external-for-audiocubes/">Thomas Grill</a> and our <a href="http://www.loadbang.net/space/Software/net.loadbang.jython">Python machinery</a> to deal with the configuration and state transitions required by the set.</p>

<p><span id="more-237"></span></p>

<p>Here&#8217;s the obligatory patcher screen shot:</p>

<p><img src='http://www.cassiel.com/wp-content/uploads/2011/12/lysets-max-440.jpg' alt='lysets-max-440' width="440" height="490" class='alignnone size-medium' /></p>

<p>There&#8217;s a nice write-up <a href="http://www.percussa.com/2011/10/01/light-sound-installation-with-audiocubes-by-kim-pedersen/">here</a>. Next performance: 3rd February 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/12/05/coding-for-the-cathedral/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monome and Wall of Sound Gig at the Science Museum</title>
		<link>http://www.cassiel.com/2011/09/18/monome-and-wall-of-sound-gig-at-the-science-museum/</link>
		<comments>http://www.cassiel.com/2011/09/18/monome-and-wall-of-sound-gig-at-the-science-museum/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 22:15:53 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Arc]]></category>
		<category><![CDATA[Lottolab]]></category>
		<category><![CDATA[Monome]]></category>
		<category><![CDATA[Open Sound Control]]></category>
		<category><![CDATA[OSC]]></category>
		<category><![CDATA[Straker]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=206</guid>
		<description><![CDATA[In the very-short-notice department, we&#8217;ve been asked to do some kind of live performance/installation for the upcoming Science Museum Late event on September 28th, using the 77-speaker Lottolab Soundwall as the sound system. Faced with a complete lack of existing material which can be pressed into service in this kind of environment, and also faced&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.cassiel.com/wp-content/uploads/2011/09/wall-440.jpg' alt='wall-440' width="440" height="169" class='alignnone size-medium' /></p>

<p>In the very-short-notice department, we&#8217;ve been asked to do some kind
of live performance/installation for the upcoming <a href="http://www.lottolab.org/articles/sciencemuseumlates.asp">Science Museum Late</a>
event on September 28th, using the 77-speaker <a href="http://www.lottolab.org/articles/soundwall.asp">Lottolab Soundwall</a> as the
sound system.</p>

<p>Faced with a complete lack of existing material which can be pressed
into service in this kind of environment, and also faced with a very
tight deadline, the only solution is to quickly assemble a set of
tools which can be used to generate and modify musical material
quickly and fluidly. This is a good excuse to dust off some sequencing
tools which were aired briefly for the <a href="http://www.postme-newid.net/dare-we-do-it-real-time/">Post Me</a> performance
project in Prague,
plus the Max for Live sample shard processor which has been pressed
into service for a few gigs (and which features in a video
<a href="http://vimeo.com/2260727">here</a>). Visual impact is going to be a factor for this gig,
so we&#8217;re going for this look:</p>

<p><img src='http://www.cassiel.com/wp-content/uploads/2011/09/lotto-monomes-440.jpg' alt='lotto-monomes-440' width="440" height="248" class='alignnone size-medium' /></p>

<p>The Straker sequencer already has some bling on the <a href="http://monome.org/articles/2007/12/19/one-twenty-eight-photo/">monome 128</a>, but we need to get
something up and spinning on the <a href="http://monome.org/articles/2011/01/14/arc/">arc 4</a> in quick order.</p>

<p>(Geek note: in this photo the monome 128 is running Straker, written
in Java, with sequencer tracks implemented in Python, while the arc 4
is running an animation demo written in Clojure. Both use the
<a href="http://www.loadbang.net/space/Software/net.loadbang.shado">shado</a> rendering library.)</p>

<p>Oh: the Soundwall is apparently <a href="http://opensoundcontrol.org/">OSC</a>-controllable. We may or may not have time to throw some code at that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/09/18/monome-and-wall-of-sound-gig-at-the-science-museum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Futures in Dance Residency</title>
		<link>http://www.cassiel.com/2011/08/05/digital-futures-in-dance-residency/</link>
		<comments>http://www.cassiel.com/2011/08/05/digital-futures-in-dance-residency/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 20:05:15 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Choreography]]></category>
		<category><![CDATA[CLA]]></category>
		<category><![CDATA[DFiD]]></category>
		<category><![CDATA[Random Dance]]></category>
		<category><![CDATA[Wayne McGregor]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=182</guid>
		<description><![CDATA[We&#8217;ve been awarded an artist&#8217;s residency at DanceDigital as part of the Digital Futures in Dance National Conference this September. Our mission is to bring the Choreographic Language Agent forward from its current workshopping phase into a state where Wayne McGregor can make use of it in the creation of his new work which premieres&#8230;]]></description>
			<content:encoded><![CDATA[<div class="hang-2-column" style="width:170px;"><a href='http://digitalfuturesindance.org.uk/' title='dfid-170'><img src='http://www.cassiel.com/wp-content/uploads/2011/08/dfid-170.jpg' alt='dfid-170' width="170" height="170" class='alignleft size-thumbnail' /></a></div>

<p>We&#8217;ve been awarded an artist&#8217;s residency at <a href="http://dancedigital.org.uk/">DanceDigital</a> as part of the <a href="http://digitalfuturesindance.org.uk/">Digital Futures in Dance</a> National Conference this September. Our mission is to bring the <a href="http://openendedgroup.com/index.php/in-progress/choreographic-language-agent/">Choreographic Language Agent</a> forward from its current workshopping phase into a state where <a href="http://www.randomdance.org/wayne_mcgregor">Wayne McGregor</a> can make use of it in the creation of his new work which premieres at <a href="http://www.sadlerswells.com/show/Turnage-McGregor-Wallinger-UNDANCE">Sadler&#8217;s Wells in December</a>. We present the outcomes of the residency on <a href="http://digitalfuturesindance.org.uk/?page_id=25">September 9th</a>.</p>

<p>There&#8217;s more information about the residency (and the other artists based at <a href="http://www.southeastdance.org.uk/">South East Dance</a> and <a href="http://www.dancesouthwest.org.uk/">Dance South West</a>) <a href="http://digitalfuturesindance.org.uk/?page_id=27">here</a>.</p>

<p>(Photo: Jonah Bokaer.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/08/05/digital-futures-in-dance-residency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clojure Workshop, Expo &#8217;74, October</title>
		<link>http://www.cassiel.com/2011/08/05/clojure-workshop-expo-74-october/</link>
		<comments>http://www.cassiel.com/2011/08/05/clojure-workshop-expo-74-october/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 09:57:38 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Activities]]></category>
		<category><![CDATA[Clojure]]></category>
		<category><![CDATA[Cycling '74]]></category>
		<category><![CDATA[Expo '74]]></category>
		<category><![CDATA[MaxMSP]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=167</guid>
		<description><![CDATA[We are running a workshop on concurrent patchers and data structures with MaxMSP and Clojure at the Cycling &#8217;74 Expo in Brooklyn, October 14-16. Details to follow. For that matter, details to be designed and coded. Anyone who wants to get a flavour of how the workshop might pan out should check out the existing&#8230;]]></description>
			<content:encoded><![CDATA[<div class="hang-2-column" style="width:170px;"><a href='http://cycling74.com/2011/03/30/announcing-expo-74-2011/' title='expo-74-logo'><img src='http://www.cassiel.com/wp-content/uploads/2011/08/expo-74-logo.png' alt='expo-74-logo' width="150" height="61" class='alignleft size-thumbnail' /></a></div>

<p>We are running a workshop on concurrent patchers and data structures with MaxMSP and Clojure at the <a href="http://cycling74.com/2011/03/30/announcing-expo-74-2011/">Cycling &#8217;74 Expo</a> in Brooklyn, October 14-16. Details to follow. For that matter, details to be designed and coded.</p>

<p>Anyone who wants to get a flavour of how the workshop might pan out should check out the existing <a href="http://www.loadbang.net/space/Software/net.loadbang.jython">Python-for-MaxMSP</a> package, and then close their eyes and try to imagine what that might look and feel like if the underlying language were <a href="http://clojure.org">Clojure</a> rather than Python.</p>

<p>I&#8217;m anticipating that full-on functional programming techniques will be new to many MaxMSP users, and the uncompromising nature of the Lisp syntax can also be a bit of a hurdle, so I&#8217;m planning to spend some workshop time getting up to speed on those aspects before looking at the concurrency features specific to Clojure itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/08/05/clojure-workshop-expo-74-october/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plenum: European Tour 2011</title>
		<link>http://www.cassiel.com/2011/08/04/plenum-european-tour-2011/</link>
		<comments>http://www.cassiel.com/2011/08/04/plenum-european-tour-2011/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 18:31:45 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Field]]></category>
		<category><![CDATA[Plenum]]></category>
		<category><![CDATA[Skyway]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=147</guid>
		<description><![CDATA[We are about to depart to Poland to install the computer platforms for Plenum, showing in Toruń from August 9th. This work by Simeon Nelson is part of the Lux Scientica festival series; the piece moves on to Estonia in September and Durham in November. Dates: 9-13 August, Skyway ’11, Toruń, Poland 22-25 September, Valgus&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.cassiel.com/wp-content/uploads/2011/08/plenum440.jpg' alt='plenum440' width="440" height="170" class='alignnone size-medium' /></p>

<p>We are about to depart to Poland to install the computer platforms for <a href="http://simeonnelson.wordpress.com/2010/08/27/moon-at-skyway-10-art-and-astronomy-festival/">Plenum</a>, showing in Toruń from August 9th. This work by Simeon Nelson is part of the <em>Lux Scientica</em> festival series; the piece moves on to Estonia in September and Durham in November.</p>

<p>Dates:</p>

<ul>
<li>9-13 August, <a href="http://www.skyway.art.pl/">Skyway ’11</a>, Toruń, Poland</li>
<li>22-25 September, Valgus Festival, Tallinn, Estonia</li>
<li>17-20 November, <a href="http://www.lumieredurham.co.uk/">Lumiere</a>, Durham</li>
</ul>

<p><span id="more-147"></span></p>

<img src='http://www.cassiel.com/wp-content/uploads/2011/08/FieldScreenSnapz014.jpg' alt='FieldScreenSnapz014' width="170" height="170" class='alignleft size-thumbnail' />

<p>Plenum is a revision and extension of an earlier work, Księżyc (The Moon) which premiered at Skyway 10. (Pictures <a href="http://www.flickr.com/photos/cassiel-com/sets/72157624841262488/">here</a>.) We took the opportunity to rewrite the graphics system for the new version. The original made use of <a href="http://processing.org">Processing</a> as a renderer embedded within <a href="http://openendedgroup.com/field/">Field</a>, but the bridging wasn&#8217;t totally robust, so it made sense to exploit Field&#8217;s native rendering system for a less convoluted implementation. Field&#8217;s author, <a href="http://openendedgroup.com/index.php/about/marc-downie/">Marc Downie</a>, stepped in with a reimplementation of the low-level graphics routines to shift the geometry rendering from Python/Java onto the graphics card, resulting in a rather nippy frame rate, some lovely anti-aliasing (pictured left), and Processing left somewhat in the dust. (There&#8217;s a technical write-up <a href="http://openendedgroup.com/field/wiki/HowToDrawLotsOfThings">here</a>.)</p>

<p>Tallinn is expected to present some interesting challenges: we are anticipating being given access to a forty-metre-high mediaeval cylindrical tower.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/08/04/plenum-european-tour-2011/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moving and Making</title>
		<link>http://www.cassiel.com/2011/08/01/moving-and-making/</link>
		<comments>http://www.cassiel.com/2011/08/01/moving-and-making/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 21:54:29 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Choreography]]></category>
		<category><![CDATA[CLA]]></category>
		<category><![CDATA[Random Dance]]></category>
		<category><![CDATA[Wayne McGregor]]></category>

		<guid isPermaLink="false">http://www.cassiel.com/?p=123</guid>
		<description><![CDATA[We recently participated in a workshop organised by the R-Research arm of Wayne McGregor &#124; Random Dance, teaching the Choreographic Language Agent software to the company. We are now back in software maintenance mode, applying some fixes and enhancements suggested by sessions with the company dancers. Our next period of residence with the company is&#8230;]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.cassiel.com/wp-content/uploads/2011/08/moving-making-440.jpg' alt='moving-making-440' width="440" height="170" class='alignnone size-medium' /></p>

<p>We recently participated in a workshop organised by the <a href="http://www.randomdance.org/r_research">R-Research</a> arm of <a href="http://www.randomdance.org">Wayne McGregor | Random Dance</a>, teaching the <a href="http://openendedgroup.com/index.php/in-progress/choreographic-language-agent/">Choreographic Language Agent</a> software to the company. We are now back in software maintenance mode, applying some fixes and enhancements suggested by sessions with the company dancers. Our next period of residence with the company is at Dartington College at the end of August.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cassiel.com/2011/08/01/moving-and-making/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

