Code Like A Girl

The last week has been a bit bonkers, as I’ve been trying to fit work around helping a good friend with a family crisis. I haven’t got as much done as I would have liked, but some things are just more important, and I’ve still been able to make a little progress.

Over last weekend, I wrote an article for an online publication called Code Like A Girl, which you may possibly have heard of if you’re interested in encouraging more girls to do STEM subjects, or you’re a bit of a computer geek. During the week, there has been communication with the editorial team, minor changes made, and they have published it this evening.  The article is a bit of a mashup of a couple of the articles in this blog, and describes how I made the video for Sunrise but I thought I’d share it here anyway as I’m feeling somewhat chuffed to have been included on their writing team and had an article published about my work.  I anticipate writing at least another article about a different video I’ve made with a similar technique, maybe going into a little more depth about the code this time.

Fractals for fun?

The last week or so, as well as working on the mixes for my first album, I decided to have a look into fractals as it seemed like a logical next step from the graphics animations I have been working on so far. I found that Wikipedia has a lot of good resources, but probably has too much detail for a beginner, if you follow all the rabbit holes it leads you down like I did.  A far better introduction was this Youtube video, which brought together pretty much everything I’d read to date and then some.

At least some of the more visually appealing fractal patterns are constructed using maths that involves the square root of minus one, eg Mandelbrot and Julia sets. Those sets also looked as though they were not going to be easy to animate, as it looks like the whole image is calculated pixel by pixel, with the colour of each pixel set by how long it took to reach a threshold value.

There are some (more basic) fractals that were more easy to understand, however, such as the Cantor set and the Sierpinski carpet, which are made by an iterative process. The Cantor set is a set of lines with the middle section taken out. Then you rinse and repeat, taking the middle section of the new lines away for the next iteration. The Sierpinski curve does something fairly similar, but with rectangles. I could see a way through the fog for programming visuals for these types of fractals in Processing, and have incorporated some of these into a new set of visuals for displaying during my next live gig.

Vorsprung Durch Technik

After some more headbutting and reaching a point where I didn’t think I would be able to solve the original problem of routing live sound through a self-programmed music visualiser, I went back to basics. Ditching the sound module provided on the Creative Programming course, I looked into Processing’s own sound library using the online documentation.

And bingo, using the available sample code in the online tutorial, I suddenly had something that was responding to input from the soundcard. Just like that. The graphics were terrible – just a fuzzy line at the bottom of the screen, but the body was still twitching, so to speak.

So, moving on from there, I’ve incorporated the relevant commands into the visualiser code, and developed the graphics further to create something workable. The short video here is just a teaser: I want to keep the full graphics for live shows.  Here, output from Ableton Live Lite is being picked up by the visualiser from the signal going through the soundcard, and processed on the fly.