Live Coding

Paul Henri
since 2022, around the world
VisualizationGenerative ArtReal TimePerformance

Since 2022, I have been engaging every now and then in this niche movement as a visual live coder using the pseudonym Paul Henri.

The main tool I leverage is Hydra and more recently in combination with P5.js. Both frameworks have quite different programming approaches, require different thinking and have different features. This makes them a perfect match (see for example HY5Live). As both tools are based on javascript you can easily combine them with other tools and protocols (just OSC is a bit cumbersome hehe). This has allowed me to build my own environments for performances and even incorporate them in this website.

Performances [interactive visuals]

Workshops

What is Live Coding?

Broadly speaking, live coding is considered a performative act where coding takes place right in front of the audience. Artists algorithmically create, combine and orchestrate either musical or visual pieces in real-time. The display of the algorihtms itself is essential to the performance for most live coders and the trained audience.

What I love about Live Coding

First of all, Live Coding languanges, libraries and environments aim to very efffectively produce a certain type of content while trying to be flexbile enough to allow for a great range of possibilities. This alone makes me admire the tools athand. Hydra for example hides all the difficulties of programming (GLSL) shaders in common functions with powerful arguments. Live Coding let to development of tools I have fun learning and I am using to sketch out ideas off the stage.
This compactness is also what you would want for your own code. Simple and effective. On the one hand, this can help to audience to better understand what you are doing on stage. On the other hand, it is elegant - it just feels good when you can express your thought precisely. It allows you to quickly respond and it frees up space not just on screen but in your brain as keeping up with growing code is madness.
Thirdly, with AI text and code generators in our daily lives tasks that once felt interesting are too often hand over to the machine to solve. In live coding, people want to see humans engaging with machines in a conventional yet creative way. By modelling the real or a fictive world with those efficient tools, live coding is my way of keeping up the magic that I felt in my undergrad.
Lastly, it is also about the community of freaky, wonderful nerds who are seeking more from coding than just a job or a solution to a problem. People got me here and it's why I stayed. People are so encouraging, interested in the wildest corners that this digital world has to offer and laugh with you about the silly mistakes you make. <3
Nevertheless, I do have a few issues with what live coding is or how it is perceived that I still seek to resolve some of them.

What is live?

Let's take the first word: live. On many shows I attend I see people triggering their pre-written code snippets in a certain moment. That is not much different from pushing down a button. There is no coding involved and the only live thing is the execution of the code. At most it is live mixing. This process could easily be automated or pre-recorded, rendering it fixed media. Calling this live coding is against everything what makes live coding interesting to me. More than that it is drawing a lot from the asthetic value of code and drawing away the attention from the creative process. There is a place for this and I do admire the skill of coming up with the code. I would argue this type should just be considered creative coding.
A different type might be performing a pre-written code from an empty file. Let's imagine a guitar player that plays a song, whether from a musical score or not. Would you consider this a live performance? And if so what are we enjoying about it? Are we enjoying the fact that this person has practiced a live long and mastered to stroke the strings in a certain way only to reproduce something that is already known? Would we enjoy a robot doing the same? Most likely not. I think to some extend it is the flex, showing how good you are at something, that strikes us. To a bigger extend though it is about the connection to the audience, and the imperfections that give this performance the human touch.
But where is that connection in the live coder writing down a piece of prewritten code? Code is executed after a statement is fully written down. There are no millisecond imperfections that would matter. However we are on the right path. Imperfections and mistakes, the inability to reproduce, is something that can at least surprise us. This is one of the most important aspects of live coding to me. You might fail, you adapt. This is exciting and it is real. It is the process that matters.

What is coding?

The question might sound very simple. Most people would agree that code is some script we can use to give commands to a machine and that this script consists of symbols and letters we use in our daily life. In this case live coders would need to use a textual form and while this is most often the case and certainly gives a nerdy aestatic, it restricts live coding to a hand full tools. Furthermore, textual code is just a representation we use to implement algorithms. The TOPLAP Manifesto expresses that as follows:

Live coding is not about tools. Algorithms are thoughts. Chainsaws are tools. That's why algorithms are sometimes harder to notice than chainsaws.

The key takeaway for me is, you should try and use whatever tool you like as long as the focus stays on algorithms.

Guided by the unknown

While you are performing it is inevitable that you will be surprised by something unexpected. You may want to recreate an algorithm but you forgot the order of functions, a magical number is missing, you closed the parenthesis too early or nothing at all happens. While it is easy to panic in these situations the skilled live coder will keep calm and adapt. Acknowledging the fact that you will always only understand the surface of your code while the machine handles the heavy computation is key to embracing unwanted behaviour. These moments are what makes live coding so exciting, also for the audience.
However, the more skilled you get and the more you fall into your known patterns, the less often these things happen and the closer we get to playing a score. This is when you can rely on randomness. One source I am heavily drawing from is the feedback loop in which on top of your code the next audio or video frame relies on previous ones. It is a simple and elegant way to force yourself out of known patterns as even a tiny bit of difference can lead to extremly different results. Another way is to bring in sensors with values out of your control. These may include: audio level, image brightness, camera feed, directing a distance sensor at the audience. In a project with Tsun Winston Yeung we combined both aspects and created a feedback loop between us. My visuals were influenced by his audio level and on-set, while his audio synthesizes were subject to my video stream's brightness and contrast. At the end of our show we had created something we considered alive, feeding from the interpretation of the others actions.

Performance pressure and preperation

Similar to other performering arts, it can be quite nerv-wrecking to play in front of an audience, who took time and maybe paid money to see something fun. How can I as an artist ensure my show will be entertaining yet improvised? How can I prepare if bringing code or remembering it is not an option?
In my opinion, there is no need to come empty handed, as code always relies on other algorithms under the hood. Well, it makes perfect sense as a category inside live coding - very much for educational purposes, but the so called "from scratch sessions" are a different topic. While it's advisable to always be guided by your observation on site, it makes perfect sense to prepare a narrative or showcase an algorithm or interaction that you found during your recent experiments. For this, you may need certain boilerplate code like communication protocols, including libraries, hardware setup etc. On top you might want to have a few ideas in mind or prewritten snippets that you can try out. You might want to have a few tricks up your sleeve that you can use when you are stuck. All of this is fine as long as you are open to fail and change your plan according to the situation.

To me, a live coder is someone who truly understands their own algorithms, is brave enough to prove it and capable to adapt to unexpected situations in front of an audience. It's flexing with creative and logical dexterity at once.

How it all started (for me)

I got introduced to live coding in 2022 during the On-The-Fly workshop at the ZKM. Unknownly surrounded by core members of this lovely community, I was wondering about the possibilities and limits of this art form. During this time a group of people in Karlsruhe, Germany started to meet regularly to practice live coding under the umbrella of TOPLAP. Although quite soon after I left Germany we are still friends and you should check out what they are cooking up: TOPLAP Karlsruhe