Tuesday, 20 March 2018

Art Hackathon - "I Want To Believe"

The first hackathon we did last year was very popular, and there was demand for another.

The theme of this one was "I Want To Believe" - which some of us interpreted as an X-Files reference, with connotations of aliens, government conspiracies, monsters and unexplained phenomena.



Group Mix

I was really pleased that again we're attracting complete beginners to coding, and members who are artists and are experimenting with technology and code.

We will always maintain a beginner friendly feel to our events.

I was also pleased to welcome female technologists - I know that many meet up groups are working hard to make sure they don't inadvertently signal that only boys are welcome.


P5js and OpenProcessing

Over the last year we've explored different environments and languages for creative coding. The one that emerged as the most beginner friendly was Processing. The web version p5js is very useful because it allows work to be viewed in a browser - which is the most open and accessible technology platform on the planet.

Even better, openprocessing.org allows us to code in the web too - removing the hassle of source code files and installing and configuring libraries and environments. Creative coding becomes as simple as typing code into a web browser and clicking "run" to see the results.

Sharing work is supremely easy - you just save your work and share the web URL. That allows others to see your code and the resulting image/animation it creates. Overall this supports the open source ethos of sharing your work, and how you work.

For beginners, I've not found anything easier than openprocessing.


Organisation

The first hackathon was organised with very little experience of organising similar events. It went well but we were conscious of some feedback and things we could do better.

This time we tried to identify those who:

  • were more experienced and were willing to help others.
  • were very new and wanted some help or guidance.
  • who wanted to work alone or in groups.

A quick introduction to openrprocessing and sharing links was thought to be helpful. A link to our previous gentle introduction to Processing with p5js were also found to be very helpful - they are always at https://goo.gl/Gygvom.


We did feel that the session was not long enough, even though we continued to 1h 15 minutes. Next time we should try to start at 6.30pm to see if we can fit a 2 hour session into the evening.


Themes

Some new interesting themes emerged during the course of the hackathon.

Several members used the 3d capabilities (WebGL) of p5js to create and animate 3d objects. Here's a getting started guide to webGL with p5js - [link].

Others used colour to great effect, using the Hue Saturation Brightness HSB colour model as an alternative to RGB. It can be easier to achieve several tasks in the HSB colour model - such as calculating the complementary hue to a given hue.


You can see that complementary colours are located opposite to each other on the HSB colour wheel.


Great Work!

Here is a sample of some of the great work created in the class. As before, the show-n-tell at the end was really interesting, because we see how others work, and hear them talk about their interpretation and inspiration, and also the obstacles they might have emerged as they worked.

There was lots of well-deserved applause for everyone!



Space Going Fast by Mark
https://www.openprocessing.org/sketch/524439


Great use of colour and animation to create the sense of space travel. I love the coloured rectangles, which have also been rotated using a p5js idiom I need to learn more about (push, rotate, translate, pop).



I Want (Not) To Believe by James
https://www.openprocessing.org/sketch/524410


Great use of text and animation to create a philosophical piece playing with ideas and beliefs. The lottery dynamics suggest a certain arbitrariness of belief. Unsettling.



Believe by Vicky
https://www.openprocessing.org/sketch/524456


A very playful work making subtle use of hidden alien heads. This one makes use of Bezier curves to create the heads - something I too must look into.



Planets and Donuts by Tomasz
https://www.openprocessing.org/sketch/524458



Tamasz made extensive use of 3d OpenGL objects to create a fun interactive piece. Your pointer controls the central planet which repels the donuts. Lovely feel to this one!



I Want To ... by Simon
https://www.openprocessing.org/sketch/524466



Simon has created a work which for me really resonates with my memories of the X Files. Dark, sinister, and a movement that suggests something bad is about to happen soon. Simon has used the repetitive overlaying of varying styles of text to great effect.



Shakespeare ... by Borg Droid
https://www.openprocessing.org/sketch/524297


Borg Droid has used both animation and text to create a very funny, and at times poignant, dialogue between two characters. Their eyes and mouths are also animated to great effect.

Borg Droid created many more works, you can find link in the comments of the meet up page.



Future Cities ... by Simon
https://www.openprocessing.org/sketch/524444


Simon has used simple techniques to create powerful compositions. He uses the HSB colour model to  pick two opposite colours, with one becoming the sky and the other for buildings. He uses a brightness gradient to add depth and dimension to the work. I find this one very atmospheric - reminding me of the dystopian urban landscapes of Ghost In The Shell or BladeRunner.



My Sketch (Untitled) ... by Julian
https://www.openprocessing.org/sketch/524469


Julian has created a very striking image that builds overtime. He uses an additive blend mode so that lines, when layered over each other, result in a lighter colour. Julian says this wasn't the effect he set out to achieve, but nonetheless, this is a great accident.



Sphere ... by Zinab
https://www.openprocessing.org/sketch/524453



Zinab has created a really nice animated work with 3d OpenGL elements. Her code is really instructive to look at - you can see how the shapes are given a surface texture, created, and then one of them is set to rotate. She said she normally works with 3DS Max and this was her first 3d work created with code - great job!




Conclusion

I'm really pleased with the diversity of ideas, techniques and that everyone who was new to coding or coding with p5js did great work!

Thursday, 1 March 2018

The Algorithm and Beyond - How I Wrote and Recorded an Algorithmic Symphony

Following a previous meetup on algorithmic music, I was really pleased that Steven Goodwin was inspired to share his own experience with computer generated music.


A video of the meetup is here: [skillsmatter].

Steven's slides are here: [pdf slides].


Precisely Timed Music

In 1996 Steven read about György Ligeti’s mechanical music. Ligeti's 1962 Poème Symphonique in particular was interesting - a composition for 100 metronomes, each set to different speeds.


The piece explored the idea of music from the interplay of precisely timed beats. Importantly, no human could play such music because the accuracy needed is beyond our ability. If you listen to the music above, you'll hear the music change from saturated noise to periods of coherent synchronisation, which disperses again.

There are parallels here to mathematics and physics. In mathematics we have the idea of number multiples, like 2, 4, 6, 8... and 3, 6, 9, 12 ... Sometimes these sequences cross paths, sometimes they overlap completely. Some numbers are always beyond reach - the mysterious primes. In the physical world, we have periodic water waves, which sometimes run past each other, sometimes cancel each other out, sometimes join to reinforce each other .. and sometimes they cause a great non-linear "breaking" wave.


Technology 1962 to 1996

Steven was inspired to experiment creating similar music himself. Ligeti used instruments that were available to him at the time in 1962 - and the metronome was the only reasonable way of generating such precisely timed sound.



Unlike Ligeti, Steven had access to modern (for 1996) technology like computer-based music sequencers and MIDI.

Today, Steven also uses software he developed himself, a javascript and C based MIDI library.


The Process of Idea to Music

Steven gave several examples of the work that goes into building from a core mathematical idea to creating a piece of music that actually sounds like music and is interesting to listen to.

He started with a very simple example.


The above shows a rhythm with 1 note per bar, then 2 per bar, then 3 per bar, 4 per bar, then finally 5 per bar. As a mathematical idea that is simple and rather pleasing. In this particular example, each bar is repeated twice.

If only it were that easy to make successful algorithmic music!

Steven underlines this point and discussed how we need to think about several questions, such as:
  • which notes (frequencies) we want to place at each of those dots marking the rhythm?
  • how many notes to choose from?
  • which instruments?
  • any fades or transitions?
  • vary speed over the piece too?

Steven chose to transition between a piano and a harp, with variations in speed. You can hear the piece in the video at about 9m50 [video]. The result is a very interesting and engaging!


MIDI Libraries

Instead of having to play music himself by hand, Steven wrote his own libraries for writing MIDI files.

MIDI is a technical standard for communicating music between tools and instruments. MIDI files can contain music, but a common misunderstanding is that they are like mp3 files. MIDI files contain information about which notes occur when, and how they occur (eg loudness, duration). The sounds themselves are separate, but a MIDI file will refer to sounds and instruments for playback.

MIDI libraries allowed Steven to create these MIDI files from his own programs. Those MIDI files could then be played back, or modified, by other music tools.

See the resources below for links to a javascript and a C based library.


MIDI Process

Steven went on to explain his process with an example of MIDI generated by his own computer program. He explained that too often the result of directly playing back music created like this something that sounds horrible.

Again, he came back to the theme of having to put in additional work to turn the output of simple algorithms into something listenable. He explained additional things that needed to be thought about when developing the first raw MIDI from a mathematical idea:
  • relative volumes of different instruments, and individual notes to avoid them being hidden in the noise
  • introductions / outros
  • changing sounds/instruments so they work better - pianos don't sound like harps, which don't sound like human voices - they have different timbre.

For me personally, the amount of work involved in sound and music "direction" was something I was previously unaware of.


Fractal Music

Steven demonstrated another idea where he started with a melody of notes, and for the next accompaniment he took every second note, and repeated this idea.


This is similar to the process of creating mathematical fractals - self-similar Cantor sets for example.

The result of taking out every other note, repeatedly, is a melody that's the same as the original - which you can see visually above.

From an algorithmic perspective, this seems like a great idea. Steven played a version of music based on this theme (at 32m50 in the video). It sounded fantastic - but only after a fair bit of human work:
  • orchestration to choose which instrument when
  • which parts to repeat as a motif
  • add elements like a cymbal crash to highlight repeats
  • overall structure of 5 repetitions
  • play the 2nd repeat backwards
  • relative dynamics and emphasis - eg building to a climax
  • remove notes towards the end when they oversaturate 


Written But Not Recorded

After taking us through some more examples of algorithmically based music, Steven took us through an often overlooked step - that of actually recording and producing music.

The central point is that what we might produce at home will very likely sound different when other people listen to the music on their equipment.

Part of the approach is to use high quality equipment and sounds to recreate the music with high fidelity - the master. From this master, versions can be produced for listening on personal audio players and tiny headphones. In addition, recording studios will have expertise in avoiding sound which works in the studio but won't on cheaper and smaller equipment.


Conclusion

The main point for me was that it is great to have mathematically interesting ideas for creating music - but it can only be a starting point, a basis even. Once the theme has been set, a human artist does need to put in a fair bit of work to create works that are listenable music.

Having said that, some of the algorithmic themes are really interesting - the fractal music was really interesting and very pleasing too.


Symphony No. 1 in C# Minor

You can listen to Steven's impressive symphony at his website. Click the following to be taken to Steven's site.



Afterthought: 2001 A Space Odyssey

Steven's talk inspired me to explore Ligeti and I found that his music was used by Stanley Kubrick. I hadn't realised that the haunting Lux Aeterna used in 2001 A S[ave Odyssey was created by Ligeti.



Resources