The “fictional character” method of loosing weight.

Disclaimer:
My colleague and friend <fictional character> 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 <fictional character> method of loosing weight have nothing to do with the <fictional character> I know.

The Method:
What <fictional character> 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 <fictional character> 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 <fictional character> 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, <fictional character> tells me, is when no-one outright confronts him. When this happens, <fictional character> 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. <fictional character> 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.

Anyways, my friend and colleague <fictional character> is in no way responsible or have anything to do with the above text, for real!

Proof of concept for a new instrument.

Video does not say that much, read the text, and look at the pictures!

 

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? 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.

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.

So I came up with this idea:
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.

This is a map over the isomorphic layout I choose:

So a major chord would be:

and minor:

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?

 

void handleMIDIMessageFromMidiDevice( int status, int data1,int  data2)
{

/*	printf("handleMIDIMessageFromMidiDevice: ");

	printf("status %d | ",status);
	printf("data1 %d | ",data1);
	printf("data2 %d \n",data2);
	*/
    if(status == 144) //NoteOn
    {
        if((data1-12) < 25) //If it's from the padKontrol, let's play
        {
            printf("MyData %d \n",data1-12);
            sendShortToHost(status,(data1-12)+RootNoot,data2);
        }
        else{ //it's from the keyboard, save rootnote
            RootNoot = data1;
        }
    }
    else if(status == 128)//NoteOff
    {
         if((data1-12) < 25)
         {
             sendShortToHost(status,(data1-12)+RootNoot,data2);
         }
    }

}

One thing I found out is that the minor chord could be optimized if I move it to here:

this was an easy fix and as used in the video.

 

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.

More avantgardism

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:

 

and here’s the code:

 

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("lines.png");
  noStroke();
  player = minim.loadFile("mister_mister.mp3");

  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>(9*2))
  {
    cnt=0;
    cntInc+=cntIncIncer;
  }
  if (cntInc > 8)
  {
    img = loadImage("lines2.png");
    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 < 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("frames/########.tif");
  }
  else
  {
    println("DONE");
    noLoop();
  }
}

void keyPressed() {
  println("start!");
  player.play();
  loop();
}

Another glitch-art project, still images, and moving too

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.
So I made a program that does that, just to silence my curiosity.
Here we have two source images:
.    
And this is what they look like remade by each other:
Press them to se them in their full glory.
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.
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.

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.
source after the break:

Nyan cat, on acoustic bass (modified, but not like John Cage’s pianos)

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.

Anyways, if you watch me playing Nyancat (sort of as fast as I can) you will notice a white piece of sugru 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.

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.

 

If you want the tab/score, here it is: nyancat_bass.pdf

 

Fasten your seatbelt

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:

 

or get it here http://soundcloud.com/larsby/fasten-your-seatbelt

VST woes

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 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.

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.

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.

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.

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.

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.

And soon I might release FlyBrain.

Suddenly Twitter

I’ve avoided twitter for a long time, everything except my old bot I have not used or played with Twitter at all. But then Eduardo wanted me in on the open source twitter action at work so I’ve just recently read up on twitter etiquette and reset my password so I can use it.
I’ve also added an automatic tweet to any time I do a post here.

So I was at BBJam in San Jose last week. I had a good time as always on these occasions. Meeting a lot of colleagues I only mail and BBM with otherwise. And even more developers then usual. All with great insights and questions. I worked a lot during the time so I had almost no time to go to Wallmart and have a look at all the huge packs of what ever they are selling, get a few presents and look at a few of the more expressive americans you can se  there.
I got 3 of the one dollar knifes, and they passed TSA and all other security gates on the way home to Sweden. Awesome. I also tried the rootbeer float, eating at Cheescake factory (where Sheldon eats at Tuesdays, and Penny works). I had a huge slushie and a beef jerkie at seven eleven. And when I got home I slept for 17 hours straight.

Now I’m gonna make floats for the kids to se if they like it.

EDIT – The kids do not like Coca Cola with vanilla ice-cream floats. neither does the wife. or me, not really.