<?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>idle hands</title>
	<atom:link href="http://www.larsby.com/johan/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.larsby.com/johan</link>
	<description>A blog about me and stuff that I build or like.</description>
	<lastBuildDate>Thu, 11 Apr 2013 15:20:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>a message from Sean</title>
		<link>http://www.larsby.com/johan/?p=1255</link>
		<comments>http://www.larsby.com/johan/?p=1255#comments</comments>
		<pubDate>Thu, 11 Apr 2013 15:20:13 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1255</guid>
		<description><![CDATA[This is from a conversation I had with Sean. He lives a couple of timezones away. So my evening is his afternoon. 22:34 "Larsby" I need to go to bed now 22:34 "Seaner" I am jealous 22:35 "Seaner" wear pants 22:35 "Seaner" just to mix things up 22:35 "Larsby" from time to time I wear [...]]]></description>
				<content:encoded><![CDATA[<p>This is from a conversation I had with Sean. He lives a couple of timezones away. So my evening is his afternoon.<br />
22:34 "Larsby" I need to go to bed now<br />
22:34 "Seaner" I am jealous<br />
22:35 "Seaner" wear pants<br />
22:35 "Seaner" just to mix things up<br />
22:35 "Larsby" from time to time I wear a t-shirt and socks<br />
22:35 "Larsby" and nothing else<br />
22:35 "Larsby" it's a weird sensation<br />
22:36 "Seaner&gt; lol<br />
22:36 "Seaner&gt; I will try that one</p>
<p>The day after, my afternoon, his morning I got:</p>
<p>15:49 "Seaner" wow, that was a mistake<br />
15:49 "Seaner" I tried your sleeping uniform<br />
15:50 "Seaner" I feel like I am still wearing the socks<br />
16:13 "Larsby" hahahhahaaha<br />
16:13 "Larsby" felt wird right<br />
16:14 "Seaner" it was not good<br />
16:14 "Larsby" what did Lynn say?<br />
16:15 "Seaner" she said you have too much control over me</p>
<p>&nbsp;</p>
<p>Epic win.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1255</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Second iteration of my note input idea.</title>
		<link>http://www.larsby.com/johan/?p=1253</link>
		<comments>http://www.larsby.com/johan/?p=1253#comments</comments>
		<pubDate>Tue, 12 Mar 2013 11:37:21 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1253</guid>
		<description><![CDATA[Second iteration of the idea I described in http://www.larsby.com/johan/?p=1228 I dont feel like sharing source-code yet, but here is a video of it in action, enjoy]]></description>
				<content:encoded><![CDATA[<p>Second iteration of the idea I described in <a href="http://www.larsby.com/johan/?p=1228">http://www.larsby.com/johan/?p=1228</a></p>
<p>I dont feel like sharing source-code yet, but here is a video of it in action, enjoy</p>
<p><iframe src="http://www.youtube.com/embed/TV88iXqKmYo" height="480" width="640" allowfullscreen="" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1253</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A video tutorial on how to make sauerkraut saft</title>
		<link>http://www.larsby.com/johan/?p=1243</link>
		<comments>http://www.larsby.com/johan/?p=1243#comments</comments>
		<pubDate>Fri, 22 Feb 2013 14:13:03 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1243</guid>
		<description><![CDATA[I've seen a lot of videos of people drinking sauerkrautsaft, but not any videos on how to make the juicy deliciousness. &#160;]]></description>
				<content:encoded><![CDATA[<p>I've seen a lot of videos of people drinking sauerkrautsaft, but not any videos on how to make the juicy deliciousness.</p>
<p>&nbsp;<br />
<iframe src="http://www.youtube.com/embed/Zt5_OH1K3_c" frameborder="0" width="640" height="480"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1243</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The &#8220;fictional character&#8221; method of loosing weight.</title>
		<link>http://www.larsby.com/johan/?p=1233</link>
		<comments>http://www.larsby.com/johan/?p=1233#comments</comments>
		<pubDate>Thu, 21 Feb 2013 18:43:45 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1233</guid>
		<description><![CDATA[Disclaimer: My colleague and friend &#60;fictional character&#62; is in no way affiliated with this method to loose weight. He has nothing at all to do with it. He has never ever ever done anything to do with this technique. Let me repeat, The &#60;fictional character&#62; method of loosing weight have nothing to do with the &#60;fictional character&#62; I [...]]]></description>
				<content:encoded><![CDATA[<p>Disclaimer:<br />
My colleague and friend &lt;fictional character&gt; is in no way affiliated with this method to loose weight. He has nothing at all to do with it. He has never ever ever done anything to do with this technique. Let me repeat, The &lt;fictional character&gt; method of loosing weight have nothing to do with the &lt;fictional character&gt; I know.</p>
<p>The Method:<br />
What &lt;fictional character&gt; usually does when he wants to loose weight is pretty specialised to Sweden. In Sweden we like to queue, and we are good at it. We know how to queue. Around the world I think russians have that reputation, but in reality it's Swedes that have perfected standing in line. Just search the internet and you will find many a tales about Swedes and line standing. So not following the queue line is taboo. It's unheard of. You will get pointers to rectify your crazy behaviour. You will be educated. Now why do I talk about this when I should talk about the method? Well it involves queues. This is what &lt;fictional character&gt; does, he walks over to the a bus-hub. Simply a place in Malmö where there are a lot of busses going back and forth and several places to stand in line waiting for the bus. There &lt;fictional character&gt; locates the longest queue, and cuts it. He get's in in front of everyone. Chaos ensues. Some people just mutters and clench their fists in their pockets. Some make snide comments, and some even confronts him. The most stressful times, &lt;fictional character&gt; tells me, is when no-one outright confronts him. When this happens, &lt;fictional character&gt; tells me, is when he looses the most weight. The social stigma he catches the onslaught of is so stressful that his body goes into overdrive. &lt;fictional character&gt; of course have a lot of statistic to back this up. Although his social anthropological experiment have almost ended with disaster a few times. But a bit of running and hiding will also help you loose weight, apparently. If you try this or something similar in the culture you live in, please write the story or post a link to the story in the comments.</p>
<p>Anyways, my friend and colleague &lt;fictional character&gt; is in no way responsible or have anything to do with the above text, for real!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1233</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proof of concept for a new instrument.</title>
		<link>http://www.larsby.com/johan/?p=1228</link>
		<comments>http://www.larsby.com/johan/?p=1228#comments</comments>
		<pubDate>Fri, 04 Jan 2013 19:40:17 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1228</guid>
		<description><![CDATA[Video does not say that much, read the text, and look at the pictures! &#160; I have a proposition for a new type of controller for playing and recording chords. It's based on isomorphic input and the usual keyboard. And no it's not an accordion. Why do I think me and the world needs this? [...]]]></description>
				<content:encoded><![CDATA[<p>Video does not say that much, read the text, and look at the pictures!</p>
<p><iframe src="http://www.youtube.com/embed/Cj-kuceQgYY" frameborder="0" width="640" height="480"></iframe></p>
<p>&nbsp;</p>
<p>I have a proposition for a new type of controller for playing and recording chords. It's based on isomorphic input and the usual keyboard. And no it's not an accordion.</p>
<p>Why do I think me and the world needs this? Because recording and editing chords on the computer is tedious and boring. Even when applying all the tricks I know in Ableton Live I still lack a way to fast and easy add a walking chord or a strum like one. And if I program one and then transpose it I would have to redo it for every single clone if I want to change a little something. Not to mention the human feel that you get while playing something rather then programming it.</p>
<p>This became apparent to me while learning to play the bass, I could reuse the same pattern if I knew the base note. This kicked ars, but basses are hard to strum on, and even harder to make into MIDI data. So I found the isomorphic input method appealing, but the cheapest keyboard was still expensive. So I was thinking about making one cheaper, and that would not be done unless there where significally less buttons.</p>
<p>So I came up with this idea:<br />
Using a one octave keyboard to choose the root-note, and then a isomorphic keyboard that is velocity sensitive. That way I would only need 12 velocity sensitive buttons and 12 keys for the note-selection.</p>
<p>This is a map over the isomorphic layout I choose:</p>
<p><a href="http://www.larsby.com/johan/wp-content/uploads//mididata.png"><img class="alignnone size-medium wp-image-1234" title="mididata" src="http://www.larsby.com/johan/wp-content/uploads//mididata-300x225.png" alt="" width="300" height="225" /></a></p>
<p>So a major chord would be:</p>
<p><a href="http://www.larsby.com/johan/wp-content/uploads//major.png"><img class="alignnone size-medium wp-image-1235" title="major" src="http://www.larsby.com/johan/wp-content/uploads//major-300x225.png" alt="" width="300" height="225" /></a></p>
<p>and minor:</p>
<p><a href="http://www.larsby.com/johan/wp-content/uploads//minor.png"><img class="alignnone size-medium wp-image-1236" title="minor" src="http://www.larsby.com/johan/wp-content/uploads//minor-300x225.png" alt="" width="300" height="225" /></a></p>
<p>To test this idea I wrote a little program based using a KORG padKONTROL as velocity editing and a rockband keytar as MIDI-input device. This was way faster and cheaper then starting to solder something together, and I get to get a feeling for it before trying to fix hardware problems like, how should it look, should it be strapped or more like a piano, is 12 buttons correct?</p>
<p>&nbsp;</p>
<pre class="wp-code-highlight prettyprint">void handleMIDIMessageFromMidiDevice( int status, int data1,int  data2)
{

/*	printf(&quot;handleMIDIMessageFromMidiDevice: &quot;);

	printf(&quot;status %d | &quot;,status);
	printf(&quot;data1 %d | &quot;,data1);
	printf(&quot;data2 %d \n&quot;,data2);
	*/
    if(status == 144) //NoteOn
    {
        if((data1-12) &amp;lt; 25) //If it&#039;s from the padKontrol, let&#039;s play
        {
            printf(&quot;MyData %d \n&quot;,data1-12);
            sendShortToHost(status,(data1-12)+RootNoot,data2);
        }
        else{ //it&#039;s from the keyboard, save rootnote
            RootNoot = data1;
        }
    }
    else if(status == 128)//NoteOff
    {
         if((data1-12) &amp;lt; 25)
         {
             sendShortToHost(status,(data1-12)+RootNoot,data2);
         }
    }

}</pre>
<p>One thing I found out is that the minor chord could be optimized if I move it to here:</p>
<p><a href="http://www.larsby.com/johan/wp-content/uploads//newlayout.png"><img class="alignnone size-medium wp-image-1237" title="newlayout" src="http://www.larsby.com/johan/wp-content/uploads//newlayout-300x225.png" alt="" width="300" height="225" /></a></p>
<p>this was an easy fix and as used in the video.</p>
<p>&nbsp;</p>
<p>Next steps could possibly be to make dedicated hardware, should it be drum-type buttons to mash on or should it be something else, should I strap it on like a keytar or should it be stationary like a piano. is it more comfortable to play the keyboard with left hand or should that be right hand. So many questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1228</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>More avantgardism</title>
		<link>http://www.larsby.com/johan/?p=1201</link>
		<comments>http://www.larsby.com/johan/?p=1201#comments</comments>
		<pubDate>Thu, 03 Jan 2013 23:35:01 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1201</guid>
		<description><![CDATA[I made a small John Cage-ish piano tune, and then I programmed a video for it, nothing huge. Just wanted to learn a little about opengl in processing. Anyway, here it is: &#160; and here's the code: &#160; import ddf.minim.*; Minim minim; AudioPlayer player; PImage img; int diff = 40; int daff = 40; void [...]]]></description>
				<content:encoded><![CDATA[<p>I made a small John Cage-ish piano tune, and then I programmed a video for it, nothing huge. Just wanted to learn a little about opengl in processing.</p>
<p>Anyway, here it is:<br />
<iframe src="http://www.youtube.com/embed/4ruCKP7aOdY" frameborder="0" width="853" height="480"></iframe></p>
<p>&nbsp;</p>
<p>and here's the code:</p>
<p>&nbsp;</p>
<pre class="wp-code-highlight prettyprint">
import ddf.minim.*;

Minim minim;
AudioPlayer player;


PImage img;
int diff = 40;
int daff = 40;

void setup() {
  minim = new Minim(this);

  size(640, 360, P3D);
  frameRate(20);
  img = loadImage(&quot;lines.png&quot;);
  noStroke();
  player = minim.loadFile(&quot;mister_mister.mp3&quot;);

  noLoop();
}

float cnt =0;
float cntInc =0.05;
float cntIncIncer =0.05;

void draw() {
  background(0);

  int  trianglesize = width-(diff*2);
  int meanpos = height-diff;

  daff = (int)random(4);
  beginShape();

  cnt+=cntInc;
  if (cnt&gt;(9*2))
  {
    cnt=0;
    cntInc+=cntIncIncer;
  }
  if (cntInc &gt; 8)
  {
    img = loadImage(&quot;lines2.png&quot;);
    cntIncIncer-=cntIncIncer*2.0;
  }

  texture(img);
  vertex(width/2, diff, 0, (300/2)+cnt, 0+cnt);
  vertex(0+diff, height-diff, 0, 0+cnt, 300+cnt);
  for (int i = 0; i &lt; player.bufferSize() - 1; i+=1)
  {
    float x1 = map( i, 0, player.bufferSize(), 0, trianglesize );
    float x2 = map( i+1, 0, player.bufferSize(), 0, trianglesize );
    vertex( x1+diff, meanpos + player.left.get(i)*  ((cntInc*3)+10), 0, 00+cnt, 300+cnt);
    vertex( x2+diff, meanpos + player.left.get(i+1)*((cntInc*3)+10), 0, 00+cnt, 300+cnt);
  }
  vertex(width-diff, height-diff, 0, 00+cnt, 300+cnt);

  endShape();
  if (player.isPlaying())
  {
    saveFrame(&quot;frames/########.tif&quot;);
  }
  else
  {
    println(&quot;DONE&quot;);
    noLoop();
  }
}

void keyPressed() {
  println(&quot;start!&quot;);
  player.play();
  loop();
}

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1201</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Another glitch-art project, still images, and moving too</title>
		<link>http://www.larsby.com/johan/?p=1192</link>
		<comments>http://www.larsby.com/johan/?p=1192#comments</comments>
		<pubDate>Mon, 03 Dec 2012 20:49:38 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1192</guid>
		<description><![CDATA[I had a thought, what if you take an image and divide it in small squares and index those squares. Then take another image and chunk that up aswell. Then try to find the chunk that looks most like the current chunk from the old image, and paint that chunk from the source image to [...]]]></description>
				<content:encoded><![CDATA[<div>I had a thought, what if you take an image and divide it in small squares and index those squares. Then take another image and chunk that up aswell. Then try to find the chunk that looks most like the current chunk from the old image, and paint that chunk from the source image to the destination. Sounds complicated? it's not, pretend you're making a mosaic with pieces of an other mosaic. The images are chunks are compared as black and white 16 grayscale versions of themselves. If you know mpeg encoding this is sort of like that, but naive and badly done.</div>
<div></div>
<div>So I made a program that does that, just to silence my curiosity.</div>
<div></div>
<div>Here we have two source images:<br />
.<a href="http://www.larsby.com/johan/wp-content/uploads//newginal.png"><img class="alignnone size-medium wp-image-1205" title="newginal" src="http://www.larsby.com/johan/wp-content/uploads//newginal-300x225.png" alt="" width="300" height="225" /></a>    <a href="http://www.larsby.com/johan/wp-content/uploads//test1.png"><img class="alignnone size-medium wp-image-1206" title="test1" src="http://www.larsby.com/johan/wp-content/uploads//test1-300x225.png" alt="" width="300" height="225" /></a></div>
<div></div>
<div>And this is what they look like remade by each other:</div>
<div></div>
<div><a href="http://www.larsby.com/johan/wp-content/uploads//92-0001.png"><img class="alignnone size-medium wp-image-1204" title="92-0001" src="http://www.larsby.com/johan/wp-content/uploads//92-0001-300x225.png" alt="" width="300" height="225" />    </a><a href="http://www.larsby.com/johan/wp-content/uploads//112-0001.png"><img class="alignnone size-medium wp-image-1207" title="112-0001" src="http://www.larsby.com/johan/wp-content/uploads//112-0001-300x225.png" alt="" width="300" height="225" /></a></div>
<div>Press them to se them in their full glory.</div>
<div></div>
<div>Of course you can change parameters such as size of the chunks, the input image, how long to look before finding a chunk that looks similar enough.</div>
<div></div>
<div>Then what if you substitue the second image for a movie, making a movie from just one image. Then what if you feed the movie with a frame from itself, how would that work? I made a small movie here where first the testshot is uneffected, then different sources and feeding itself also.</div>
<div></div>
<p><iframe src="http://www.youtube.com/embed/N3wZlRwru_U" frameborder="0" width="640" height="480"></iframe></p>
<div></div>
<div>Apart from that, there are a lot of weird things you could use this for. What if you feed one movie into another. How would that look. Who would own copyright? Could you juxtapose things together? Things that are opposites? What if you applied regular glitch techniques on one of these images? For you dear reader, I publish the source code so you can use it and explore further into the depths of whatever this is.</div>
<div></div>
<div>source after the break:</div>
<div></div>
<div><span id="more-1192"></span></div>
<pre class="wp-code-highlight prettyprint"> 
import processing.video.*;

PImage img;

PImage oldImage; //the original that we take the chunks from
PImage newImage; //our new image that we want to remake with chunks from oldImage
PImage tmp; //tmp image that I write stuff to

int CHUNK = 8; //size of the chunks
int SPEEDSTEPPER = CHUNK*100; //in case we are lazy and do not want to wait
float frameplace =0.0;

Movie myMovie;
MovieMaker mm;

boolean fast = false;

float fps = 29.0;

HashData[] myHashData;// = new HashData[0];

int currenthashPos=0;

public void initOriginal(String filename)
{
  currenthashPos=0;
  img = loadImage(filename);
  oldImage = loadImage(filename);
  img.filter(GRAY);

  myHashData = new HashData[(img.width)*(img.height)];
  for (int i = 0; i &amp;lt; ((img.width)*(img.height)); i++)
  {
    // Using the short version of the constructor
    myHashData[i] = new HashData();
  }

  for (int x = 0; x &amp;lt; (img.width)-CHUNK; x++)  
    for (int y = 0; y &amp;lt; (img.height)-CHUNK; y++) 
      haschImage(x, y);
}

public void initOriginal(PImage imageIN)
{

  currenthashPos=0;
  //img = imageIN;
  //oldImage = imageIN.copy;
  img.copy(imageIN, 0, 0, width, height, 0, 0, width, height) ;
  oldImage.copy(imageIN, 0, 0, width, height, 0, 0, width, height) ;

  //img.filter(GRAY);

  myHashData = new HashData[(img.width)*(img.height)];
  for (int i = 0; i &amp;lt; ((img.width)*(img.height)); i++)
  {
    // Using the short version of the constructor
    myHashData[i] = new HashData();
  }

  for (int x = 0; x &amp;lt; (img.width)-CHUNK; x++)  
    for (int y = 0; y &amp;lt; (img.height)-CHUNK; y++) 
      haschImage(x, y);
}

public void setup() {
  size(640, 480, P2D);
  tmp= new PImage(width, height);
  String filename =  day()+hour()+minute()+&quot;_c&quot;+int(CHUNK)+&quot;_s&quot;+int(SPEEDSTEPPER)+&quot;.mov&quot;;
  mm = new MovieMaker(this, width, height, filename);
  println(filename);
  //  initOriginal(&quot;test1.png&quot;);
  initOriginal(&quot;flair-test2.png&quot;);

  myMovie = new Movie(this, &quot;solid.mov&quot;);
  myMovie.pause();
}

public void convertOneMovie(PImage imgInLALA)
{

  PImage tempimg = new PImage(640, 480);
  tempimg.copy(imgInLALA, 0, 0, width, height, 0, 0, width, height) ;

  //--------------------
  // convert in image
  tempimg.filter(GRAY);

  tempimg.loadPixels();
  oldImage.loadPixels();
  int oldCurrent = (CHUNK*CHUNK);
  int currentFOUND=0;
  boolean found = false;

  for (int x = 0; xcurrenthashPos)
          break; // I made a calculus error, let&#039;s just go with the last found

        int current = tmphash.compare(myHashData[i]) ;

        if (current == 0)
        {

          tmp.copy(oldImage, myHashData[i].posX, myHashData[i].posY, CHUNK, CHUNK, tmphash.posX, tmphash.posY, CHUNK, CHUNK)  ;

          tmp.updatePixels();
          found = true;
          break;
        }
        else if (current &amp;lt; oldCurrent)
        {
          oldCurrent = current;
          currentFOUND = i;
          if (current &amp;lt; 10) //crap, let&#039;s go, it&#039;s probably good enough
            break;
        }
      }
      if (found == false)
      {

        tmp.copy(oldImage, myHashData[currentFOUND].posX, myHashData[currentFOUND].posY, CHUNK, CHUNK, tmphash.posX, tmphash.posY, CHUNK, CHUNK)  ;
      }
      // image(tmp, 0, 0);
      // mm.addFrame();
    }

    // image(tmp, 0, 0);
    // mm.addFrame();
  }
}

public HashData haschSection(PImage inImage, int startx, int starty)
{
  HashData toReturn = new HashData();
  int cnt=0;
  toReturn.posX=startx;
  toReturn.posY=starty;

  inImage.loadPixels();
  for (int x = 0; x &amp;lt; CHUNK; x++) {
    for (int y = 0; y &amp;lt; CHUNK; y++) {
      int loc = (x+startx) + (y+starty) * width;
      toReturn.numbers[cnt] = byte(map(int(red(inImage.pixels[loc])), 0, 255, 0, 16));  
      cnt++;
    }
  }
  inImage.updatePixels();
  return toReturn;
}

public void haschImage( int startx, int starty)
{

  myHashData[currenthashPos].posX=startx;
  myHashData[currenthashPos].posY=starty;

  int cnt=0;
  img.loadPixels();
  for (int x = 0; x &amp;lt; CHUNK; x++) {
    // Loop through every pixel row
    for (int y = 0; y &amp;lt; CHUNK; y++) {       int loc = (x+startx) + (y+starty) * img.width;       myHashData[currenthashPos].numbers[cnt] = byte(map(int(red(img.pixels[loc])), 0, 255, 0, 16));         cnt++;     }   }   img.updatePixels();   currenthashPos++; } void draw() {   background(0);   // only when feeding itself initOriginal(myMovie);   frameplace+=1.0/fps;   myMovie.stop();   myMovie.jump(frameplace);   myMovie.read();   //   myMovie.pause();   // convertOne(&quot;newginal.png&quot;);   convertOneMovie(myMovie);   image(tmp, 0, 0);   mm.addFrame();   // saveFrame(day()+hour()+minute()+second()+&quot;-####.png&quot;);   println(&quot;MADE ONE FRAME :&quot;+frameplace+&quot;/&quot;+myMovie.duration());   //noLoop();   if (frameplace &amp;gt;myMovie.duration())
  {
    noLoop();
    mm.finish();
    println(&quot;the end&quot;);
  }
}

void keyPressed() {
  if (key == &#039; &#039;) {
    // Finish the movie if space bar is pressed
    mm.finish();
    // Quit running the sketch once the file is written
    exit();
  }
}

class HashData // By tradition, class names start with an initial uppercase letter
{
  int posX;
  int posY; // Position
  byte[] numbers = new byte[(CHUNK*CHUNK)]; 
  HashData()
  {
    //println(&quot;created&quot;);
  }
  int compare(HashData cmp)
  {
    int toreturn = (CHUNK*CHUNK);
    //println(&quot;toreturn &quot;+toreturn);

    for (int i =0;i</pre>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1192</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nyan cat, on acoustic bass (modified, but not like John Cage&#8217;s pianos)</title>
		<link>http://www.larsby.com/johan/?p=1187</link>
		<comments>http://www.larsby.com/johan/?p=1187#comments</comments>
		<pubDate>Sun, 18 Nov 2012 17:57:01 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1187</guid>
		<description><![CDATA[So, I've been learning to play the bass, with an acoustic bass non the less. Why? because it's harder, as in you need more muscles. That way I figured that playing electric bass or any other form of guitar would be super easy. And I've done some testing, and it is. What's been keeping me [...]]]></description>
				<content:encoded><![CDATA[<p>So, I've been learning to play the bass, with an acoustic bass non the less. Why? because it's harder, as in you need more muscles. That way I figured that playing electric bass or any other form of guitar would be super easy. And I've done some testing, and it is. What's been keeping me back though is the eternal pain I have in the finger I accidently carved of a piece of in the router. The nail is not growing properly and I miss support and it's always sore. But nevermind that, art that you dont suffer for is not art worth making. erhm right.</p>
<p>Anyways, if you watch me playing Nyancat (sort of as fast as I can) you will notice a white piece of <a href="https://sugru.com">sugru</a> and you might wonder what it is? well it's a piece of moldable plastic that turns hard. I use it as a thumb rest, makes it easier for my fingers to find their proper place without me looking, muscle memory FTW.</p>
<p>anyways, I just wanted everyone to know that this is the level of speed and accuracy I'm at right now. No timestretching has been made to make me look like I hit the timing better, but boy has it been hard not to.</p>
<p>&nbsp;</p>
<p>If you want the tab/score, here it is: <a href="http://www.larsby.com/johan/wp-content/uploads//nyancat_bass.pdf">nyancat_bass.pdf</a></p>
<p>&nbsp;</p>
<p><iframe src="http://www.youtube.com/embed/tGoYhHJbXOY" frameborder="0" width="640" height="480"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1187</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fasten your seatbelt</title>
		<link>http://www.larsby.com/johan/?p=1181</link>
		<comments>http://www.larsby.com/johan/?p=1181#comments</comments>
		<pubDate>Sat, 10 Nov 2012 19:32:28 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1181</guid>
		<description><![CDATA[I know I know, I dont write here enough, but there is epic stuff in the pipe. No as epic as this next song that have been several years in the making. Several different cars tested. Several different weight and balances tested to get the exact right wight to trigger the seatbelt sound. When I [...]]]></description>
				<content:encoded><![CDATA[<p>I know I know, I dont write here enough, but there is epic stuff in the pipe. No as epic as this next song that have been several years in the making. Several different cars tested. Several different weight and balances tested to get the exact right wight to trigger the seatbelt sound. When I got the make of car, I needed the correct version of the sound. I would probably never be done with this musical piece if I where a coward towards modifying car electronics or if I had only a healthy monolomania. Joking aside here's the song:</p>
<p>&nbsp;</p>
<p><iframe src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F66902631&amp;show_artwork=true" frameborder="no" scrolling="no" width="100%" height="166"></iframe></p>
<p>or get it here <a href="http://soundcloud.com/larsby/fasten-your-seatbelt">http://soundcloud.com/larsby/fasten-your-seatbelt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1181</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VST woes</title>
		<link>http://www.larsby.com/johan/?p=1179</link>
		<comments>http://www.larsby.com/johan/?p=1179#comments</comments>
		<pubDate>Sun, 07 Oct 2012 12:01:06 +0000</pubDate>
		<dc:creator>Johan Larsby</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.larsby.com/johan/?p=1179</guid>
		<description><![CDATA[So I make VST's on my spare time, mainly for my own musical adventures, but I usually get them to some sort of state and publish them on www.shuriken.se. But see, I had my laptops stolen half a year ago, and I lost half of the VST I was working on. More specifically the training [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.larsby.com/johan/wp-content/uploads//Screen-Shot-2012-10-07-at-1.58.57-PM.png"><img class="alignnone size-full wp-image-1182" title="Screen Shot 2012-10-07 at 1.58.57 PM" src="http://www.larsby.com/johan/wp-content/uploads//Screen-Shot-2012-10-07-at-1.58.57-PM.png" alt="" width="524" height="207" /></a></p>
<p>So I make VST's on my spare time, mainly for my own musical adventures, but I usually get them to some sort of state and publish them on <a href="http://www.shuriken.se">www.shuriken.se</a>.</p>
<p>But see, I had my laptops stolen half a year ago, and I lost half of the VST I was working on. More specifically the training part of a neural network "learn how to imitate effects" type thing. I kept the VST source on another backup, so that was still safe.</p>
<p>Three days ago I wanted to compile that VST just to use it some, and then probably publish it onto the world. Just for fun. It does not sound very good. And then perhaps take it from the tiny proof it is now to something a bit more useful. with better networks and larger brains.</p>
<p>Here comes the trouble though. Xcode 4.whatever I'm using now does not have the 10.6 SDK installed. VST-GUI 2.whatever I'm using needs 10.6 to compile.</p>
<p>You cant install earlier xcodes on your computer, and uprading to VSTGUI3 will take more time and effort then I felt I wanted to put in.</p>
<p>The solution three nights later was to download xcode 3.2.6 look in the hidden folder called packages, find the 10.6 SDK installer .pkg. Install that sucker on my system and then lift it into the xcode app folder.</p>
<p>I'm just gonna leave this here so I remember this on my next computer when I'm angrily trying to remember what I did to make this work the last time.</p>
<p>And soon I might release FlyBrain.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.larsby.com/johan/?feed=rss2&#038;p=1179</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
