the OWL programmable effect pedal on kickstarter, and a competition.

I’ve backed another thing on kickstarter, the OWL.The OWL is an open source, open hardware, reprogrammable effects pedal designed for musicians, coders, and hackers.  While this in itself is very exciting they also have a competition where you can win an extra OWL pedal. The only thing you have to do is to make a program/patch for the pedal in the simulator. This was very fun.

It’s here for you you to listen to: http://soundcloud.com/hoxtonowl/sets/patch-contest my patch’s name is Conny, and you know my name 🙂

I’m not totally sure on how to vote or tell the judges how much you like any of the different patches, but the competition page is here.

[code]
#ifndef __ConnyPatch_hpp__
#define __ConnyPatch_hpp__

#include “StompBox.h”

/* Conny Patch

Made by me, Johan Larsby

Conny was a dog I used to know. He was some sort of mongrel breed that no-one could really pin out what it was. Mostly we think he was a poodle/bulldog mix. But there had to be more in there.
Anyways I wanted to make a distortion that reminds of him, and what better then to mix two different distortions into something new?

The first dist is a variant of a classic waveshaper. I’m sure a gazillion variants can be found around the internet. I borrowed inspiration from www.musicdsp.org

The second dist is really an adaption of a one-line music program that you can read more about here (http://www.larsby.com/johan/?p=1036) but instead of incrementing “t” I use the input sound after some int’ing. There will also be some bit-crunch since.

The A param controls the amount of the first dist.
The B param controls the amount of the second dist.
The C param adds gain to dist2 since I thought it was not LOUD enough
The D param is a wet/dry param.

*/

class ConnyPatch : public Patch {
public:

/* The clip function works to sanitize the data if it’s to big (could happen) it’s cut down to size*/
float clip(float in)
{
if (in > 1.0)
return 1.0;
else if (in < -1.0)
return 1.0;
return in;
}

void processAudio(AudioInputBuffer &input, AudioOutputBuffer &output){
int size = input.getSize();

//Dist 1’s parameter, needed to sanitize by *0.9 or the filter would be quiet. also the waveshaper wants a specific range.
float paramA = getParameterValue(PARAMETER_A)*1.0;
//—float dist1_amount = 2.0*paramA/(1.0-paramA);
float dist1_amount = paramA;

//Dist 2’s parameter, since it’s a bit shift distortion we needed to move the value to an int
float paramB = getParameterValue(PARAMETER_B);
int paramB_int = int(paramB*5.0);

// Gain, you can make the sound 100% louder then it was, but never quiter.
float paramC = (getParameterValue(PARAMETER_C)*2.0)+1.0;

//Dry/wet.
float paramD = getParameterValue(PARAMETER_D);

//Getting the number of samples in the inputstream
float* buf = input.getSamples();

//main loop, let’s have some fun
for(int i=0; i<size; ++i) { //unless we have a silent stream, let’s do some processing. if(buf[i]!=0.0) { // “classic” Waveshaper float dist_1 = (1.0+paramA) * ((buf[i] – paramA) * (((pow (buf[i],buf[i])))*paramA)*abs(buf[i])); // “modern” waveshaper int t= (buf[i]+1.0)*10000; float dist_2 = (t&(-t>>paramB_int)) | ((t<<paramB_int)&(t>>(paramB_int*2))) ;
//moving back to float
dist_2 = (dist_2/10000.0)-1.0;

// this line add’s togheter the dist’s and the dry signal depending on param d. it also add’s gain to dist_2
buf[i] = clip(paramD*(dist_1+(dist_2*paramC)) + ((1.0-paramD)*buf[i] ));
}
}

//give the buffer back so we can hear the beauty.
output.setSamples(buf);
}

};

#endif // __ConnyPatch_hpp__
[code>]

a message from Sean

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 a t-shirt and socks
22:35 “Larsby” and nothing else
22:35 “Larsby” it’s a weird sensation
22:36 “Seaner> lol
22:36 “Seaner> I will try that one

The day after, my afternoon, his morning I got:

15:49 “Seaner” wow, that was a mistake
15:49 “Seaner” I tried your sleeping uniform
15:50 “Seaner” I feel like I am still wearing the socks
16:13 “Larsby” hahahhahaaha
16:13 “Larsby” felt wird right
16:14 “Seaner” it was not good
16:14 “Larsby” what did Lynn say?
16:15 “Seaner” she said you have too much control over me

 

Epic win.

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