More lgpt awesomeness and new hardwave.

I have bought new hardware. Hooray!

picsay-1255166248

The new one is the top one, it’s a Dingoo A320 made by Shenzhen Dingoo Digital. The Dingoo is a nice little piece of machinery. A few of the things I like about it are:

  • Opensource’d development enviroment
  • Form factor of a Nes-controller
  • 7hour battery time.
  • It runs LGPT
  • It boots in 4 seconds.
  • It’s supposed to be some sort of  Communistic statement from the Chinese government.

So yes I was really excited to exchange my gp2x f200 with it’s bulky size and long boot time for something younger and slimmer :). After installing a new firmware and a Linux variant called Dingux I was up and running. Hooray. After using it on the train (with a little scare where I could not get audio out from the headphones since I put it in the wrong hole (video out instead of headphones)) I was up and piggin. The awkward placement of the headphone jack wasn’t that awkward after all.

I noticed a few things that wasn’t one hundred percentage super sweet, one was the volume, you couldn’t get the piggy running at a nice volume on the speakers, and you have to exit the piggy, reboot into the original OS to quit.  The first was fixed by mashing X, it is a hidden feature. The second was fixed with a new version of the Linux. Hooray.

What better way to celebrate this then to make a tune from beginning to end? NONE, so I’ve made this song in the style of booring techno with only one note, the note of D. Yup, only D. the note D.

Here’s the lgpt project folder: lgpt_dingo_1
And here’s the song i mp3 format: lgpt_dingo_1

Wooden amp-box.

DSCF2219

This summer me and the kids built a little ghettoblaster I was thinking of bringing to the Norbergfestival. Sadly though I never brought it to the festival, since in it’s current state doesn’t produce enough volume for outdoor-listening (in hi-fi atleast)

DSCF2212

What we did was basically:
* Get a few planks to build the shell.
* Use magnets for the door.
* Using a LOT of glue to isolate the speaker boxes
* Adding foam behind the speakers before sealing of (even more glue)

Here is a little video of when we where  WIP.

DSCF2214

For amplification we first used some 0.5w RubyAmps that are great for smaller amplification projects, unfortunately they where not powerful enough to drive the speaker-elements. So I went and bought a kit from 41hz. 41hz stuff really really rule. To bad I accidentally fired the amplification IC on it when I was putting it inside the box. I orderd a replacement IC pretty fast, but in the mean-time I used two 1w amps I had for some other project. I have made one halfheartedly try to replace the IC on the circuitboard, but I really need to drill the old one away. Perhaps I’ll fix that one day.

For now it is awesome to have it as amp to my computer and or when I work outside. It’s stylish don’t you think?

oh yeah, it’s only 4.6kg

Digital rust, creating a feedback-loop to destroy audio.

So I was not at ease after creating Decompression glitches for sound generation but needed to explore this more. I was thinking that if you could feed the glitched sample back into the algorithm over and over again it could create something nice. something noisy, something full of love. So I did do the necessary changes after the perfect phrase had come to me during almost throwing up while taking the train home from work. You see, I think I had some sort of food poisoning, but the whole time I was thinking left,right,fight out loud in my head, with the sound coming from first left, then right, then both, but overdubbed. So naturally I had to use that for the digital rust test you are about to hear. So without further ramblings here it is in it’s shiny mp3 form.

digital rust example – Left Right FIGHT

Listening to new music every-day.

When I was a teenager I read or got told that your music taste stagnates when you reach 22. That is, you wont listen to anything new, atleast not anything in a new genre when you grow older.

This scared the shit out of me and I promised myself that that would never happen to me.

It hasn’t, but I wonder if it is because of this fear that has made me expand my views or if it is because even though the genres are the same, it is the same type of music I listen to?

Don’t get me wrong, I used to listen to blackmetal and the likes, now I’ve been into breakcore for a while with small doses of grindcore to supply my appetite in distorted guitars.  And I listen to brand new music on my way back and forth to work. I’ve been streamripping from breakcore.free.fr for a long time so I have a lot of music that is totally new to me. And I have like 2h of traveltime every workday.  While that radiostation isnt as rigid in it’s specification of breakcore (but there are some noice, gabba, digital destruction,  booty bass etc) I have a feeling that there is something in common with all the genres and music I like. I have a feeling that there is nothing new, just disguised in different ways, and that I have not moved a bit forward at all since I was a headbanging teenager.

How about that?  Wouldn’t it have been awesome if Pandora could have told me what tag’s I have been listening to over the years and try to get a fix on my taste?

A lazy-dog for little piggy tracker

Littlepiggytracker is a tracker designed for hand held consoles. It’s awesome and I like it a lot. I use it mainly to create beats when I’m on the go. As cool as this is you sometimes need to look up those abbreviation codes for some serious effect-addition. Also when you are new to the piggy it’s nice to have some sort of cheat-sheet, so I made this lazy-dog for myself. And whilst is probably not perfect it has helped me a lot and I still keep it in my GP2X-F200 case and I occasionally look at it.

I wrote it in NeoOffice, which is a OSX-clone/fork of openoffice. I only tell you this so if you want to edit the lgpt-lazydog.odt but for most reasons it’s probably best to get the PDF version: lgpt-lazydog.pdf

Hope you enjoy.

Cow in a can, my entry in the Renoise-compo.

Create Digital Music, a blog about creating digital music, or at least the digital creation of music is co-hosting a music-comp. For more information on the compo please go here or read my short explanation below.

Anyways, you can win a Linux music production studio configured MSI Wind with the music program Renoise on it, and that being the whole mood for the competition you should make a CPU light song in Renoise and apply a license to it that is fairly open.

Me being who I am had to enter. Not that I’m in it to win the computer, nor a Renoise license because I’m perfectly happy with my Mac and I already own a Renoise license. So why then? because it’s fun, and I should really start using Renoise now that I bought it.

The result is “Cow in a can”

cow in a can

As a little disclaimer I want to state that I’m not Australian and I don’t want to mock any Australians. Speaking with an Australian accent seemed to be a good idea at the moment.

Here’s an mp3 of the song: Cow in a can.mp3

And here is the Renoise source file: cow in a can.rns

And if you’re interested in the lyrics, it’s here:

For my 4th birthday I got a cow.
I was very surprised.

First It was small, then it grew.

We had to move her to my uncle’s farm.
There she lived in a barn.

I used to visit her on the holidays.
That was nice.

She really helped me through puberty.
And the occasional breakup.

She became both a mother and a grandmother.

Then one day she had to go.
She had to go where old cows go.

To the slaughterhouse.

I have enjoyed her for many dinners now.

But the freezer broke a while back.

So all I have left of her is in this can of formaldehyde.

This can of cow.

My cow, my friend, I keep you close to my heart.

My cow in a can.

On the green fields in heaven we will be together again.

License:
Creative Commons License
Cow in a can by Johan Larsby is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

Decompression glitches for sound generation.

The art of using compression glitches as visual tools for creating art has been around a some time now. Datamoshing yields many hits, as do glitch. But how could you apply the same effects to audio and get more interesting results then we have to day with the mp3 FFT artifact?

That question was thrown out in a conversation between me and Rosa late one night at Norbergfestivalen. I recently met her when we carpooled to the festival. Anyways, she’s writing her doctorate about these things and that was one of the questions she was thinking about. To bad she addressed that to me, because I started thinking about it also.

I’ve gone through and tried a few things, but none of them sounded very good. Basic RLE decoding of data to a waveform. Fourier compression data corruption test’s. Packaging raw data in a zip-file, change the contest of the zip data, and then re-import the raw-data.   None of these where very interesting, but they are easy to do without any programming. I also listened to the scratched mp3-cd’s I have in my car. Where the most interesting effects where a sort of LP-like stuttering. But not interesting enough.

So what to do to make things a little more interesting? Well one has to look at the problem from another angle I suppose.

I have to create a compression-algorithm that makes more sense to break. Sounds stupid? I guess, but if we cant be stupid for the sake of art or comedy when are we allowed to be stupid?

Right. I came up with a modified RLE-algorithm. It’s pretty basic. waveforms are 2D, and the next sample can move up, down, or not move at all. With that you can compress your data with information on where to move for the next sample, and if there is a pattern to it it’s easy to find and repeat. A triangle example follows the data could be: “move up 1 step for every sample 127 times”.

This can also make for seriously fun glitches if you edit the compressed data, or as nice samples if you  just randomly generate the compressed data.

As you can see below  the implementation is very naive, there are no key frames, the comparison algorithm works by stripping away data (converting from double to float). One could also implement a better RLE that finds patterns. None of this however was very important for me when I wanted to test this idea.

There are a few parameters I’ve been toying around with on a few different wav files. These have yielded results that I’m mildly satisfied with. I don’t know what my expectations where when I started out on this journey, but there has been some success.

I tried it out on a few different sounds, the result’s are a little longer and they don’t share parameters:

trumpet.wav
trumpet_glitched

bicycle_bell
bicycle_bell_glitched

rusty
rusty_glitched

scream_females.wav
scream_females_glitched

I’ve toyed with the parameters in injectErrors() function. as you can se from the commented out code there are a few different things to play with when trying out the algorithm.

Where to go now?

Well I don’t know, perhaps wrap this in a standalone program, look more into other compression techniques  to try out, make a VST out of it. Maybe I’ll just leave it. Possibly I’ll try to make some nice noise songs with this as either a generation device or as an effect on noisy samples. Most possibly I’ll let it mutate itself over time, feeding the same sample back over and over and over and over. Maybe one should try and apply this to MIDI note data. That could be awesome.

#include "stdafx.h"
#include "wav.h"
#include "wav_save.h"
#include  

SoundDataStruct* p_wav;

void compressWaveform()
{
int i;

//first run is to change everything to relative path's
double oldData = p_wav->dataP[0];
p_wav->dataRLEWP[0] = p_wav->dataP[0];
for (i = 1; i < p_wav->length; i++)
{
p_wav->dataRLEWP[i] = oldData - p_wav->dataP[i];
oldData = p_wav->dataP[i];
}

p_wav->keyframedata = (keyFrameStruct*)malloc(sizeof(keyFrameStruct)*(p_wav->length/100));

//add keyframes
int pos=0;
for (i = 1; i < p_wav->length; i+=100)
{
p_wav->keyframedata[pos].data=p_wav->dataP[i];
p_wav->keyframedata[pos].position =i;
pos++;
}
//now we RLE Encode it for real.
int writeplace=0;
for (i = 0; i < p_wav->length; i++)
{
int runLength = 1;
while( i+1 < p_wav->length && (float)p_wav->dataRLEWP[i] == (float)p_wav->dataRLEWP[i+1] ) {
runLength++;
i++;
}
p_wav->dataRLEP[writeplace]=runLength;
writeplace++;
p_wav->dataRLEP[writeplace]=p_wav->dataRLEWP[i];
writeplace++;

}
p_wav->RLELengthP = writeplace;

printf("compression is %d \n",p_wav->length-p_wav->RLELengthP);
}

double clamp(double in)
{
if(in>1.0)
return 1.0;

else if(in<-1.0)
return -1.0;

else return in;
}

void decompressWaveform()
{
int i,x;
int writeplace =0;
int newLength=0;

//find length for the new sample.
for (i = 0; i < p_wav->RLELengthP; i+=2)
newLength+=p_wav->dataRLEP[i];

printf("newLength % = %d \n ",newLength);
p_wav->dataU = (double *)malloc(sizeof(double)*newLength);
p_wav->dataRLEWU = (double *)malloc(sizeof(double)*newLength);

//undo RLE Encoding
for (i = 0; i < p_wav->RLELengthP; i+=2)
{
for(x=0;x<(int)p_wav->dataRLEP[i];x++)
{
p_wav->dataRLEWU[writeplace] = p_wav->dataRLEP[i+1];
writeplace++;
}

}
p_wav->RLEWLengthU = writeplace;
//undo RLEW Encoding
int pos=0;
p_wav->dataU[0]= p_wav->dataRLEWU[0];
for (i = 1; i < p_wav->RLEWLengthU; i++)
{
p_wav->dataU[i] = p_wav->dataU[i-1]+p_wav->dataRLEWU[i];
p_wav->dataU[i] = clamp(p_wav->dataU[i]);
}

}

void compareWaveforms()
{
int i;
if(p_wav->length != p_wav->RLEWLengthU)
{
printf("data not equal\n");
printf("%d\n",p_wav->length);
printf("%d\n",p_wav->RLEWLengthU);

}
for (i = 0; i < p_wav->RLEWLengthU; i++)
{
if(i>p_wav->length)
break;
if(i>p_wav->RLEWLengthU)
break;
}

}
void injectErrors()
{
int i=0;
//randomizing number of repeat's
for (i = 0; i < p_wav->RLELengthP; i+=2)
{
if(rand()%200==1)
{
p_wav->dataRLEP[i]=(rand()%512)+1024;
//         p_wav->dataRLEP[i] -= ((double) (rand() / (double)RAND_MAX)*0.4f)-0.2f;
p_wav->dataRLEP[i] -= ((double) (rand() / (double)RAND_MAX));
}
}
//randomizing data to repeat
for (i = 1; i < p_wav->RLELengthP; i+=2)
{
if(rand()%4000==1)
{
//p_wav->dataRLEP[i] -= ((double) (rand() / (double)RAND_MAX)*0.4f)-0.2f;
}
}
}

void savewav()
{

float calculatedlengthofnewsample = float(p_wav->RLEWLengthU)/44100.0;

Init_save(calculatedlengthofnewsample+1.0);

int i;
for ( i=0; i
RLEWLengthU; i+=1 )
{

SaveWavData(i, p_wav->dataU[i] );
}
Do("temporary.wav"); //save might crash if called to many times
freemeData();
//---------- end render block
}
int _tmain(int argc, _TCHAR* argv[])
{

srand( 1234 );

/* get input wav */
p_wav = (SoundDataStruct*)malloc(sizeof(SoundDataStruct));

wav_init( "bicycle_bell.wav", p_wav );

compressWaveform();
decompressWaveform();
compareWaveforms();

/* the fun begins here*/
injectErrors();
decompressWaveform();
compareWaveforms();

/* save wav */
savewav();

return 0;
}

A few thoughts on the Theremin I bought.

I bought a theremin like two months ago or so. After some initial research I ordered a burns theremin, it has two antennas and is resonably priced. It was shipped almost the same day, so that was nice. The package arrived to me a week/ten day’s or so later.

However, the theremin was a lot smaller then I suspected. It was also not very impressed by the power supply that you could not pop out of a connection. It’s stuck inside. The “documentation” consisted of one paper with a warning that you can burn your new theremin if you plugin the theremin directly. very _little_ information about how to change it. A plug would be much better, that way you could just have gone and bought a wall-wart.

So I cut the powercord and replaced the wall-wart with one that should work, and nothing started burning so I guess I did right.

The sound was awful though, nothing like in the videos on the site. Sounded distorted and the pitch was waaaaay of, and uncontrollable. I had it hooked up to a battery-powered speaker. I also tried with another amp, and headphones. It was not until I tried with a guitar amp that I also hooked to the wall that it did not distort. Also touching any of the ground parts of the cable changes the pitch drastically. This makes me suspect that the grounding in the theremin is lousy.

Still it was almost impossible to play, so I looked up all the how-to videos I could on youtube (remember I was on vacation) and I was supries that as a footnote on one of the videos there was info stating that the theremin had to warmup. Why was that information nowhere in the package I got from burns?

After that it was a bit easier to play, and I got the hang of it, but since the theremin is so small your pitch-hand interferes with the volume antenna and vice verse. that sux.

I tried to add a distortion to make the sound more interesting while playing, but since I was barefoot and the little big fuzz is of metal that bad grounding showed it’s ugly face again.

I’m not that impressed with that theremin and I’m going to sell it as soon as I get around taking a few pictures of it. any takers?

At least I managed to make a song with it, because I was scared after watching drag me to hell.

here it is: Mums filibabba lilla Maja (two theremin voices and drums)

The HC-FA10 was a lie! (but might be a nice bent device)

20090928144116

As many men my age the weight is starting to escalate beyond what is good for once health. To stop this and to be able to measure my progress in doing so. I bought what I thought was a resistive body-fat measure device. However upon first use at the coffee table together with a few colleagues it soon revealed itself that the little device has all the properties and apparent features of being a device that measures the fat in your body by sending electricity through it.  You enter data about yourself such as age, weight, sex and length, then you hold your thumbs on the metallic plates and a progress bar appears, after a while you get your bodyfat in %. So I tried to trick it after we checked our fattnes, me and my colleagues, by wetting my thumbs thus removing resistance. Same % as a result. Then the others tried it, same % as me (on my settings). But when shorting the path it did say error (almost half-clever) . You can let go as soon as the progressbar starts though.

I was fooled, thats the downside.

The upside is that the device has two body contacts, a battery compartment (for a standard CR battery),  a pretty decent screen and a speaker. So perhaps you could put something that makes noise inside it that uses body contacts to make the sound. That could be awesome, using it for what it was intended for isn’t.