<?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>codehop &#187; visuals</title>
	<atom:link href="https://codehop.com/tag/visuals/feed/" rel="self" type="application/rss+xml" />
	<link>https://codehop.com</link>
	<description>#code #art #music</description>
	<lastBuildDate>Mon, 23 Apr 2012 18:37:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>List Comprehension Grain Generator</title>
		<link>https://codehop.com/list-comprehension-grain-generator/</link>
		<comments>https://codehop.com/list-comprehension-grain-generator/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 18:54:59 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[granular]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[scheduler]]></category>
		<category><![CDATA[visuals]]></category>

		<guid isPermaLink="false">http://slipmat.noisepages.com/?p=148</guid>
		<description><![CDATA[This is a granular synthesizer: @[random() * 8 for i in range(1000)] foo() This generates 1000 events over the span of 8 beats, using list comprehension. The function foo() is intentionally left blank. It may produce random single-cycle waveforms, bits &#8230; <a href="https://codehop.com/list-comprehension-grain-generator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This is a granular synthesizer:</p>
<pre style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 1.2em; padding-bottom: 16px">
@[random() * 8 for i in range(1000)] foo()
</pre>
<p>This generates 1000 events over the span of 8 beats, using <a href="http://docs.python.org/tutorial/datastructures.html#list-comprehensions">list comprehension</a>.</p>
<p>The function foo() is intentionally left blank. It may produce random single-cycle waveforms, bits of a sample, or glowing TRON-like particles for your live performance visuals. Whatever. </p>
]]></content:encoded>
			<wfw:commentRss>https://codehop.com/list-comprehension-grain-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slipmat Prototype &amp; Processing</title>
		<link>https://codehop.com/slipmat-prototype-processing/</link>
		<comments>https://codehop.com/slipmat-prototype-processing/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 16:14:18 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[csound]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[visuals]]></category>

		<guid isPermaLink="false">http://slipmat.noisepages.com/?p=96</guid>
		<description><![CDATA[I experimenting combining the first Slipmat prototype (built with the Csound API) with Processing. Getting the two systems working together was fairly straight forward. Here&#8217;s the code that generated the video. The following method from class Disc does two things &#8230; <a href="https://codehop.com/slipmat-prototype-processing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><embed src="http://blip.tv/play/Ab2RAgI" type="application/x-shockwave-flash" width="480" height="326" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p>I experimenting combining the first <a href="https://sourceforge.net/projects/slipmat/">Slipmat prototype</a> (built with the Csound API) with <a href="http://processing.org/">Processing</a>. Getting the two systems working together was fairly straight forward. Here&#8217;s the <a href="http://slipmat.svn.sourceforge.net/viewvc/slipmat/src/com/thumbuki/slipmat/examples/VisualsWithProcessing.java?revision=21">code</a> that generated the video. </p>
<p>The following method from class Disc does two things when a disc collides with a border: change direction of the disc and trigger a slipmat event:</p>
<pre style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 1.2em; padding-bottom: 16px">
public void moveDisc() {
    x += xVelocity * SCALE_VELOCITY;
    y += yVelocity * SCALE_VELOCITY;

    if (x <= DISC_RADIUS || x >= width - 1 - DISC_RADIUS) {
        xVelocity *= -1;
        playNote();
    }

    if (y <= DISC_RADIUS || y >= height - 1 - DISC_RADIUS) {
        yVelocity *= -1;
        playNote();
    }
}
</pre>
<p>The method playNote() also belongs to class Disc, and is where the actual triggering of the Slipmat event occurs. The instances sp1 and sp2 are part of the Slipmat system. The &#8220;sp&#8221; is short for &#8220;sine percussion.&#8221;</p>
<pre style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 1.2em; padding-bottom: 16px">
public void playNote() {
    sp1.playNote(0.0, 0.35 * (1 - x / width), frequency);
    sp2.playNote(0.0, 0.35 * x / width, frequency);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>https://codehop.com/slipmat-prototype-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Music and Visuals</title>
		<link>https://codehop.com/music-and-visuals/</link>
		<comments>https://codehop.com/music-and-visuals/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 17:57:39 +0000</pubDate>
		<dc:creator><![CDATA[Jacob Joaquin]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[impromptu]]></category>
		<category><![CDATA[jitter]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[msp]]></category>
		<category><![CDATA[visuals]]></category>

		<guid isPermaLink="false">http://slipmat.noisepages.com/?p=79</guid>
		<description><![CDATA[If slipmat at its core is a general purpose programming language augmented with advanced timing and scheduling capabilities, then slipmat would be well suited for both music and visuals. This isn&#8217;t really too much of a stretch. Audio unit generators &#8230; <a href="https://codehop.com/music-and-visuals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>If slipmat at its core is a general purpose programming language augmented with advanced timing and scheduling capabilities, then slipmat would be well suited for both music and visuals.</p>
<p>This isn&#8217;t really too much of a stretch. Audio unit generators won&#8217;t be built into the core language, but instead will be stored as separate modules and imported as needed; The same would be true for visual modules. Musical GUI elements such as sliders are already visual in nature. There are existing audio/visual systems out in the wild, such as <a href="http://cycling74.com/products/maxmspjitter/">Max/MSP/Jitter</a> and <a href="http://impromptu.moso.com.au/">Impromptu</a>. Various functions and objects designed for music could also be applied to visuals; The same envelope that controls frequency can be used to control the position of a circle:</p>
<pre style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 1.2em; padding-bottom: 16px">
t = 10                          # time = 10 beats
my_circle = Circle(0, 200, 15)  # x position, y position, radius
env = line(0, t, 1)             # start value, duration, end value
sine(1.0, 440 * env)            # amp, frequency
my_circle.xpos(env * 400)       # x position over time
</pre>
<p>The example is a bit crude and omits many practical things, but the idea of syncing visuals with audio is there.</p>
<p>Beyond music and visuals, anything that is time-based would theoretically work in slipmat, providing a module is written.</p>
]]></content:encoded>
			<wfw:commentRss>https://codehop.com/music-and-visuals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
