Glitch Art

The time between posts is definitely not a sign of Processing inactivity, rather the exact opposite! Been so busy with several experiments that I just haven’t found the time to post vids and/or write about my code adventures. But here is a little write-up for my latest animation called Subliminal Glitch. I’ve been interested in glitch art for a while now. A discussion in the forum finally gave me the right push to start experimenting with glitch art in Processing. Aesthetically my final animation is probably closer to datamoshing and compression artifacts, than to glitch art resulting from replaced bytes in an image. Of course, technically it’s not pure malfunction glitching, but rather a re-creation or mimicking of the aesthetics of the glitch using different techniques and functions in Processing. There are many existing Processing functions that can be useful for this purpose, for example get(), set(), filter(), blend(), tint() and the pixels array in combination with bitshifting.

My animation has two main layers. First, the ‘normal’ image. This is mainly made up of the typography and a particle system that has color-based collision. Simply stated, the particles stay either inside or outside the letters and they bounce of ‘em when they get to close. The second part, is the glitch system. I used object-oriented programming to write it, which means a glitchObject can easily be added to and run on top of another (read: any other) sketch to create these effects.  🙂

The glitchObject consists of a series of glitch-functions, which are sequentially (and thus cumulatively) applied to the image. I just started writing the first glitch and gradually added more and more. Slowly increasing the complexity and unpredictability of the result. Funnily enough, things started to get interesting fairly quickly. Of course, you could add as many glitches as you want. In this preliminary experiment, eleven glitches are applied. Of these, seven are getSetGlitches (randomly copying parts of the image to somewhere else), two are elementGlitches (adding horizontal and diagonal lines) and two are colorGlitches (filters for inverting and dilating the image). So the bulk is in the get() and set() functions right now. I know these functions are not ideal. But it was just the easiest and fastest way to write it for me in an experimental phase. Therefore the program is completely unoptimized and in fact very inefficient. To improve the speed, you’d probably want to replace all the get-sets and color effects by pixel arrays and bitshifting. However these can be a little less intuitive. At least for me they’re still quite enigmatic, so that would need some investigating on my part before I can really use them.

I’m running the application at a full HD resolution of 1920×1080. Right now framerate isn’t optimal, but this really results in an interesting side effect when recording to a movie. Because when the movie is played, it blasts through at an enormous pace! For the video I wanted something energetic anyway, so I coupled the visuals with a mixtape. I then increased the pitch and speed up to 160%! Of course this video absolutely kills Vimeo compression. But luckily this suits the subject perfectly.

Links related to this post:

  1. Vimeo Video
  2. Flickr Set
8 Responses to “Glitch Art”
  1. Iman Moradi says:

    gorgeous, love the soundtrack you’ve chosen as well! nice one.

    • Amnon says:

      Thanks Iman,

      I tried out a bunch of tracks at different speeds, but this one fitted best of all 😀 Since I’m still very much in a learning process, I tend to jump from one experiment to the next. But I’m sure at some point of the cycle I’ll return here and work on, cause the aesthetics really resonate with me.

      PS Let me know if you need contributions for a new book. It would be really cool to be a part of that! 😉

  2. Justin says:

    This is extremely cool. I had the same idea to create a pixel manipulation Object to use in my sketches after seeing this image from Kim Asendorf

    I need to practice code more. =)

    • Amnon says:

      Thanks Justin!

      Yeah, pixel sorting (like Kim is doing) is on my to-do-list as well. Love the visual effect he achieves with it.

      I’m currently working on time manipulation apps (slitscanning and such) which also require shifting massive amounts of pixels around, not within one image, but throughout time 🙂

  3. Matt says:

    would you mind sharing some of your code? Keep up the good work!

    • Amnon says:

      This was over a year ago, so the stuff I was doing then was pretty simple. Let me just give a few examples of the glitch functions I used. It was just about stacking a bunch of them together.

        int r(int a){
          return int(random(a));
        void getSetGlitch3() {
          for (int i=0; i<10; i++) {
            int x = r(width);
            int y = r(height);
        void elementGlitch2() {
          if (frameCount%(r(250)+1) == 0) {
            int lineDensity = int(noise(frameCount)*width);
            for (int i=0; i<width*1.5; i+=lineDensity) {
Check out what others are saying...
  1. […] I did find this pretty cool glitchiness written in Processing, by Amnon: […]

  2. […] HQ stills @ Blog post @ […]

%d bloggers like this: